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
 

 

Split based on conditions into N files

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

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Fri Aug 03, 2007 3:42 pm    Post subject: Split based on conditions into N files
Reply with quote

Hi All,
I have a file which have say n dates in it. For each date it has n records
ie.
2007-05-01 Record1
2007-05-01 Record2
2007-05-01 Record3

2007-05-02 Record1
2007-05-02 Record2

2007-06-01 Record1
2007-06-01 Record2

Here I want to split my Input file into 3 files based on date and I want to allocate my file dynamically.

That is if my input file contains 10 different dates then it should create 10 files and If my input file contains 2 different dates, then it should create 2 files only..

I tried searching but was not able to find a solution.. Could anyone give a solution for this

Thanks in Advance..
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Aug 03, 2007 4:43 pm    Post subject:
Reply with quote

Hi,

Start from the JCL given in http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
under the topic: "Include records using relative dates".
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: Fri Aug 03, 2007 8:15 pm    Post subject:
Reply with quote

Quote:
I want to allocate my file dynamically


How? By supplying only the output DD statements needed?

This could probably be done by generating a job to dynamically include the needed DD statements and OUTFIL statements and submitting it to the internal reader.

If you're interested in that approach, show me an example of the output DD statements you would want to use. Also, tell me the RECFM and LRECl of your input file and the maximum number of output files you might need.
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: Fri Aug 03, 2007 8:17 pm    Post subject:
Reply with quote

Anuj,

I don't see how the "Include records using relative dates" trick can be used to handle this situation. Can you elaborate.
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 Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm


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