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


Please Help Members By Posting Answers For Below Questions

What is concatenating?

635


what is use of disp parameter in dd statement?

664


What is job control language?

611


What are the parameters that are used in creating a gdg?

739


Explain how can values be passed from the job stream to an executable program?

623






what is the compile process of cobol program expalin with code

2002


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?

820


What are the jcl procedures?

645


in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?

2062


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?

1807


What is the function of the steplib dd statement?

744


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?

2220


Explain about ISPF/TSO Commands

1312


Explain the function of the steplib dd statement?

646


What statement marks the beginning of an in-stream or cataloged procedure in jcl and assigns default values to parameters defined in the procedure?

816