Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Wait in REXX (without having to create/call an assembler program)

249 views
Skip to first unread message

Scarcella, Gary V

unread,
Jan 24, 2000, 3:00:00 AM1/24/00
to
I have a REXX program (see below) that can be used without having to
create/call an assembler program. The catch is that your OS/390 system must
have UNIX Systems Services installed. This allows me to call the UNIX sleep
function from my REXX program.

For more details, see this IBM manual:

OS/390 UNIX System Services PDF files - OS/390 Version 2 Release 6
http://www.s390.ibm.com/os390/bkserv/r6pdf/uss.html

Title: OS/390 V2R6.0 Using REXX and OS/390 UNIX System Services
Document Number: SC28-1905-03

Gary Scarcella
Internet address: Scarc...@aetna.com


/*.REXX EXEC */
/*.*******************************************************************/
/*.TSOWAIT : WAIT/SLEEP FOR SPECIFIED NUMBER OF SECONDS */
/*.*******************************************************************/
/*.FORMAT: TSOWAIT SECONDS */
/*.SECONDS MUST BE A WHOLE NUMBER, OTHERWISE DEFAULT TO 15 SECONDS */
/*.*******************************************************************/
/*.USES OS/390 UNIX CALLABLE SERVICES EXTENSIONS FOR REXX */
/*.*******************************************************************/
TRACE OFF
ARG PARMS
EXITRC = 0
SECONDS = WORD(PARMS,1)
DEFAULT_SECONDS = 15
IF SECONDS = '' THEN SECONDS = DEFAULT_SECONDS
IF DATATYPE(SECONDS,"WHOLE NUMBER")
THEN SECONDS = ABS(SECONDS)
ELSE SECONDS = DEFAULT_SECONDS
/* CALL SYSCALLS 'ON' */
IF SYSCALLS('ON') > 0
THEN DO
SAY 'UNABLE TO ESTABLISH THE UNIX SYSCALL ENVIRONMENT'
EXITRC = SYSCALLS('ON')
SIGNAL EXIT
END
/* CALL TIME 'E' */
/* SAY 'READY TO SLEEP FOR ' SECONDS 'SECONDS' */
ADDRESS SYSCALL 'SLEEP ' SECONDS
EXITRC = RC
/* SAY 'I WAITED 'TIME('E')' SECONDS' */
EXIT:
EXIT EXITRC

0 new messages