We are using 2 files , file one has data, file two is
empty.Using jcl how can we find the other file is empty?

Answers were Sorted based on User's Feedback



We are using 2 files , file one has data, file two is empty.Using jcl how can we find the other fil..

Answer / mchava

using IDCAMS utitlity

Print infile(file name) count(1)

it will check whether the file is empty or not

Is This Answer Correct ?    14 Yes 0 No

We are using 2 files , file one has data, file two is empty.Using jcl how can we find the other fil..

Answer / sundar

Using IDCAMS utility

In SYSIN:
PRINT(infile) COUNT(1)

If this step return 4 then the file is empty otherwise if
return 0 then the file is not empty.

Is This Answer Correct ?    10 Yes 0 No

We are using 2 files , file one has data, file two is empty.Using jcl how can we find the other fil..

Answer / sham

using idcams and its command print we can find wheather the
fiel is empty or not

Is This Answer Correct ?    8 Yes 1 No

We are using 2 files , file one has data, file two is empty.Using jcl how can we find the other fil..

Answer / raghu

This can be done using ICETOOL.
//STEP1 EXEC PGM=ICETOOL
//IN DD DSN=……input file1
//TOOLMSGDD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD*
COUNT FROM(IN) EMPTY
/*

In the above JCL, Input file1 is empty. If we run this JCL
it will retrun NON-ZERO retrun code.
adv: It will be very helpful when we want to run some steps
after checking a particular file is empty or not.

Is This Answer Correct ?    8 Yes 1 No

We are using 2 files , file one has data, file two is empty.Using jcl how can we find the other fil..

Answer / bala

Compare the file with another known empty file. IEBCOMPR
comparison of two empty files should give non empty RC.

Is This Answer Correct ?    6 Yes 3 No

We are using 2 files , file one has data, file two is empty.Using jcl how can we find the other fil..

Answer / vinay sonar

Print the contents of file using IDCAMS utility if it is
empty you will get MAXCC 4

Is This Answer Correct ?    2 Yes 0 No

We are using 2 files , file one has data, file two is empty.Using jcl how can we find the other fil..

Answer / rajesh_m13

stepname exec vsamempt=yes
that shows empty file

Is This Answer Correct ?    2 Yes 1 No

We are using 2 files , file one has data, file two is empty.Using jcl how can we find the other fil..

Answer / deepak dada, jaipur

the handling would happen


if the file is empty then pass the zero to return code in
cobol program

then go to jcl step and check for the conditiom code( 0,
eq) where the program is getting called and do whatever you
want to do

Is This Answer Correct ?    0 Yes 3 No

We are using 2 files , file one has data, file two is empty.Using jcl how can we find the other fil..

Answer / deepak dada, jaipur

the handling would happen


if the file is empty then pass the zero to return code in
cobol program

then go to jcl step and check for the conditiom code( 0,
eq) where the program is getting called and do whatever you
want to do

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More JCL Interview Questions

Can we use DISP=SHR in output file in JCL

0 Answers  


01 GROSS-PAY 05 BASIC-PAY PIC 9(5) 05 ALLOWENCES PIC 9(3) if BASIC-PAY has a value 1000 and ALLOWENCES has a value of 250,what will be displayed by the statement DISPLAY GROSS-PAY a.1250 b.01000250 c.01250 d.1.250

1 Answers  


Name the system library from which modules are retrieved at execution

3 Answers  


What is the difference between the JOBLIB and the STEPLIB statements?

3 Answers  


In which table PLAN is registered in ?

3 Answers  






What is a JCL Command statement ?

1 Answers   IBM,


Can we able insert data into a PS file Using IEBUPDTE utility??? If Yes can anyone describe it please..

1 Answers  


Explain the function of the steplib dd statement?

0 Answers  


i have a jcl calling proc which has 10 steps, i want to execute from step5 to step10, where can i code RESTART and COND parameter?

4 Answers   IBM,


what is fixed length and variable length and difference between them

1 Answers   CGI, Wipro,


Suppose I have five jobs to do. But I want to hold one?

0 Answers  


There are two input sorting files and there is a need to create one sort out file which contains data of both input files. What is the sort card for this. Write a sample JCL for this using a control card?

3 Answers  


Categories