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 / vani
By IDcams its is possible
// STEP EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//FILE1 DD DSN=INPUT-FILE,DISP=SHR
//SYSIN DD *
PRINT INFILE(FILE1)
DUMP COUNT(1)
/*
IF THE FILE IS EMPTY JCL GIVES RC=4
Is This Answer Correct ? | 21 Yes | 6 No |
Post New Answer View All Answers
Mention the types of job control statements?
Explain the function of the dd dcb keyword?
How can a jobs execution priority be modified?
What is the purpose of dd?
How is a type of file defined in the jcl that executes the cobol program?
The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?
WORKING-STORAGE SECTION. 01 GROSS-PAY. 05 BASIC-PAY PIC 9(5). 05 ALLOWENCES PIC 9(3). PROCEDURE DIVISION. MOVE 1000 TO BASIC-PAY. MOVE 250 TO ALLOWENCES. DISPLAY GROSS-PAY. STOP RUN. 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move
how can the same proc be re-used and called by many jobs?
Explain the function of dd disp parameter?
which utility is used to sort a file in jcl?
what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?
when does a dataset go uncataloged?
I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?
How to submit jcl through a cobol program?
What is the syntax of JCL statement?