How to find out the number of records in a file using JCL
Answer Posted / srinivasa gudla
Using Syncsort,
//SORT1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Input.File,DISP=SHR
//SORTOUT DD DSN=Output.File,...
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=OUT,TRAILER1=
(1:COUNT),REMOVECC,NODETAIL
/*
This job creates a report with a single trailer record
containing the record count.
The COUNT subparameter of TRAILER1 provides the number of
records for the entire report (all the records) starting at
position 1.
REMOVECC omits the ANSI carriage control character from all
of the report records.
NODETAIL generates a report with no data records, only
header and trailer records, as specified.
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
List the different jcl statements that are not permitted in the procedures?
What parameter directs the output of the job log dataset?
how to run batch program without jcl?
what is the compile process of cobol program expalin with code
How to pass the parameter in parm using linkage section ? (syntax)?
My Question is 1. How to cound no. of records in JCL. Please explain with an example. 2. How to execute only odd steps in JCL? I know EDIT TYPE = Inculde, Step Name = 1,3,5 and COND code for all even step. Anyone knows other than this.
How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?
How to execute 2nd and 4th steps among 5 steps in jcl proc?
What is the purpose of dd?
What is the function of dd name parameter with a 2 part structure; audit.report?
Explain the purpose of dd dummy statement?
Explain the function of //jcllib statement?
Are there any set of rules for the names of the steps used in a job? What are they?
a set statement is used to define commonly used symbolic across job steps or procedures. It initializes the previous values in the symbolic names. It has to be defined before the first use of the symbolic names in the jcl. State whether true or false?
When The Define Jcl Is Not Available, How Can You Get Information About A Vsam File's Organisation ?