I think this one is more efficient. No need to go through the whole file
of orders.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# FCP_USERNAME=`echo $* | awk ' { print $5 } ' | cut -d\" -f2`
FCP_USERNAME=NJ_SCHEDULE FCP_LOGIN=APPS/xxxxx
ORDER_LIST=a.txt
F_COUNT=0
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
ORD_LOW=`head -1 $ORDER_LIST | tr -d ' '`
ORD_HIGH=`tail -1 $ORDER_LIST | tr -d ' '`
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'}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Avneesh Rathor
"Jeff" <oracledba-ezmlmshield-x34017662.[Email address protected]
29 June 2006 10:23 EST
To
"LazyDBA Discussion" <[Email address protected]
cc
Subject
Re: FW: unix script to run report using concsub
Re-read your question and have a different version to try. Last solution
would run report once for every order number. This one assumes that order
numbers are already in order in the input file "a.txt", and will use the
first for ORD_LOW and the last for ORD_HIGH.
# FCP_USERNAME=`echo $* | awk ' { print $5 } ' | cut -d\" -f2`
FCP_USERNAME=NJ_SCHEDULE FCP_LOGIN=APPS/xxxxx
ORDER_LIST=a.txt
F_COUNT=0
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 -r order_number
do
F_COUNT=`expr $F_COUNT + 1`
if [ $F_COUNT -eq 1 ]
then
ORD_LOW=$order_number
fi
done < $ORDER_LIST
ORD_HIGH=$order_number
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'}
**********************************************************************
This e-mail message is intended only for the personal use of the
recipient(s) named above. This message is confidential. If you are not an
intended recipient, you may not review, copy or distribute this message.
If you have received this communication in error, please notify the sender
immediately by e-mail and delete the original message.
**********************************************************************
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:
http://www.lazydba.com/legal.html
Whilst this email has been checked for all known viruses, recipients should undertake their own virus checking as Xansa will not accept any liability whatsoever.
This email and any files transmitted with it are confidential and protected by client privilege. It is solely for the use of the intended recipient.
Please delete it and notify the sender if you have received it in
error. Unauthorised use is prohibited.
Any opinions expressed in this email are those of the individual and not
necessarily the organisation.
Xansa, Registered Office: 420 Thames Valley Park Drive,
Thames Valley Park, Reading, RG6 1PU, UK.
Registered in England No.1000954.
t +44 (0)8702 416181
w www.xansa.com
Oracle LazyDBA home page