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

how you will the direct the data to spool using sysout option?

1769


What does a disposition of (new,catlg,keep) for a dsn mean?

619


What are some jcl statements that are not allowed in procedures?

730


For what purpose steplib and joblib are used ?

690


what is the resolution for sb37 error

7716






what is the JCL statement consists of?

699


What is jcl in mainframe?

692


what is DSN in JCL and what are the parameters to declare the DSN?

724


Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?

675


I want my job (careerride) to be executed in 1 minute and 2 seconds. How do I do that?

713


i want to store 20 digits . how will u do it in cobol ?

862


How is the record format of an output dataset specified?

747


how do you code a null statement?

780


How to submit jcl through a cobol program?

681


Is their any set of rules for dd? Explain.

664