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

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

2079


How would you understand error(execution phase)?

641


how you can direct the data to spool using SYSOUT option?

933


What are steplib and joblib? What for they are used?

700


what disp parameter we mention for creation of temporary dataset so that we can use it in later steps?

663






can any one plzzzzzz tell the jcl code for creating ps using idcams

10541


I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.

736


how JCL works?

806


How to do automated restart when a job abend?

793


define cond parameter in jcl?

781


Explain how can return codes be tested before execution of a job step?

837


if the submitter of a job wants to inform another user about the job completion, how can it be done?

766


Explain how can a jobs execution priority be modified?

751


which parameter is use to declare the name of dataset in dd statement?

747


how do you code a null statement?

785