Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : programming pearls - The fastest algorithm can frequently be replaced by one that is almost as fast and much easier to understand.

Google
 
Web mainframegurukul.com

Welcome to the mainframegurukul forums.

You are currently viewing our mainframe forums as a guest which gives you limited access to view most discussions, articles. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support at admin@mainframegurukul.com


SPLIT FILE

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities
  View previous topic :: View next topic  
Author Message
pkaushi
Member


Joined: 06 Feb 2006
Posts: 9

PostPosted: Mon Feb 06, 2006 1:48 pm    Post subject: SPLIT FILE Reply with quote

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.
_________________
Thanks and Regards,
Prashant
Back to top
View user's profile Send private message

prasad
Member


Joined: 06 Feb 2006
Posts: 7

PostPosted: Tue Feb 07, 2006 8:15 am    Post subject: Try use OUTFIL option Reply with quote

Hi pkaushi,

We can split the files using OUTFIL option. Check below example.

Code:

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


If above example is not answered your question, let me know.


Thanks,
Prasad
Back to top
View user's profile Send private message
Guest






PostPosted: Tue Feb 07, 2006 9:45 am    Post subject: split Reply with quote

Thanks a ton prasad.... Smile
Back to top
pzmohanty
Member


Joined: 22 Feb 2006
Posts: 1

PostPosted: Thu Feb 23, 2006 1:30 am    Post subject: Reply with quote

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/support/software/sort/mvs/tricks/srtmst01.html#t01

Thanks
Priyaranjan Mohanty
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Easytrieve program for getting Recound counts. 1 prakash.subramaniam 1578 Mon Oct 05, 2009 5:09 pm
Natarajan View latest post
No new posts Getting Error while using ICEMAN tool 4 giri211 2138 Mon Aug 31, 2009 3:59 pm
giri211 View latest post
No new posts Replacing characters Using JCL 5 rachitsethcse 2942 Thu Jul 23, 2009 9:46 pm
Frank Yaeger View latest post
No new posts Getting no of records in a file 8 Rajapriyaa 2479 Mon May 18, 2009 11:30 am
Anuj Dhawan View latest post
No new posts Calling COBOL from C - getting SOC1 0 balajiiinx 2673 Tue Sep 23, 2008 10:25 am
balajiiinx View latest post
 



This widget requires Flash Player 9 or better








Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB