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
 
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm

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