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

Copy all the generations to a single dataset


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Arnab.Mukherjee

New User


Joined: 06 Aug 2007
Posts: 5
Location: Stockholm

PostPosted: Tue Aug 07, 2007 2:18 am
Reply with quote

Hi,

I want to copy all the generations to an output dataset. The input files are all of FB but of different lengths. Please help.

Regards,
Arnab
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Aug 07, 2007 2:47 am
Reply with quote

You have multiple members of a GDG that have different FB lrecls? Whose idea was that? icon_rolleyes.gif
Back to top
View user's profile Send private message
Arnab.Mukherjee

New User


Joined: 06 Aug 2007
Posts: 5
Location: Stockholm

PostPosted: Tue Aug 07, 2007 2:58 am
Reply with quote

icon_sad.gif ... yes thats bad. But there is an existing program that creates a generation (only one) with the maximum record lengths of the records daily. But if the program executes second time with different input records, it creates another generation and this time taking the maximum of the record lengths to determine the record length of the new generation. Like this, I've different generations with different record lengths.

Now, will this ICEGENER copy them to a single output dataset?

//COPY1 EXEC PGM=ICEGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=.....,DISP=OLD (The input GDG with different record lengths)
//SYSUT2 DD DSN=...... ,DISP=(,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=37,BLKSIZE=25900),
// SPACE=(CYL,(10,10),RLSE) (The single output dataset)
//SYSIN DD DUMMY
//

Regards,
Arnab
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Aug 07, 2007 4:20 am
Reply with quote

I'm nor sure, but I kind of doubt it......
Is this "copy" a one time thing or a regular production "requirement"?
If this is going to be ongoing, VB would work very well.....
I don't thing even DFSORT could read in multiple lrecls of various FB datasets....
On a one time basis, it can be done, but it won't be easy.....
VB is the way to go, if that existing program can be convinced to output VB datasets, the future will be rosy.....
Back to top
View user's profile Send private message
Arnab.Mukherjee

New User


Joined: 06 Aug 2007
Posts: 5
Location: Stockholm

PostPosted: Tue Aug 07, 2007 4:35 am
Reply with quote

This does not happen always. Normally, we have only one generation. But, for erronius cases we can have multiple execution of the existing program and that results multiple generations which can be of different record lengths.

Bad luck, I can't change the existing system to output VB.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Aug 07, 2007 4:45 am
Reply with quote

You have provided additional information, Frank will have the last word on this, but I do think that each different lrecl file will have to be dealt with individually, let's give it a day and re-attack it with a fresh outlook....
Back to top
View user's profile Send private message
Arnab.Mukherjee

New User


Joined: 06 Aug 2007
Posts: 5
Location: Stockholm

PostPosted: Tue Aug 07, 2007 4:51 am
Reply with quote

Thank you. Waiting for the solutions.
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: Tue Aug 07, 2007 5:20 am
Reply with quote

Quote:
If this is going to be ongoing, VB would work very well.....
I don't thing even DFSORT could read in multiple lrecls of various FB datasets....


That's correct. For FB, the records lengths must be the same for DFSORT. You would need to pad them all to the same length. You could do that in one ICETOOL step something like this:

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=...  input file1
//IN2 DD DSN=...  input file2
...
//OUT DD DSN=...  MOD output data set
//TOOLIN DD *
COPY FROM(IN1) TO(OUT) USING(CTL1)
COPY FROM(IN2) TO(OUT) USING(CTL1)
...
//CTL1CNTL DD *
   INREC OVERLAY=(c:X)
/*


where c is equal to the LRECL of the longest input file. Note that OUT must be a MOD data set.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Aug 07, 2007 7:09 am
Reply with quote

Hello,

If i understand correctly, you have an unknown number of generations and each might have a different lrecl.

You mention that VB is not an option. Is there some business reason why not? Even though you don't specify VB, your data is variable.

Is there some reason that the program cannot be changed to always use the maximum lrecl if for whatever reason VB cannot be used? When you run the copy with the current files, the output is all going to be the max lrecl anyway and if you went ahead and created the files w/max you could save a lot of jumping thru hoops to get to the consolidated max-lrecl file.

While you may have inherited this, i'd suggest that it not be continued. Changing to VB or max lrecl will make this much more maintainable/supportable. Keep in mind (if i understand correctly), each time this file consolidation job is run, it will take some number of custom copy jobs/steps to get the files in shape for the creation of the common file.

Have you thought of how this combiled file might be read back into a program/utility? That too may not be straightforward and it will surely happen at 3a.m. if it does. . . icon_wink.gif
Back to top
View user's profile Send private message
Arnab.Mukherjee

New User


Joined: 06 Aug 2007
Posts: 5
Location: Stockholm

PostPosted: Tue Aug 07, 2007 4:10 pm
Reply with quote

Thanks Frank. But as Dick mentioned, the input file is all the generations and so it is dynamic (I can't know how many input files are there) and the maximum of record lengths among those generations is also not known in advance.

Dick: I don't have the privilage to change anything to the existing program that is producing the FB generations of different record lengths icon_sad.gif , because some other systems are dependent on those stupid output and they are running fine. And for reading the consolidated file also, is not a problem as finally we are dealing with a single file.

Regards,
Arnab
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Aug 07, 2007 4:19 pm
Reply with quote

Arnab.Mukherjee wrote:
Thanks Frank. But as Dick mentioned, the input file is all the generations and so it is dynamic (I can't know how many input files are there) and the maximum of record lengths among those generations is also not known in advance.
The max rec length is the max for any, not just the input. Max length expected by the input progs.

The number of COPYs (and their DDs) need to be determined, either manually or by a scan of the catalog looking at the count of generations in the GDG (sounds like a REXX question already posted?).
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Aug 07, 2007 4:56 pm
Reply with quote

I just love shops that are soooo clever that they use dynamic allocation to the point that they have no continuity.
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top