How I sort the records in a file and copy the first 10
records to another file
Answer Posted / kk
hi,
Using dfsort
//step10 exec pgm=sort
//sirtin dd dsn=userid.qulifier.psname,disp=shr
//sortout dd dsn=userid.qulifier.psname,disp=shr
sort fields=(starting position,length,cha,asc/dsc)
stopaft=10
now u get result sortout ps.
| Is This Answer Correct ? | 23 Yes | 0 No |
Post New Answer View All Answers
What are the 2 types of parameters in dd statement?
What are the utility programs in jcl?
In sms datasets, what is the function of the dd avgrec keyword?
How can a fb file convert to vb file using sort program?
When output dataset space is required, what quantity categories are used?
How to find the UNIT and VOLUME of a (a) KEPT (b) UNCATALOGED and (c) CATALOGED dataset - using (i) JCL and using (ii) ISPF ?
when does a dataset go uncataloged?
what are JCLLIB and STEPLIB in JCL?
how to run batch program without jcl?
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?
Does jcl support automatic restart?
What do we mean by 'Virtual storage' for a dataset and for a JOBSTEP ? What is the significance of the following statement for a programmer 'Virtual storage results in program addresses being independent of the addresses that actually exist in a computer' ?
What are the 4 fields in dd statement?
How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you
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) ?