Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

WAIT or SLEEP utility in REXX for delay

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: WAIT or SLEEP utility in REXX for delay
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

Moderator Team Head


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

PostPosted: Fri Dec 29, 2006 2:53 pm    Post subject: Re: any wait utility
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.    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us