[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 Oracle called procedure before executing the next line in the SQRprogram
- Subject: Re: How Do I make the Call Command Wait to finish processing an Oracle called procedure before executing the next line in the SQRprogram
- From: Prasanna Menta <pmenta@UMUC.EDU>
- Date: Fri, 15 Feb 2002 14:20:54 -0500
- Organization: University of Maryland University College
- References: <9D8E9E9545EED411814700902733E12E050E11@0ASTPA-EX1>
I think Bruce you need to put in wait after the endof the #status when
you use the call system.
let $merge=....command
Say call system using $merge #status wait
Thanks
Prasanna
Bruce Kelling wrote:
>
> Nope. I just tried a Windows 2000 test. It sounds like the bat file is
> launching the executable and completing. You probably need something in the
> bat file to delay completion. For a test, put the DOS command "pause" in
> the bat file right after the exe command.
>
> Bruce
>
> -----Original Message-----
> From: Mayfield, Cathy [mailto:cmayfiel@INGR.COM]
> Sent: Friday, February 15, 2002 12:35 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
>
> Thanks again Bruce,
>
> I did what you suggested and the same thing happened.
>
> Does it matter that I'm using Windows 2000?
>
> -----Original Message-----
> From: Bruce Kelling [mailto:Bruce_Kelling@ADVANTECHSOLUTIONS.COM]
> Sent: Friday, February 15, 2002 9:36 AM
> 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
>
> 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