Unix sheel script to run report


 
Thread Tools Search this Thread
Operating Systems HP-UX Unix sheel script to run report
# 1  
Old 06-28-2006
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 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
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 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

4. Shell Programming and Scripting

Sheel script to Delete a set of files from a given directory

I have a file <filestodelete> containing names of files to to be deleted from a directory <filesstore>. I want a script file which accptes the <filestodelete> and also the location of the directory(<filestore>) and deletes all files matching. Thanks in Advance.. (3 Replies)
Discussion started by: VardhiniVenkat
3 Replies

5. 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

6. Shell Programming and Scripting

Need a sheel script to compare no of file on diffrent servers

i have serverA and serverB and i have a folder with same name an location in both servers.... Now i want to compare files in folder(serverA) with folder (serverB) if there are files missing in folderB then copy those files from folder(serverA) to folder(serverB) (1 Reply)
Discussion started by: ashahzad
1 Replies

7. Shell Programming and Scripting

How to check succeesfull finish of a executable from the sheel script

Hi, I want to know is there a way out wherein we can know that the C++ executable has finished its task. Following is the steps: 1.Shell script calls a executable after setting all the env variables. 2.Now after the executable has done its job(basically to create some outpur files).The... (2 Replies)
Discussion started by: electroon
2 Replies

8. 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

9. Shell Programming and Scripting

chaging a environment varible using sheel script

hi How can one change an environment varaible inside a shell script say my bash shell has a env variable export FOO="Day" no i want to write a script inside which the FOO variable is modified to say export FOO=NIGHT after this script finishes te bash shell should show me NIGHT when i... (1 Reply)
Discussion started by: wojtyla
1 Replies

10. Shell Programming and Scripting

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... (2 Replies)
Discussion started by: isingh786
2 Replies
Login or Register to Ask a Question
SCRIPT(1)						    BSD General Commands Manual 						 SCRIPT(1)

NAME
script -- make typescript of terminal session SYNOPSIS
script [-adkpqr] [-F pipe] [-t time] [file [command ...]] DESCRIPTION
The script utility makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1). If the argument file is given, script saves all dialogue in file. If no file name is given, the typescript is saved in the file typescript. If the argument command is given, script will run the specified command with an optional argument vector instead of an interactive shell. The following options are available: -a Append the output to file or typescript, retaining the prior contents. -d When playing back a session with the -p flag, do not sleep between records when playing back a timestamped session. -F pipe Immediately flush output after each write. This will allow a user to create a named pipe using mkfifo(1) and another user may watch the live session using a utility like cat(1). -k Log keys sent to the program as well as output. -p Play back a session recorded with the -r flag in real time. -q Run in quiet mode, omit the start, stop and command status messages. -r Record a session with input, output, and timestamping. -t time Specify the interval at which the script output file will be flushed to disk, in seconds. A value of 0 causes script to flush after every character I/O event. The default interval is 30 seconds. The script ends when the forked shell (or command) exits (a control-D to exit the Bourne shell (sh(1)), and exit, logout or control-D (if ignoreeof is not set) for the C-shell, csh(1)). Certain interactive commands, such as vi(1), create garbage in the typescript file. The script utility works best with commands that do not manipulate the screen. The results are meant to emulate a hardcopy terminal, not an addressable one. ENVIRONMENT
The following environment variables are utilized by script: SCRIPT The SCRIPT environment variable is added to the sub-shell. If SCRIPT already existed in the users environment, its value is overwrit- ten within the sub-shell. The value of SCRIPT is the name of the typescript file. SHELL If the variable SHELL exists, the shell forked by script will be that shell. If SHELL is not set, the Bourne shell is assumed. (Most shells set this variable automatically). SEE ALSO
csh(1) HISTORY
The script command appeared in 3.0BSD. The -d, -p and -r options first appeared in NetBSD 2.0 and were ported to FreeBSD 9.2. BUGS
The script utility places everything in the log file, including linefeeds and backspaces. This is not what the naive user expects. It is not possible to specify a command without also naming the script file because of argument parsing compatibility issues. When running in -k mode, echo cancelling is far from ideal. The slave terminal mode is checked for ECHO mode to check when to avoid manual echo logging. This does not work when the terminal is in a raw mode where the program being run is doing manual echo. If script reads zero bytes from the terminal, it switches to a mode when it only attempts to read once a second until there is data to read. This prevents script from spinning on zero-byte reads, but might cause a 1-second delay in processing of user input. BSD
December 4, 2013 BSD