IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to Split the file using DFSORT?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Mon Oct 16, 2006 9:26 pm
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:

Use [URL] BBCode for External Links

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts DFSORT GUID DFSORT/ICETOOL 3
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top