IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

WAIT or SLEEP utility in REXX for delay


IBM Mainframe Forums -> CLIST & REXX
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Fri Dec 29, 2006 12:25 pm
Reply with quote

i have a requirement in which i have to submit three jobs at a time interval of 10 minutes each. i am using a rexx routine to submit these jobs. is there any command or utility by which i can make the rexx routine to wait for 10 minutes before the second job gets submitted?

is there any WAIT or SLLEP command in rexx ?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Dec 29, 2006 2:53 pm
Reply with quote

Use the Elapsed Time function TIME(E). Read more about it here.

Of course, there's always the Unix SLEEP command, if you would prefer to call it instead. Here's one such example.

Here's a few of my own:

Code:

/* REXX WAIT */                                 
Parse Arg secs .                                 
If Datatype(secs) <> 'NUM' Then secs = 60       
rc = Time(R)                                     
Do Forever                                       
  n = Time(E)                                   
  If n >= secs Then Leave                       
End                                             
Exit 0                                           


Code:

/* REXX */                                                 
Say "Enter Number of Seconds"                             
Parse Pull seconds                                         
If seconds = "" Then seconds = 5                           
seconds = Abs(seconds)                                     
seconds = Trunc(seconds,0)                                 
"ALLOC DD(stdout) DA(*) REU"                               
"ALLOC DD(stderr) DA(*) REU"                               
"ALLOC DD(stdin) DUMMY REU"                               
"CALL *(AOPBATCH) 'sleep "seconds"'"                       
Exit 0
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top