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
what is use of dcb parameter in dd statement?
What is concatenating?
How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.
Describe the various parameters utilized in the creation of a gdg?
Is their any set of rules for dd? Explain.
how you will the direct the data to spool using sysout option?
What is the difference between the positional and keyword parameters? Give examples.
What is the purpose of the dd keylen parameter?
I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.
What are the utility programs in jcl?
Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?
What is the function of the dd mgmtclas keyword in sms datasets?
what operation is performed by job statement?
define cond parameter in jcl?
List the various advantages of using jcl language?