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 / manid

//STEP1 EXEC PGM=IDCAMS
//DD1 DD DSN=FILE1
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT INFILE(DD1) COUNT(*)
/*

IF STEP1 RETURNS RC=4 THEN FILE1 IS EMPTY FILE

I HOPE THIS WILL HELP YOU

Thanks
ManiD

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can you check if a file is empty using jcl?

816


What is the function of //cntl statement?

832


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.

732


Which statement is used to identify the private libraries in job?

681


Explain the purpose of dd dummy statement?

675






In sms datasets, what is the function of the dd avgrec keyword?

658


what operation is performed by job statement?

663


What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?

1811


what is the compile process of cobol program expalin with code

2006


Matching Logic in Jcl not in cobol.Could any one please answer this question

3675


how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?

791


what is a jcl?

693


Differentiate between addressing mode and run mode.

615


What statement marks the beginning of an in-stream or cataloged procedure in jcl and assigns default values to parameters defined in the procedure?

820


Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?

675