i have 10,000 records in one input file.i want to sort 1 to
5000 records in one outputfile and remaining records sort in
another output file write the syntax for this?

Answer Posted / muttaiah

@Albert:
IF we are using Outfil, we won't use Skiprec & stopaft.

My Answer:
Step1:
sort fields=copy
outfil files=01,endrec=5000
outfil files=02,startrec=5001,endrec=10000
Step2:
Sort fields=(pos,leng,cha,a or d)

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to do automated restart when a job abends?

838


//S10 EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //CON DD DSN=VAR.INPUT1,DISP=SHR // DD DSN=VAR.INPUT2,DISP=SHR //OUT DD DSN=VAR.OUTPUT,DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(5,5)),UNIT=SYSDA //TOOLIN DD * * Splice the needed data from the two VB files together SPLICE FROM(CON) TO(OUT) ON(5,5,CH) WITHALL - WITH(12,5) WITH(22,20) VLENMAX /*

898


List the different jcl statements that are not permitted in the procedures?

631


what happens in execution stage in job processing?

650


Describe the various parameters utilized in the creation of a gdg?

677






whats the diff bw the evaluate also and and?

1844


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

914


Is there any command to check wether the ps file is in sorted order?

2421


In job processing, what happens in execution stage?

694


How to pass the parameter in parm using linkage section ? (syntax)?

643


Explain the purpose of the dd keylen parameter?

663


What is the purpose of the dd keylen parameter?

712


What is the maximum length of a single line of jcl?

821


I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?

2091


Why include statement is used in a jcl?

681