Page 1 of 1

Include Member

PostPosted: Thu Jul 24, 2008 9:56 pm
by lakshmanan
Hi,
I have a common Include member, which contains few JCL steps, used in 8 jobs. Every job passes a 2 char value as a symbolic parameter to the include member to be used in jcl steps. For Eg. SET CC1=GB is coded in a job. I'm trying to skip a step only in that particular job where CC1 is set a GB. I cannot go and change the include member as it is wil impact other jobs too.

I tried with an IF statement like below thinking that it wil skip the step only for GB and will work for other values.

//IFSTEP04 IF (&CC1 NOT = GB) THEN
//...
//...
//ENDIF04 ENDIF

I'm getting the error as "NON NUMERIC ARGUMENT TO IF KEYWORD".
Can IF statement be used for other than return code checking?
Is there any other way to resolve this.

thanks.

Re: Include Member

PostPosted: Thu Jul 24, 2008 10:07 pm
by dick scherrer
Hello,

Please post your jcl.

Re: Include Member

PostPosted: Thu Jul 24, 2008 10:34 pm
by lakshmanan
Hi,

This is my JCL.
//         SET JOBCHK=APGB912
//         SET CC1=GB
//         SET CC=GB.
//         SET IRLMID=IRL2
//         SET DB2ID=DSNT
//         SET I18NLIB=WM.SP.PARMLIB
//         SET I18NMBR=DUMMY
//*
//JOBLIB   DD DSN=WM.TESTLINK,DISP=SHR
//         DD DSN=WM.SP.LINKLIB,DISP=SHR
//*
//LIBSRCH  JCLLIB ORDER=(WM.SP.APPLIC.PROCLIB,
//         WM.SP.DBA.PROCLIB,
//         WM.PROCLIB,
//         N01.P5.FIN.JOB.RESOURCE,
//         LMURUGE.CA7.INCLUDE)
//*
//         INCLUDE MEMBER=(VNGB912)
//*
//CA7DMY   EXEC PGM=IEFBR14
//STEPS    INCLUDE MEMBER=(VNSP912I)
//


The include member VNSP912I has the JCL steps as given below. It is in the PDS LMURUGE.CA7.INCLUDE.
//STEP03   EXEC FILEAID
//DD01     DD DSN=LMURUGE.GB.FIN.FTP.ASDA.VENDOR.MASTER,
//             DISP=SHR
//EXTRACT  DD DSN=T01.&CC.FIN.ASDA.VENDOR.EXTRACT,
//             DISP=(,CATLG,DELETE),
//             LRECL=203,RECFM=FB,
//             SPACE=&SIZE003,
//             DSORG=PS,AVGREC=K
//SYSIN    DD DSN=LMURUGE.FIN.SYSTEM.PARMLIB(VN91203),DISP=SHR
//*---------------------------------------------------------------------
//IFSTEP04 IF (&CC1 = AR) THEN  -----> This statement gives error
//STEP04   EXEC SORT
//SORTIN   DD DSN=T01.&CC.FIN.ASDA.VENDOR.EXTRACT,
//             DISP=SHR
//SORTOUT  DD DSN=T01.&CC.FIN.ASDA.VENDOR.EXTRACT.SORTSUM,
//             DISP=(,CATLG,DELETE),
//             LRECL=203,RECFM=FB,
//             SPACE=&SIZE004,
//             DSORG=PS,AVGREC=K
//SYSIN    DD DSN=LMURUGE.FIN.SYSTEM.PARMLIB(VN91204),DISP=SHR
//ENDIF04  ENDIF



Thanks.

Re: Include Member

PostPosted: Thu Jul 24, 2008 11:29 pm
by dick scherrer
Hello,

I cannot go and change the include member as it is wil impact other jobs too.
It appears that you will have to change the member - as it is it will not execute. . .

When you change the member, you could add a step that takes &cc1 as a parm and sets a return code according to what value was specified. Then your jcl could test the recurn code and all should be ok.