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
What is the function of the dd mgmtclas keyword in sms datasets?
Is automatic restart possible in jcl? If yes, how?
Which dd parameters are required?
What is the use of symbol // in jcl?
Step 1 RC 4 Step 2 Step 3 I want to know the COND parameter which can be coded in step 2 or 3. Step 2 should be executed based on Step 1 RC and Step 3 should not be executed based on step 1's RC
Suppose I have five jobs to do. But I want to hold one?
Mention the types of job control statements?
Why block size is multiple of lrecl in jcl?
Where can program checkpoints be stored for use in a restart?
How can an in-stream dataset be terminated?
What is the function of dd name parameter with a 2 part structure; audit.report?
Explain how can a jobs execution priority be modified?
What do you understand by jcl?
For what purpose steplib and joblib are used ?
What is condition checking in jcl? Is this possible?