Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to Split the file using DFSORT?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
vijayalayancse

New User


Joined: 29 Aug 2005
Posts: 25
Location: Chennai

PostPosted: Mon Oct 16, 2006 5:08 pm    Post subject: How to Split the file using DFSORT?
Reply with quote

Hi all,

I wanted to split the file into Mulitple files.

Explanation:
say, i have 1000 records, I wanted to to split into 10 files each contains
100 records without sorting them(as it is in the i/p file)

I tried with Sort/Iceman/icetool. Found no solution.
I got some other o/p from what i really wanted.

Can youn plz help me out in fixing this?
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Oct 16, 2006 9:26 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use DFSORT's SPLIT1R function. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//OUT01 DD DSN=...   output file 1
//OUT02 DD DSN=...   output file 2
//OUT03 DD DSN=...   output file 3
//OUT04 DD DSN=...   output file 4
//OUT05 DD DSN=...   output file 5
//OUT06 DD DSN=...   output file 6
//OUT07 DD DSN=...   output file 7
//OUT08 DD DSN=...   output file 8
//OUT09 DD DSN=...   output file 9
//OUT10 DD DSN=...   output file 10
//SYSIN    DD    *
  OPTION COPY
  OUTFIL SPLIT1R=100,
   FNAMES=(OUT01,OUT02,OUT03,OUT04,OUT05,
           OUT06,OUT07,OUT08,OUT09,OUT10)
/*


Note that if you have 1000 records or less and you don't have the April, 2006 PTF, you could use DFSORT's older SPLITBY=100 function. But if you can have more than 1000 records, SPLITBY=100 will rotate back to OUT01, so you'll need SPLIT1R=100 to handle the extra records correctly.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us