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
Can we call instream to catalog and catalog to instream?
what is use of space parameter in dd statement?
Mention the types of job control statements?
How does jcl act on code(if you take a cobol program)?
I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?
What is the significance of addrspc parameter in exec statement?
How can a jobs execution priority be modified?
What is the function of dd disp parameter?
what are the types of abends that occur on job failure? And explain the possible causes of these
How do you submit a job for execution?
How can unused space allocation be returned to the system when a dataset is closed?
How would you understand error(execution phase)?
Matching Logic in Jcl not in cobol.Could any one please answer this question
What dd statement is used to supply the name of a dataset?
how to run batch program without jcl?