[an error occurred while processing this directive]

HP OpenVMS Systems

ask the wizard
Content starts here

Waiting for a BATCH job to complete?

» close window

The Question is:

 
I was wondering how I could get a command to run contingent on another
procedure's completion.
For example if I have a procedure that writes patient names into a file...
$  OPEN/WRITE ICF ONE_PATIENT.DAT
$  WRITEX ICF PATI
$  CLOSE ICF
(highly summarized and non-functional!) and then I submit the procedure to
the batch:
$  SUBMIT/RESTART/NAME=MAKE_DAT/QUEUE=BATCH
How can I run something based on whether the procedure is completed (or,
which amounts to the same thing, whether the finished .dat file exists)?
ie $TYPE one_patient.dat/page
I have tried to $wait a certain amount of time, but this is poor code for
the task...because a queue can make the procedure take longer than the wait,
or no queue on the batch, may make the wait lonegr than it should be. Any
suggestions?
Thanks.
 
 


The Answer is :

    This is exactly what the SYNCHRONIZE command is for. See HELP
    SYNCHRONIZE

answer written or last revised on ( 14-JUN-1999 )

» close window