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
Can we use DISP=SHR in output file in JCL
what is “Cond= even” and “Cond=only”?
How can a stopped job be started again?
My Question is 1. How to cound no. of records in JCL. Please explain with an example. 2. How to execute only odd steps in JCL? I know EDIT TYPE = Inculde, Step Name = 1,3,5 and COND code for all even step. Anyone knows other than this.
How can the submitting users racf authority be overridden in a job stream?
Explain the job statement in jcl?
What do you understand by the term notcat 2 – gs?
What is the significance of addrspc parameter in exec statement?
What is catelog procedure and how many catelog procedure to use in one job?
I want my job (careerride) to be executed in 1 minute and 2 seconds. How do I do that?
How to do automated restart when a job abend?
Explain how can a stopped job be started again?
WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99 VALUE 123.45. PROCEDURE DIVISION. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. compiler : IGYGR1080-S A "VALUE" clause literal was not compatible with the data category o subject data item. The "VALUE" clause was discarded. WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99. PROCEDURE DIVISION. MOVE 123.45 TO W-B. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. 2375
Matching Logic in Jcl not in cobol.Could any one please answer this question
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.