How to identify in JCL that an input file is empty without
reading it?

Answer Posted / jeeva225

//job331ab job notify=&sysuid
//step1 exec pgm=idcams
//sysprint dd sysout=*
//input dd dsn=job331ab.prasad.infile,disp=shr
//sysin dd*
print infile(input)count(1)
/*
if return code rc=00 then it is not empty file,
return code rc=04 then it is empty

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the format of comment statement?

688


Explain the function of job statement in jcl?

661


whats the diff bw the evaluate also and and?

1870


what is use of dcb parameter in dd statement?

789


When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?

942






What is the purpose of the dd keylen parameter?

732


What dd statement is used to supply the name of a dataset?

788


What are hierarchy levels in jcl?

965


Where can program checkpoints be stored for use in a restart?

862


Can we use DISP=SHR in output file in JCL

961


what are the statements that are not valid to be included in an include statement?

786


Explain the purpose of dd dummy statement?

687


How to resolve the error "WER488A JOIN CAPACITY EXCEEDED" I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem? I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem?

7633


how do you code a null statement?

791


how you will the direct the data to spool using sysout option?

1775