![]() |
|
|
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 |
| Script needed to FTP a file from sql report to unix server | vprevin | Shell Programming and Scripting | 0 | 10-31-2007 02:33 AM |
| sql plus report under unix environment | raosurya | Shell Programming and Scripting | 0 | 06-17-2007 08:37 AM |
| unix report | shary | Shell Programming and Scripting | 2 | 01-31-2007 06:48 AM |
| Unix sheel script to run report | isingh786 | HP-UX | 0 | 06-28-2006 01:28 PM |
| backup report script | new2prog | Shell Programming and Scripting | 2 | 01-12-2006 02:50 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
need help on unix script to run report
Hi All,
I have a report which I am running from unix shell script using CONCSUB utility. Just for testing I put the order number in shell script as ord_low and ord_high. But Actually what is going to happen is that the order numbers will be in a file say a.txt and this CONCSUB should read the order numbers from a.txt and then run the report. Or May be there is some more efficient way to acheive this..... Please help me as this is urgent. $ more xxxx_ORDERACK_SCH # FCP_USERNAME=`echo $* | awk ' { print $5 } ' | cut -d\" -f2` FCP_USERNAME=NJ_SCHEDULE FCP_LOGIN=APPS/xxxxx ORD_LOW=743114 ORD_HIGH=743114 export PATH ORACLE_HOME=/d1app03/oracle/testora/8.0.6 TNS_ADMIN=/d1app03/oracle/testora/8.0.6/network/admin/test_uxprd export TNS_ADMIN ORACLE_SID=test CONCSUB ${FCP_LOGIN} "OE" "Order Entry USA Expedite" ${FCP_USERNAME} WAIT=Y CON CURRENT ARO AROOEACK PRINTER=isdl NUMBER_OF_COPIES=1 PRINT_STYLE=LANDSCAPE {'1' ,'191','MSTK','D','ORDER','""',${ORD_LOW},${ORD_HIGH},'""','""','""','"" ','""',' ""','""','""','""','""','N'} and here is a.txt 743114 743115 743164 For tesing I just put three order numbers. Regards, Inder |
|
||||
|
Try this
If you have got records in a.txt you could do this. Remember a.txt has to be in the directory where this script is situated or else put the path before the file name a.txt.
# FCP_USERNAME=`echo $* | awk ' { print $5 } ' | cut -d\" -f2` FCP_USERNAME=NJ_SCHEDULE FCP_LOGIN=APPS/xxxxx export PATH ORACLE_HOME=/d1app03/oracle/testora/8.0.6 TNS_ADMIN=/d1app03/oracle/testora/8.0.6/network/admin/test_uxprd export TNS_ADMIN ORACLE_SID=test while read x do ORD_LOW=$x ORD_HIGH=$x CONCSUB ${FCP_LOGIN} "OE" "Order Entry USA Expedite" ${FCP_USERNAME} WAIT=Y CON CURRENT ARO AROOEACK PRINTER=isdl NUMBER_OF_COPIES=1 PRINT_STYLE=LANDSCAPE {'1' ,'191','MSTK','D','ORDER','""',${ORD_LOW},${ORD_HIGH},'""','""','""','"" ','""',' ""','""','""','""','""','N'} done < a.txt |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|