In the following JCL, in STEP001, I am checking the input file, if the input file is there, then I am allocating an output file ( temporary file ); else
SET MAXXCC=0.
In STEP002, right now I am checking the data in the input file, if the data is there in the input file, then I am copying the data into output file (temp file), else SET MAXXCC =0.
But I wanted to add one more condition to this job. i.e., if the input file is not there in STEP001, then I need to bypass STEP002 or in STEP002 I need to add one more condition.( i.e., first I need to check the input file,
if there then check the data in that file, if the data was there copy into output file else SET MAXCC=0.
Code:
//**********************************************************************
//* ALLOCATE TEMP VSAM FILE *
//******************************************************************
//STEP001 EXEC PGM=IDCAMS,
// COND=(0,LT)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTC ENT(BAS1234.T.STAKDUMP)
IF LASTCC = 0 THEN -
DEFINE CLUSTER -
(NAME(BAS1234.T.STAKDUMP.TEMP) -
MODEL(BAS1234.T.STAKDUMP))
ELSE SET MAXCC = 0
/*
//*
//*********************************************************************
//* COPY THE DATA FROM ORG VSAM FILE TO TEMP VSAM FILE *
//**********************************************************************
//STEP002 EXEC PGM=IDCAMS,
// COND=(0,LT)
//SYSPRINT DD SYSOUT=*
//FILEIN DD DSN=BAS1234.T.STAKDUMP,
// DISP=SHR
//FILEOUT DD DSN=BAS1234.T.STAKDUMP.TEMP,
// DISP=OLD
//SYSIN DD *
VERIFY FILE(FILEIN)
IF LASTCC = 0 THEN REPRO INFILE(FILEIN) OUTFILE(FILEOUT)
ELSE SET MAXCC=0
/*
//*