Hi,
The below piece of code will determine whether the input sequential data set is empty or not. It return's an return code 4 if it's empty and 0 if it has any records in it.
//STEP010 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INPUT DD DSN=YOUR.INPUT.FILE,DISP=SHR
//SYSIN DD *
PRINT INFILE(INPUT) CHARACTER COUNT(1)
/*
Thanks,