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 are the parameter we cannot use in procedure?

637


I have 60 steps in the JCL and want to Execute Only First from PROC by overriding in JCL ?

1347


how JCL works?

795


What is the significance of addrspc parameter in the exec statement?

620


Name the statement which can be used to send data to another mvs jes3 node?

604






how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?

781


Is it possible to left uncode disp?

711


how to do automated restart when a job abends?

848


In job processing, what happens in conversion stage?

738


A chkpt is the parameter coded for multi-volume qsam datasets in a dd statement. When a chkpt is coded as chkpt=eov, a checkpoint is written to the dataset specified in the sysckeov statement at the end of each volume of the input/output multi-volume dataset. State whether true or false?

734


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

938


Explain dd statement in jcl?

642


if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?

1613


What is the motivation behind coding class parameter in job statement?

686


Can I send output of job to my remote device careerride123?

666