This is kind of kluge but the way we do it is to start the first command from a script that does the move data and schedule a second script for now + 10 min. This second command does the following delete schedule this_one select * from processes where process="Move Data" if (rc_ok) goto resch do checkin command since move data is finished exit resch: define schedule this_one t=a startt=now+0:10 ...... cmd='this_one' exit Thus this schedule wakes up every 10 minutes and if move data is still running it deletes and reschedules itself. If the move datas are all finished then it deletes itself and does a checkin. hope this helps -- Phillip Ford Senior Software Specialist Corporate Computer Center Schering-Plough Corp. (901) 320-4462 (901) 320-4856 FAX [EMAIL PROTECTED] -----Original Message----- From: Maria Paz Gimeno [mailto:[EMAIL PROTECTED]] Sent: Friday, August 25, 2000 4:42 AM To: [EMAIL PROTECTED] Subject: controlling command execution in an scritp I have this script defined: MOVE MEDIA STGPOOL=COPIABACKUP WHERESTATE=EMPTY WHERESTATUS=OFFLINE CHECKIN LIBVOLUME SILO * SEARCH=YES CHECKLABEL=NO STATUS=SCRATCH The library is a 3494 and the volumes that the move media will recall are already inserted in the library, we do first a select to find the volumes that will fit the move media and insert them in the 3494. The problem we are having at times is that, as there is no wait parameter in the move media, both commands are started concurrently, and the checkin finishs before the move media have changed all tapes to scratch, and for those tapes the checkin fails saying that scratch is not valid status for the volume. Do you know how can I separate the execution fo both commands? I have tried a GOTO but it is not allowed to go back in the script, I can not find any sleep or wait command. Will commit do the trick? In the book it says is for macros, but can it be used for this same purpose on scritps? Thanks for your help Maria