Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us