![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem In Shell Script | satyakide | Shell Programming and Scripting | 11 | 09-24-2007 10:00 AM |
| Help! Problem with Shell Script. | pektl | Shell Programming and Scripting | 7 | 05-29-2006 05:08 AM |
| Problem with SU or SSH in shell script | sravanp | UNIX for Dummies Questions & Answers | 2 | 01-24-2006 12:00 PM |
| Shell Script problem | bnohifi | Shell Programming and Scripting | 1 | 07-07-2005 02:02 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
![]() Hi, I have written a script which calls a stored procrdure. The Stored procedure has 2 inputs and 6 outputs. I need to capture one of the outputs. But I am not able to get any result from this simple script- ! /bin/ksh echo "connect to dbau user etlbitst using anf1892;" > /tmp/Nscript3.sql echo "call CORRTEST.XSD060('${1}', '${2}',?,?,?,?,?,?);" >> /tmp/Nscript3.sql db2 -tvf /tmp/Nscript3.sql -z /tmp/Nscript3.out > /dev/null OutPut2=`head -12 /tmp/Nscript3.out | tail -1` rm -f /tmp/Nscript3.out RtrnCode=`echo $OutPut2 | cut -c3-19` echo $RtrnCode please let me know if there is any mistake..... Regards Arnie |
|
||||
|
Hi Arnie,
Are you able to execute the proc from ur shell script? I guess you wont be able to do so...Seems ur database is DB2... Ur shell script doesn't have any command to connect to database..... db2 -tvf /tmp/Nscript3.sql -z /tmp/Nscript3.out > /dev/null I dont ve any idea about this command but i guess in no way this command going to connect the shell to the database... The /tmp/Nscript3.sql file contains the procedure call.... I ll tell you another simple approach.... First get connected to the database.... Then just call the procedure and store its output in some variables....This way you ll not to have to use the temp file... I have been using this process in many of my scripts...Try it out... |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|