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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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