need help on unix script to run report


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting need help on unix script to run report
# 1  
Old 06-28-2006
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
# 2  
Old 06-28-2006
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
# 3  
Old 06-29-2006
Thank you Rajeeb

Hi Rajeeb,

Thank you very much!!!

It worked.

Regards,
Inder
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Run UNIX Script from Excel

How to run scripts from Excel and bring results back to excel? (10 Replies)
Discussion started by: santoshdrkr
10 Replies

2. Shell Programming and Scripting

How can i run sql queries from UNIX shell script and retrieve data into text docs of UNIX?

Please share the doc asap as very urgently required. (1 Reply)
Discussion started by: 24ajay
1 Replies

3. Shell Programming and Scripting

Run perl script from Unix script

Hello Guys I have to run a perl script from unix one The reason for this is I have to connect to remote server and then execute the perl script. In unix script I am able to connect to remote server without any password via ssh ssh -o 'PasswordAuthentication yes' -o... (5 Replies)
Discussion started by: Pratik4891
5 Replies

4. UNIX for Dummies Questions & Answers

Manual run a script on UNIX

Hi,I'm currently working on an dev environment that has no jobs to run the scripts.How can I manual run the scripts. on Unix? ---------- Post updated at 05:45 AM ---------- Previous update was at 05:43 AM ---------- Is it something like this.... ../int/inbound>./filename.sh inputfilename ... (5 Replies)
Discussion started by: sonja
5 Replies

5. Shell Programming and Scripting

trying to run this script from unix but the script is not successfull

Hi I am trying to run the below unix script in informatica comamnd task the script is in placed in the path (this script checks if the files are present in other server ) ------------------------------------------------------------------... (1 Reply)
Discussion started by: laxmi131
1 Replies

6. Shell Programming and Scripting

Run the UNIX script only in specified timelines

Hi, I have an UNIX script which runs in every 20 mins of all the days scheduled through CRON. But i need to modify the CRON entry such that it should run from 00:00 AM to 18:00 and again from 22:30 to 23:59 on Saturday. Remaning days, it should run as usual in every 20 mins. Could anybody... (1 Reply)
Discussion started by: rjanardhan83
1 Replies

7. Shell Programming and Scripting

Run the UNIX script only in specified timelines

Hi, I have an UNIX script which runs in every 20 mins of all the days scheduled through CRON. But i need to modify the CRON entry such that it should run from 00:00 AM to 18:00 and again from 22:00 to 23:59 on Saturday. Remaning days, it should run as usual in every 20 mins. Could... (1 Reply)
Discussion started by: rjanardhan83
1 Replies

8. Shell Programming and Scripting

Unix script to run a query

Hi , I need help in creating the shell script for querying using a loop. I haev written the code as follows . But i am getting an error : Line doesn't required '(' . i have chagned but am getting again #!/bin/ksh ##checking the Command Line Parameter if test $1 = "" then ... (3 Replies)
Discussion started by: ramji_leo
3 Replies

9. Shell Programming and Scripting

check in unix shell script so that no one is able to run the script manually

I want to create an automated script which is called by another maually executed script. The condition is that the no one should be able to manually execute the automated script. The automated script can be on the same machine or it can be on a remote machine. Can any one suggest a check in the... (1 Reply)
Discussion started by: adi_bang76
1 Replies

10. HP-UX

Unix sheel 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... (0 Replies)
Discussion started by: isingh786
0 Replies
Login or Register to Ask a Question