ESP Workload Automation

 View Only

 Using REXX template for reoccuring job

Elliott Fitzgerald's profile image
Elliott Fitzgerald posted Oct 25, 2021 01:35 PM

I currently am using a REXX template for a job to run every 15 minutes.  The job starts running at 9am daily and runs every 15 minutes for 12 hours.  I included the template down below that I used.  My question is, is it possible for to have the job show the actual scheduled time, instead  of the .15 for 9:15am, .30 for 9:30am and so on so forth?

 I want to be able to provide clarity so that when a user sees the job they can know the time in hh:mm format, instead of the total minutes.  It gets kind of confusing when you see the job as JOBESTFF.555 to know that the scheduled run time was 18:15:  Here is a picture of my scheduled job in the Workload Director:



TEMPLATE DTI_MRUN (5,D_JOBN,D_SUBFREQ,D_STARTIME,D_INTERVAL,D_FREQ)
/* JOBNAME,
JOB JOBESTFF.%D_INTERVAL
RUN %D_SUBFREQ
DATASET 'ODTEEBF.JCL.CNTL'
DELAYSUB %D_STARTIME PLUS %D_INTERVAL %D_FREQ
JOB JOBESTFF REQUEST
EARLYSUB 09:00
ENDJOB
ENDTEMPL

REXXON
DO I=0 TO 720 BY 15
D_REALTIME = 0900 + I
ECHO D_REALTIME
"DTI_MRUN JOBESTFF DAILY 9AM" I "MINUTES"
END
REXXOFF

Chris_Elvin's profile image
Broadcom Employee Chris_Elvin

How about using a nested loop for hours and minutes in the REXX e.g.

DO H=9 TO 20
 DO M=0 to 45 by 15
   /* execute template here passing both H and M as parameters

 END
END

In the template job have
JOB JOBESTFF.%H_%M

EARLYSUB %H:%M

I know that this is just an outline and not a complete solution, but its late here in UK and my brain is getting fuzzy