How to find out the number of records in a file using JCL

Answer Posted / mohanasundaram

step1 exec pgm=idcams
sysprint dd sysout=*
sysout dd sysout=*
infile dd dsn=filename,disp=shr
sysin dd *
print(filename)-
count(3)
/*
//

In input file 3 records is there means it will be show maxcc=0 else it will show maxcc=4

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where can program checkpoints be stored for use in a restart?

1124


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?

2003


Explain in DD statement what is the use of DCB parameter?

861


what is DD statement is used in JCL?

874


I want my job (careerride) to be executed in 1 minute and 2 seconds. How do I do that?

939


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

1004


what operation is performed by job statement?

828


Can I share my data with other jobs? How?

848


Explain how can a stopped job be started again?

850


What is catelog procedure and how many catelog procedure to use in one job?

7995


I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.

1964


What is the function of the dd mgmtclas keyword in sms datasets?

980


What dd statement is used to supply the name of a dataset?

1056


Explain the function of dd disp parameter?

787


Explain the function of the dd dcb keyword?

922