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
A dd statement consists of 4 fields. Name them?
Explain the purpose of the dd keylen parameter?
Explain how can values be passed from the job stream to an executable program?
how you can direct the data to spool using SYSOUT option?
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 the function of the dd mgmtclas keyword in sms datasets?
I have a job called careerride and some steps in it as step1,step2. But I want to execute step2 before step1 ? How do I do that?
how can you check if a file is empty using jcl?
I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.
I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?
What is the function of //cntl statement?
Explain the jcl exec statement?
how do you code a null statement?
Explain about LMFREE�free data set from its association with data ID
How can values be passed from the job stream to an executable program?