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
 

 

Can DFSORT output equal number of rows to multiple outputs?

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

New User


Joined: 26 Sep 2012
Posts: 14
Location: UK

PostPosted: Thu May 01, 2014 3:11 pm    Post subject: Can DFSORT output equal number of rows to multiple outputs?
Reply with quote

Hi all, we use parallel processing in a number of our JCL's. Where the output is used against a specific table, we would choose the output 'split' based on the table partitioning ranges.

However, I have a series of jobs which run in parallel where we don't care so much about what goes in to each file, but what I would like to do is find a way of splitting the input into even sized output files.

For example:
Code:

Input File: (12 recs)
----------
abc123
qwer7445
powe456
iopweg3456
poi345
heqw235
etio25
uewewe79789
we8323
opg732
poijjd4355
klre346

Desired outputs:

File1:
-------
abc123
qwer7445
powe456

File2:
-------
iopweg3456
poi345
heqw235

File3:
-------
etio25
uewewe79789
we8323

File4:
-------
opg732
poijjd4355
klre346


The number of records incoming daily will vary by a huge amount, so if I just use STARTREC and ENDREC it would mean on low volume days, I wouldn't be using all of the output files, and therefore not making the most of my parallel executions.

If there was a way I could dynamically spread the records across the outputs so they were all about even, it would allow the shortest possible execution time.

Is there any such functionality in DFSORT/ICETOOL?
Back to top
View user's profile Send private message

Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Thu May 01, 2014 3:21 pm    Post subject:
Reply with quote

theres a SPLIT functionality in DFSORT.

http://ibmmainframes.com/about8764.html
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Thu May 01, 2014 3:38 pm    Post subject: Reply to: Can DFSORT output equal number of rows to multiple
Reply with quote

Dave, Rohit too.

I'm going to ban just plain links to topics which are more than two years old.

HammerTime, certainly do as Dave says, and look at SPLIT and its cousins.

In attempting to do splits with STARTREC and ENDREC have you verified that you don't read the "front" of your file multiple times?

If SPLIT & Co don't do what you need, there is always a one-pass solution with code.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Thu May 01, 2014 8:16 pm    Post subject: Reply to: Can DFSORT output equal number of rows to multiple
Reply with quote

IMO
how to split a file should be added to the [in]famous category of
the topics no longer eligible for discussion
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 Incorrect output when trying to add n... monica1 PL/I & Assembler 6 Fri Jan 13, 2017 5:02 pm
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


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