I am working to improve a current process. The JCL makes a call to the File Manager program as such...
//S10 EXEC PGM=FILEMGR
//*
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//DATES DD DSN=xxxxx.xxxxxx.xxx.x&NMMDDYY.,
// DISP=SHR
//*
//*
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//DATES DD DSN=xxxxx.xxxxxx.xxx.x&NMMDDYY.,
// DISP=SHR
//*
Note the symbolic used in the filename. It is a date value in the form of a symbolic.
I would like to use the same symbolic(s) in the File Manager code that follows the above JCL:
//SYSIN DD *
$$FILEM DSU INPUT=DATES,MEMBER=*,PROC=*
IF SUBSTR(INREC,24,8)=&OCYYMMDD.. THEN
OUTREC=CHANGE(OUTREC,&OCYYMMDD..,&NCYYMMDD..,0,24,8)
IF SUBSTR(INREC,23,8)=&OCYYMMDD.. THEN
OUTREC=CHANGE(OUTREC,&OCYYMMDD..,&NCYYMMDD..,0,23,8)
IF SUBSTR(INREC,23,6)=&OYYMMDD.. THEN
OUTREC=CHANGE(OUTREC,&OYYMMDD..,&NYYMMDD..,0,23,6)
IF SUBSTR(INREC,22,6)=&OMMDDYY.. THEN
OUTREC=CHANGE(OUTREC,&OMMDDYY..,&NMMDDYY..,0,22,6)
RETURN
/+
$$FILEM EOJ
/*
//*
$$FILEM DSU INPUT=DATES,MEMBER=*,PROC=*
IF SUBSTR(INREC,24,8)=&OCYYMMDD.. THEN
OUTREC=CHANGE(OUTREC,&OCYYMMDD..,&NCYYMMDD..,0,24,8)
IF SUBSTR(INREC,23,8)=&OCYYMMDD.. THEN
OUTREC=CHANGE(OUTREC,&OCYYMMDD..,&NCYYMMDD..,0,23,8)
IF SUBSTR(INREC,23,6)=&OYYMMDD.. THEN
OUTREC=CHANGE(OUTREC,&OYYMMDD..,&NYYMMDD..,0,23,6)
IF SUBSTR(INREC,22,6)=&OMMDDYY.. THEN
OUTREC=CHANGE(OUTREC,&OMMDDYY..,&NMMDDYY..,0,22,6)
RETURN
/+
$$FILEM EOJ
/*
//*
So far I have been unsuccessful in using symbolics in this way. I am assuming that is because it is not actually JCL. Is there a way to use variables in the File Manager code?
Thanks