Hi all,
I am really new to cybermation esp and need some expert advice .I am trying to create a schedule which uses user define variable to pass information between 2 jobs in the same application. The contain of the variable will then be pass to JCL by using %INCLUDE to execute step in job. The idea as bellow
APPL TEST
SWITCH1 = ''
SWITCH = ''
JOB JOBA
SUBAPPL TEST01 WAIT
RUN TODAY
SWITCH1 = 'Y'
ENDJOB
JOB JOBB
SUBAPPL TEST01 WAIT
IF SWITCH1 = 'Y' THEN DO
SWITCH = 'Y'
ENDDO
RUN TODAY
AFTER ADD(JOBA)
ENDJOB
JCL portion where I want to pass the variable
%INCLUDE IF(('%SWITCH' EQ 'Y'))
//COPY01 EXEC PGM=IEBGENER
//SYSUT1 DD DUMMY
//SYSUT2 DD DSN=ORMA001.TEST.DATA2,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(1,1),RLSE)
//SYSIN DD *
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*
%ENDINCL
The problem I am having is that in JOBB variable SWITCH did not get updated to 'Y' it seam that variable SWITCH1 value of 'Y' that suppose to pass from JOBA did not occurred. As a result statement in JCL %include did not get executed.
Can someone kindly assist me on this please.
My second question the same topic is there a way for me to display the contain of the variable ?
Thank you in advance
MSA