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
Explain the function of job statement in jcl?
how can the same proc be re-used and called by many jobs?
how to run batch program without jcl?
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?
I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.
How can return codes be tested before execution of a job step?
Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?
What is timing concept in mainframe?
Explain how can the attributes of one sms dataset be copied to another dataset?
How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?
Explain how can return codes be tested before execution of a job step?
Is their any limit for data sets?
For what purpose steplib and joblib are used ?
Matching Logic in Jcl not in cobol.Could any one please answer this question
List in order the hierarchical levels of jcl?