Hi,
I want to split a file contaning 700 records into 3 files where 1st file has 200, 2nd has 200 and 3rd has 300. I triedusing the SPLIT function in SYNCSORT but then the records where getting splitted evenly but not yb the record count as such.
Kindly help me out with this.
SORT JCL to Split data using OUTFIL
Moderators: Frank Yaeger, Moderator Group
SORT JCL to Split data using OUTFIL
Thanks and Regards,
Prashant
Prashant
Try use OUTFIL option
Hi pkaushi,
We can split the files using OUTFIL option. Check below example.
If above example is not answered your question, let me know.
Thanks,
Prasad
We can split the files using OUTFIL option. Check below example.
Code: Select all
//***********************************************************
//SPLITFLS EXEC PGM=SORT
//***********************************************************
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTIN DD DSN=FILE1......,DISP=SHR
//SORTOF01 DD DSN=OUTPUTFILE1.......,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(1,1),RLSE),
// RECFM=FB,LRECL=20
//SORTOF02 DD DSN=OUTPUTFILE2..............,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(1,1),RLSE),
// RECFM=FB,LRECL=20
//SORTOF03 DD DSN=OUTPUTFILE3..............,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(1,1),RLSE),
// RECFM=FB,LRECL=20
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,ENDREC=200
OUTFIL FILES=02,STARTREC=201,ENDREC=400
OUTFIL FILES=03,STARTREC=401,ENDREC=700
//*
Thanks,
Prasad
Hi ,
here is the link from IBM DFSORT TRICK site detailing fours ways to acomplish splitting of files :
http://www-03.ibm.com/servers/storage/s ... 1.html#t01
Thanks
Priyaranjan Mohanty
here is the link from IBM DFSORT TRICK site detailing fours ways to acomplish splitting of files :
http://www-03.ibm.com/servers/storage/s ... 1.html#t01
Thanks
Priyaranjan Mohanty
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page