How I sort the records in a file and copy the first 10
records to another file
Answer Posted / haleema
Keep first 10 sorted output records.
SUBSET FROM(IN1) TO(OUT1) OUTPUT KEEP FIRST(10)USING(CTL1)
//CTL1CNTL DD *
SORT FIELDS=(11,5,CH,A)
/*
Do this using ICETOOL job.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What happens if both JOBLIB & STEPLIB is specified ?
when does a dataset go uncataloged?
What is the motivation behind coding class parameter in job statement?
How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?
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?
Does jcl support automatic restart?
How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.
We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?
What is notcat 2 - gs?
A chkpt is the parameter coded for multi-volume qsam datasets in a dd statement. When a chkpt is coded as chkpt=eov, a checkpoint is written to the dataset specified in the sysckeov statement at the end of each volume of the input/output multi-volume dataset. State whether true or false?
how can you check if a file is empty using jcl?
Can I share my data with other jobs? How?
what are the types of abends that occur on job failure? And explain the possible causes of these
what is DD statement is used in JCL?
Explain in DD statement what is the use of DCB parameter?