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 Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm


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