I am fairly new to JCL so be a little easy on me....
I have the following code grabbing the date.
I can reference the &LYYMMDD anywhere in the code and it tranlates fine. The problem is I need to save the value in a set statement.
//STEP00 EXEC PGM=EZACFSM1
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DATA,DLM=@@
// SET DTVAR=D&LYYMMDD
@@
I am trying to write this value out to a file(member). It appears that the set variable cannot be referenced in the SYSUT2 parameter of IEBGENER. Weird thing is - the &LYYMMDD CAN BE referenced in the SYSUT2, but I need this value to be stateful.
//STEP01 EXEC PGM=IEBGENER
// SET DTVAR=&LYYMMDD
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD *
PUT //&DTVAR
//*
//SYSUT2 DD DSN=XXXX.XXXX.XXXX(XXXDT1),DISP=SHR
//*
I have tried moving the set parameter in other places - thinking the set parameter is not being held in the SYSIN of the EZACFSM1 program, but it is in fact being held - as I can reference it in a DD DSN statement and it substitues fine.
Is there another program besides IEBGENER I could use that would take the SET statement or am I missing something here.... ALL suggesstions are obviously welcome. I probably would want to stay with JCL and not REXX, but please reply with what you will. I will listen and comment to any solution...
Thanks,
Jason