View previous topic :: View next topic
|
Author |
Message |
Satheeshkumar
New User
Joined: 20 Feb 2009 Posts: 51 Location: Chennai
|
|
|
|
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 |
|
|
xknight
Active User
Joined: 22 Jan 2008 Posts: 117 Location: Liberty city
|
|
|
|
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 |
|
|
Satheeshkumar
New User
Joined: 20 Feb 2009 Posts: 51 Location: Chennai
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
Satheeshkumar
New User
Joined: 20 Feb 2009 Posts: 51 Location: Chennai
|
|
|
|
I need to dynamically allocate and write output file for each store. Please provide the method using REXX or SORT. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
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 |
|
|
|