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
Which statement is used to identify the private libraries in job?
How to pass data to a program that is coded in an exec statement?
How does jcl act on a cobol code?
what are the types of abends that occur on job failure? And explain the possible causes of these
how you can direct the data to spool using SYSOUT option?
What is the function of a dd statement?
What do you know about jcl?
Where can program checkpoints be stored for use in a restart?
Explain about LMQUERY�give a dialog information about a data set
What is the function of //cntl statement?
Define concatenating?
how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?
Is it possible to left uncode disp?
Explain the function of dd name parameter with a 2 part structure; audit.report?
how you will the direct the data to spool using sysout option?