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
 

 

SORT to split this file into smaller files

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

New User


Joined: 20 Feb 2009
Posts: 51
Location: Chennai

PostPosted: Mon Mar 21, 2011 2:12 pm    Post subject: SORT to split this file into smaller files
Reply with quote

Hi,

We have a file of approx 23300 records with a LRECL=139. The number of records can vary from run to run.

I need to split this file into smaller files each store contain one store data.

Input File:

storeno-A
sub-A
text1
text2
text3
$$$

storeno-B
sub-B
text1
text2
text3
$$$

storeno-C
sub-C
text1
text2
$$$

storeno-D
sub-D
text1
text2
text3
text4
text5
$$$

We have to create 4 files out of this, for each stores ($$$ as delimiter),

The input file might contain around 200 store date. I need to spilit using sort.

Any help very much appreciated.
Back to top
View user's profile Send private message

xknight

Active User


Joined: 22 Jan 2008
Posts: 117
Location: Liberty city

PostPosted: Mon Mar 21, 2011 2:33 pm    Post subject: @ Satheesh
Reply with quote

Please give us some detailed information on the requirement.

1) Show us the input file layout
2) Only four sets of records are required to write in the output.

Thanks
Back to top
View user's profile Send private message
Satheeshkumar

New User


Joined: 20 Feb 2009
Posts: 51
Location: Chennai

PostPosted: Mon Mar 21, 2011 3:01 pm    Post subject:
Reply with quote

Input File Layout:

010001
STORE MESSAGES
The following transfer(s) has been initiated to your
store. If you have not yet received this transfer please
contact the sending store to research.
DATE FROM TO UNITS
INITIATED STORE STORE TRANSFER # TRANSFERRED
01/10/2010 0001 0002 200000 10
DATE FROM TO UNITS
INITIATED STORE STORE TRANSFER # TRANSFERRED
01/10/2010 0001 0002 200000 10
$$$
010002
STORE TRANSFER MESSAGES
The following transfer(s) has been initiated to your
store. If you have not yet received this transfer please
contact the sending store to research.
DATE FROM TO UNITS
INITIATED STORE STORE TRANSFER # TRANSFERRED
01/10/2010 0001 0002 2000000 05
DATE FROM TO UNITS
INITIATED STORE STORE TRANSFER # TRANSFERRED
01/10/2010 0001 0002 2000000 05
DATE FROM TO UNITS
INITIATED STORE STORE TRANSFER # TRANSFERRED
01/10/2010 0000 0111 2000000 05
DATE FROM TO UNITS
INITIATED STORE STORE TRANSFER # TRANSFERRED
01/10/2010 0111 0000 2000000 05
$$$


The input file might contain around 2000 store data. I need to spilit using sort.

For 2000 store data we have to generate 2000 output file. For each store data start with store number and ends with delimiter $$$
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1712
Location: UK

PostPosted: Mon Mar 21, 2011 5:17 pm    Post subject:
Reply with quote

JCL used to have a limit of 255 DDNAMES per step - if this still holds true you are going to have to have multiple steps.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Mar 21, 2011 5:25 pm    Post subject: Reply to: SORT to split this file into smaller files
Reply with quote

Quote:

The maximum number of DD statements per job step is 3273, based on the number of single DD statements allowed for a TIOT (task input output table) control block size of 64K. This limit can be different depending on the installation-defined TIOT size.


I think it's been this way as long as I can remember.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Mar 21, 2011 5:45 pm    Post subject: Reply to: SORT to split this file into smaller files
Reply with quote

Satheeshkumar, I imagine that this is a relatively simple WHEN=GROUP issue (you've posted other topics on that same issue before) but I don't think you've provided the answer for the bigger question here - will you be providing all of the necessary DD statements and dataset allocations in your job, or do you need this process to consider that and build all of the necessary JCL statements to account for the number of splits?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Mon Mar 21, 2011 6:15 pm    Post subject:
Reply with quote

Based on the estimated number of records and the requirements given, I would use a REXX solution.

This would be a relatively simple program, dynamically allocating and writing a new output file for each store when the $$$ delimiter is reached.

This would be my choice, other opinions may vary.
Back to top
View user's profile Send private message
Satheeshkumar

New User


Joined: 20 Feb 2009
Posts: 51
Location: Chennai

PostPosted: Mon Mar 21, 2011 6:35 pm    Post subject:
Reply with quote

I need to dynamically allocate and write output file for each store. Please provide the method using REXX or SORT.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Mon Mar 21, 2011 6:40 pm    Post subject:
Reply with quote

At the moment, I am busy with my paying job.

Perhaps on my 'free' time, I can work on a solution for which you will be payed for.

Or perhaps some of the other Rexx experts have some 'free' time to do this for you (for free).
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 Mar 21, 2011 10:55 pm    Post subject:
Reply with quote

Quote:
I need to dynamically allocate and write output file for each store. Please provide the method using REXX or SORT.


DFSORT does NOT dynamically allocate output files.

You could do this with DFSORT by generating a job to submit to the internal reader. The job would need to have all of the required DD statements. Whether the system could handle the number of DD statements you need is another question.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Tue Apr 05, 2011 12:28 am    Post subject:
Reply with quote

Nic Clouston wrote:
JCL used to have a limit of 255 DDNAMES per step - if this still holds true you are going to have to have multiple steps.

I think that you are thinking steps per job, rather than DD statements per step.
Satheeshkumar wrote:
Please provide the method using REXX or SORT.

Please provide my standard billing rate. Or, as I am fortunate enough to have a steady job, please provide someone else with his standard billing rate.
Frank Yaeger wrote:
You could do this with DFSORT by generating a job to submit to the internal reader. The job would need to have all of the required DD statements. Whether the system could handle the number of DD statements you need is another question.

IIRC, there is also a limit of 5,000 card images per job. With so many DD statements, the TS would be pushing that limit too.
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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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