[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] Executing SQR using Unix Shell Script.



Hi prasad
I have a program what we use at my place. 
What we do is put all those sqr programs in that file (basically a com job)
and then run that com job by  typing ----- nohup sqrrun.com 2>&1 > sqrrun.out & 
at the
unix command prompt where this com job is stored. There are dir structures in 
this program change them to your specific directory.
i named that com job as sqrrun.com
And don't forge this don't give the externsion .sqr in the report_list of 
sqrrun.com 
and the file(sqr programs) name should be in small case.
 
Hope this will help you out.
and here is the file -----
------------------------
#!/bin/sh
#
# Program Name: runsqr.com
#
. $HOME/com/env.com
REPORT_LIST="your sqr program/programs name with out .sqr and with a space if 
multiple progams" example "billpay paybill dontpaybill"
echo "
      ****** Beginning of $0 `date`
     "
for FILENAME in ${REPORT_LIST} ; do
 echo " 
      *** Running Report ${FILENAME} `date` ***
      "
 if [ -w ${LIST_DIR}/${FILENAME}.lis ] ; then
       rm ${LIST_DIR}/${FILENAME}.lis
 fi
   
 if [ -w ${ERROR_DIR}/${FILENAME}.err ] ; then
       rm ${ERROR_DIR}/${FILENAME}.err
 fi
 ln ${DATA_DIR}/${FILENAME}.dat .
 sqr ${SQR_DIR}/${FILENAME} ${USRUP}                \
     -e${ERROR_DIR}/${FILENAME}.err -s              \
     -i${INCLUDE_DIR} -f${LIST_DIR}/${FILENAME}.lis \
  echo " 
       *** Ending Report ${FILENAME} `date` ***
      "
done
echo "
      ****** End of $0 `date`
     "

 
forget about the extra code involved in it.
Just delete that line of code which is errored.
 
Thanks
Chandra


"Prasad. Koneru" <manukoneru@yahoo.com> wrote:
Hello all,

We are converting our PSoft system from MVS/DB2 to
Unix/Oracle. We have a need to execute all of our
batch jobs using Unix Shell Scripts.

If anyone has a sample working shell script to execute
a SQR in Unix, it will be of great help to us.

Thanks

Prasad Koneru.

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

---------------------------------
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users