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 statement can be used to send data to another mvs jes3 node?

813


What do you understand by jcl?

625


Differentiate between the joblib and the steplib statements?

854


Explain the function of //cntl statement?

647


Explain the function of dd name parameter with a 2 part structure; audit.report?

888






How can the disposition of sysout datasets be set for an entire jobstream?

834


How to pass data to a program that is coded in an exec statement?

815


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?

730


What is the use of disp parameter?

647


What is multithreading in jcl?

933


The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?

936


how to run batch program without jcl?

10059


How can a stopped job be started again?

703


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

2050


Explain dfsort utility?

663