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 is concatenating?
what is use of disp parameter in dd statement?
What is job control language?
What are the parameters that are used in creating a gdg?
Explain how can values be passed from the job stream to an executable program?
what is the compile process of cobol program expalin with code
in a jcl, a large volume dataset is loaded to a table using bmcload in step1 and an image copy of the loaded table is taken using bmccopy in step2. Step2 abends because the image copy dataset cannot hold the volume of the table. How can this be rectified?
What are the jcl procedures?
in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?
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?
What is the function of the steplib dd statement?
Suppose there are 2 Input files Infile-1 and Infile-2. Both the Files contain Employee Records. You need to compare both the files and Write the Common Records in third file named Outfile. How can we do this using File-Aid?
Explain about ISPF/TSO Commands
Explain the function of the steplib dd statement?
What statement marks the beginning of an in-stream or cataloged procedure in jcl and assigns default values to parameters defined in the procedure?