IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SORT to split this file into smaller files


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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: 2455
Location: Hampshire, UK

PostPosted: Mon Mar 21, 2011 5:17 pm
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

Global Moderator


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

PostPosted: Mon Mar 21, 2011 5:25 pm
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

Global Moderator


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

PostPosted: Mon Mar 21, 2011 5:45 pm
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: 792
Location: Pennsylvania

PostPosted: Mon Mar 21, 2011 6:15 pm
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
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: 792
Location: Pennsylvania

PostPosted: Mon Mar 21, 2011 6:40 pm
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 Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Mar 21, 2011 10:55 pm
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: 1788
Location: Bloomington, IL

PostPosted: Tue Apr 05, 2011 12:28 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top