How to test thru JCL if any file(PS or VSAM) is empty or
not. I do not want to use any COBOL prog or Ezytrieve and
want to do using utility.
Answer Posted / deb
First SORT the input file.
Assume the sorted o/p is in MY.SORT.FILE, then run this step
//CHEKEMTY EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//MYFILE DD DSN=MY.SORT.FILE,DISP=SHR
//SYSIN DD *
PRINT INFILE(MYFILE) CHARACTER COUNT(1)
if the above step returns a RC=4, then the file is
empty
| Is This Answer Correct ? | 10 Yes | 5 No |
Post New Answer View All Answers
How jcl is used for testing batch programs?
What is Cataloged Procedures?
For what purpose steplib and joblib are used ?
Give the syntax of job specifying jcl statement.
What is multithreading in jcl?
what is DSN parameter and DISP parameter is used for?
Is their any limit for data sets?
What is jcl in mainframe?
Explain the job statement in jcl?
How to submit a jcl from cics?
How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you
Explain the purpose of dd * statement in jcl?
what is SOC4 error?
How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?
what is use of disp parameter in dd statement?