[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: How Do I make the Call Command Wait to finish processing an O racle called procedure before executing the next line in the SQR program
- Subject: Re: How Do I make the Call Command Wait to finish processing an O racle called procedure before executing the next line in the SQR program
- From: Bruce Kelling <Bruce_Kelling@ADVANTECHSOLUTIONS.COM>
- Date: Fri, 15 Feb 2002 10:36:07 -0500
let $cmdline = 'C:\WINNT\system32\cmd.exe /c @start /min /wait cmd /c '
let $cmdline = $cmdline || 'g:\TEST\LOAD.bat username/password@database
g:\TEST'||'
'||$timestamp
You may need to adjust the quotes until it comes out just right. For this
type of code, I would show the $cmdline in log file and test by copying and
pasting into DOS window or the Run dialog box.
Bruce
-----Original Message-----
From: Mayfield, Cathy [mailto:cmayfiel@INGR.COM]
Sent: Thursday, February 14, 2002 6:28 PM
To: SQR-USERS@list.iex.net
Subject: Re: How Do I make the Call Command Wait to finish processing an
O racle called procedure before executing the next line in the SQR
program
Thank Bruce,
Exactly how do I execute this with my code shown below?
-----Original Message-----
From: Bruce Kelling [mailto:Bruce_Kelling@ADVANTECHSOLUTIONS.COM]
Sent: Thursday, February 14, 2002 4:42 PM
To: SQR-USERS@list.iex.net
Subject: Re: How Do I make the Call Command Wait to finish processing an
O racl e called procedure before executing the next line in the SQR
program
The trick I have found is to make DOS wait by concatenating the following in
front of the bat file call:
C:\WINNT\system32\cmd.exe /c @start /min /wait cmd /c {put your bat file
name here}
Bruce
-----Original Message-----
From: Mayfield, Cathy [mailto:cmayfiel@INGR.COM]
Sent: Thursday, February 14, 2002 5:01 PM
To: SQR-USERS@list.iex.net
Subject: How Do I make the Call Command Wait to finish processing an
Oracl e called procedure before executing the next line in the SQR
program
I am running the following code which calls on a .BAT file that runs SQLLDR
to insert data into a table then uses a called Oracle procedure to update
the records inserted:
........
let $TIMESTAMP = edit($current-date,'yyyymmddhh24miss')
let $cmdline = 'g:\TEST\LOAD.bat username/password@database g:\TEST'||'
'||$timestamp
call system using $cmdline #dos_status
begin-sql
begin
data_update;;
end;;
end-sql
............
The problem is the .BAT is still running loading the data but the program
still jumps ahead and to the part of the procedure that calls the stored
procedure DATA_UPDATE.
How can I use the WAIT parameter in NT and Windows 2000 to halt the program
until the .BAT is finished?
cmayfiel