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 / satish

hi to all
the example is useful to our requirement,example is i have
some records and i sort it and first 5 records to be placed
in o/p file
//STEP1 EXEC PGM=SORT
//SORTIN DD *
b
c
d
e
f
g
h
i
j
k
l
/*
//OUT DD dsn=output file*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,1,CH,D)
outfil fnames=out,endrec=5
/*

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are JCLLIB and STEPLIB in JCL?

672


Explain how can a jobs execution priority be modified?

736


What are s0c1, s0c4, s0c5, s0c7 and socb?

697


what is SOC4 error?

734


what is use of space parameter in dd statement?

750






how do you code a null statement?

775


Explain how can a stopped job be started again?

636


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

651


Explain how can values be passed from the job stream to an executable program?

615


List in order the hierarchical levels of jcl?

664


what is the compile process of cobol program expalin with code

1998


What is jcl in mainframe, and how many types of jcl statements are there for a job?

628


What is the function of the steplib dd statement?

739


What is the function of dd name parameter with a 2 part structure; audit.report?

698


have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file

923