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
Explain dfsort utility?
what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?
What are hierarchy levels in jcl?
Suppose I have five jobs to do. But I want to hold one?
Is condition checking possible in jcl? If yes, how?
What parameter directs the output of the job log dataset?
What do we mean by 'Virtual storage' for a dataset and for a JOBSTEP ? What is the significance of the following statement for a programmer 'Virtual storage results in program addresses being independent of the addresses that actually exist in a computer' ?
I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.
what are the statements that are not valid to be included in an include statement?
List the different components of jcl statement?
What is notcat 2 - gs?
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 are the 2 types of parameters in dd statement?
Is their any set of rules for dd? Explain.
Explain the function of //jcllib statement?