i have 1000 records in input file and i want to sort it and
the first 200 records to be placed in output file. how to
do that??

Answer Posted / chinmay

//job1 job 65493,jena,class=a prty=9
//step1 exec pgm=sort
//sysprint dd sysout=*
//indd dd dsn=file1.cob, disp= shr
//outdd dd dsn=file2.cob, disp=(new,catlg,delete)
// unit=sysda,space=(cyl,4,2),rlse)
//sysin dd *
sort fields=(2,4,ch,a)
/*
//step2 exec pgm=idcams
//sysprint dd sysout=*
//sysin dd *
repro -
infile(indd)
outfile(outdd)
count(200)
/*
//

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Must tape dataset definitions include vol=ser specifications?

979


How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you

603


What is concatenating?

633


What is the function of dd disp parameter?

654


what are the various stages of job processing?

736






How can a stopped job be started again?

707


When output dataset space is required, what quantity categories are used?

824


Suppose I have five jobs to do. But I want to hold one?

654


What parameters can be used to limit the number of records written to a sysout dataset?

746


In job processing, what happens in conversion stage?

734


Name what parameter directs the output of the job log dataset?

557


Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed

1964


Is it possible to left uncode disp? If yes, how?

704


what is JCL?

693


What is the purpose of dd?

724