Monthly, I need to run a set of JCLs. These JCLs has some hardcoded parameters that I need to be changed every month (eg: the year/month of the source file). On the other hand, these JCL need to be run for many source files:
LEA.D.1804.L03
LEA.D.1804.L04
LEA.D.1804.L05
and so on..
Here is an excerpt of a JCL:
//*---------------------------------------------------------------------
//STEP01 EXEC PGM=OSGENER
//*---------------------------------------------------------------------
//SYSPRINT DD SYSOUT=T
//*
//SYSUT1 DD DSN=LEA.D.1804.L03,DISP=SHR
//*
//SYSUT2 DD DSN=LEA.L03.DAT,UNIT=SYSDA,DISP=(,PASS),
// DCB=(RECFM=FB,LRECL=135,BLKSIZE=0),SPACE=(CYL,16,RLSE)
//SYSIN DD *
RCOUT 4,,'016011'
RCOUT 4,,'016012'
RCOUT 4,,'016021'
COPY
I believe (and hope) that there must be some way to use params instead of these harcoded values. I think that I could use rexx to call these JCLs programmatically, looping the source files.
First, is this possible?
How do I do to use vars/params in my JCLs instead of harcoded values?
(I also know that there is something called file tailoring but I can't understand how I should use it)
I come from PHP, Java, Javascript and those kind of langs stacks. Please be as clear and explicit as possible.
Thanks!