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

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

863


If a (+1) generation dataset is created in the first step of a job, how can it be referenced in later steps of the same job for input?

798


How would you understand error(execution phase)?

647


Explain the function of the dd dcb keyword?

719


What is jcl in mainframe?

708






define cond parameter in jcl?

787


how would you create a temporary dataset? And where will you use them?

780


What is the purpose of dd?

737


Why include statement is used in a jcl?

696


How do you overcome this limitation ?

708


what is “Cond= even” and “Cond=only”?

758


What is the format of comment statement?

690


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

932


What is jcl in mainframe, and how many types of jcl statements are there for a job?

641


what are the statements that are not valid to be included in an include statement?

786