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 dd parameters are required?
what are the various stages of job processing?
Is automatic restart possible in jcl?
What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?
What are the rules employed while naming the steps in a job?
How jcl work to handle various input output file operations?
Matching Logic in Jcl not in cobol.Could any one please answer this question
what is DSN parameter and DISP parameter is used for?
How do you submit a job for execution?
What is the use of disp parameter?
What is notcat 2 - gs?
Step 1 RC 4 Step 2 Step 3 I want to know the COND parameter which can be coded in step 2 or 3. Step 2 should be executed based on Step 1 RC and Step 3 should not be executed based on step 1's RC
Brief description of inline procedure of jcl.
What is the function of dd disp parameter?
how you will the direct the data to spool using sysout option?