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

Answer Posted / anilkumar

//COUNT EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=INPUT DATASET,
// DISP=SHR
//TOOLIN DD *
*option1
COUNT FROM(IN)
*Instead of count u can aslo use stats operator
*option2
stats from(IN) on(20,5,ZD)
*output will be available in spool ie.in toolmsg
/*

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

in a jcl, a large volume dataset is loaded to a table using bmcload in step1 and an image copy of the loaded table is taken using bmccopy in step2. Step2 abends because the image copy dataset cannot hold the volume of the table. How can this be rectified?

816


what is the resolution for sb37 error

7700


What do you understand by the term job time – out and how can you overcome that?

597


is there any way to execute more than one proc in the same exec statement at the same time..?

2107


List the different jcl statements that are not permitted in the procedures?

636






What do you understand by the term notcat 2 – gs?

751


In job processing, what happens in execution stage?

696


Can we use DISP=SHR in output file in JCL

951


A dd statement consists of 4 fields. Name them?

926


how you can direct the data to spool using SYSOUT option?

920


Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed

1964


Is it possible to code instream data in a PROC?

748


How to submit a jcl from cics?

658


I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?

694


How jcl work to handle various input output file operations?

656