Testing time of day to determine whether to execute program or not. Testing hour of day.
Testing time of day to determine whether to execute program or not. Testing hour of day.
IF-THEN-ELSE can test job step return code only. So, to check hour you need a trivial program. Here is an example of such program written in REXX:
/* REXX */
parse value time() with hour '.' .
exit hour
then you can use it in JCL:
//GETHOUR EXEC PGM=IRXJCL,PARM='GETHOUR'
//SYSTSPRT DD DUMMY
//SYSEXEC DD DSN=<library>,DISP=SHR where <library> is PDS or PDSE data set where member GETHOUR is a REXX code shown above
// IF (GETHOUR.RC = 12) THEN
// EXEC ...
// ENDIF
Mistype, sorry. REXX code (member GETHOUR) should be:
/* REXX */
parse value time() with hour ':' .
exit hour
semicolon rather than point
You must be signed in to reply to this thread