Home » SQL & PL/SQL » SQL & PL/SQL » question
question [message #38967] Fri, 31 May 2002 07:34 Go to next message
JoJo
Messages: 18
Registered: January 2002
Junior Member
EXcuse for that question which might seems to be evident for someone but:
I have a code like this :

T10 si (@154="O") et (@319<>" ")
%CR $1= codsoc
%CR $2= achvte
%CR $3= typeve
%CR $4= numeve
%CR $5= numpos
V10 ~901=PROC1("ap$maq/maj_prxuf.sh", ~001, ~002, ~003, ~004, ~005)
V10 ~900=PROC1("ap$maq/maj_poivar.sh", ~001, ~002, ~003, ~004, ~005)
V10 ~903=PROC1("ap$maq/maj_prxvdu.sh", ~001, ~002, ~003, ~004, ~005)
V10 ~905=PROC1("ap$maq/maj_prxuf2.sh", ~001, ~002, ~003, ~004, ~005)
V10 ~906=PROC1("ap$maq/maj_prxbrt.sh", ~001, ~002, ~003, ~004, ~005)
V10 ~907=PROC1("ap$maq/maj_prxuf3.sh", ~001, ~002, ~003, ~004, ~005)
V10 ~908=PROC1("ap$maq/maj_prxtav.sh", ~001, ~002, ~003, ~004, ~005)
V10 ~909=PROC1("ap$maq/maj_prxuf4.sh", ~001, ~002, ~003, ~004, ~005)
T10 fsi
T10 si (@154="N")
V10 ~904=PROC1("ap$maq/maj_qtesup2.sh", ~001, ~002, ~003, ~004, ~005)
T10 fsi

you can see that it calls tons of sh files like that :

echo "MAJ (soc $1) prxuf pour $2/$3/$4/$5"
$ORACLE_HOME/bin/sqlplus -s soc1/infor1 <<EOF > /dev/null
update evp
set evp.prxuf=(select (decode(evl.qtesup2,0,1,evp.PRXVDU/evl.qtesup2)) from evl
where evp.codsoc=evl.codsoc
and evp.achvte=evl.achvte
and evp.typeve=evl.typeve
and evp.numeve=evl.numeve
and evp.numpos=evl.numpos
and evl.numlig=1)
where evp.codsoc=$1
and evp.achvte='$2'
and evp.typeve='$3'
and evp.numeve=$4
and evp.numpos=$5
and exists(select 1 from evl
where evp.codsoc=evl.codsoc
and evp.achvte=evl.achvte
and evp.typeve=evl.typeve
and evp.numeve=evl.numeve
and evp.numpos=evl.numpos
and evl.numlig=1);
/
commit;
EOF

I have succeed to "compress" all that sh files in one pl/sql procedure.
The problem is that i don t know how to call this procedure and pass it the right parameters with that kind of code. Thanks for helping me.
Re: question [message #38972 is a reply to message #38967] Fri, 31 May 2002 11:39 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
See the following URL. Consider carefully if you want to to run in Sync or Async mode. Async you will get a response back immediatedly after submitting it -- but you want see any errors from execution. Of course the scripts can log to log files and then you can look at those...

http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:16212348050

If you can't use & to run it in background mode (I don't thenik you can) then try 'at now' or maybe nohup (I don't think nohup will work though).
Previous Topic: Taking Export and creating.dmp file online
Next Topic: Which SQL statement is correct?
Goto Forum:
  


Current Time: Wed Apr 24 02:10:24 CDT 2024