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


Please Help Members By Posting Answers For Below Questions

Mention the types of job control statements?

692


Explain the function of the dd dcb keyword?

706


How can a jobs execution priority be modified?

803


What is the purpose of dd?

728


How is a type of file defined in the jcl that executes the cobol program?

716






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 ?

949


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

856


how can the same proc be re-used and called by many jobs?

915


Explain the function of dd disp parameter?

599


which utility is used to sort a file in jcl?

750


what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?

779


when does a dataset go uncataloged?

840


I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?

2111


How to submit jcl through a cobol program?

682


What is the syntax of JCL statement?

700