My apologies, I know the thread could have been more aptly named, but I was unsure as to how I'd put my question.
Following a requirement, the sample JCL that I'd written is as below:
//$SYSOUT INCLUDE MEMBER=$SYSOUT
//SYSIN DD DSN=xxxx.xxxxx.xxxxx.xxxxx.,DISP=SHR
//SORTIN DD DSN=xxx.xxxx.xxxx.xxxx.xxxx,DISP=SHR
//$MEMBER1 INCLUDE MEMBER=$MEMBER1 <-- Problem Line
The '$MEMBER1' is the SORTOUT DD statement which is built in a COBOL program in an earlier step.
The challenge that I'm facing currently is-- the PDS containing the '$MEMBER1' is given in JCLLIB statement at the top of the JCL, now during the execution, the value of '$MEMBER1' updated by the COBOL is not getting picked by my JCL in the First run of this piece; when I run the JCL a second time, the value updated in previous run is picked.
This I understand can be because of JES loading my JCL symbolics during the initial JCL conversion phase.
Example: lets say the member is initially empty, the COBOL wrote some data to this member, and we expect our JCL to pick the updated SORTOUT from this member; when the JCL is executed, no SORTOUT is found.
Now, when we submit the JCL again, SORTOUT is found, because it was built in the previous run itself.
Is there a way to pass the SORTOUT member to my JCL such that the updated values get picked, everytime the JCL is submitted, instead of it picking the values which were present at the time of initial JCL loading.