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
How to submit a jcl from cics?
Describe the various parameters utilized in the creation of a gdg?
How jcl is used for testing batch programs?
How to execute 2nd and 4th steps among 5 steps in jcl proc?
Is acct parameter mandatory?
What are the jcl procedures?
if the submitter of a job wants to inform another user about the job completion, how can it be done?
A dd statement consists of 4 fields. Name them?
What do you understand by the terms: joblib and steplib?
What is the purpose of disp parameter?
In sms datasets, what is the function of the dd mgmtclas keyword?
List the various advantages of using jcl language?
Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?
Name what parameter directs the output of the job log dataset?
which utility is used to sort a file in jcl?