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
 

 

Copy all the generations to a single dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Copy all the generations to a single dataset
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: 3158
Location: Tucson AZ

PostPosted: Tue Aug 07, 2007 2:47 am    Post subject:
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    Post subject: Re: Copy all the generations to a single dataset
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: 3158
Location: Tucson AZ

PostPosted: Tue Aug 07, 2007 4:20 am    Post subject:
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    Post subject: Re: Copy all the generations to a single dataset
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: 3158
Location: Tucson AZ

PostPosted: Tue Aug 07, 2007 4:45 am    Post subject:
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    Post subject: Re: Copy all the generations to a single dataset
Reply with quote

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

Site Director


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

PostPosted: Tue Aug 07, 2007 7:09 am    Post subject:
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    Post subject: Re: Copy all the generations to a single dataset
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: 3158
Location: Tucson AZ

PostPosted: Tue Aug 07, 2007 4:19 pm    Post subject: Re: Copy all the generations to a single dataset
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: 6968
Location: porcelain throne

PostPosted: Tue Aug 07, 2007 4:56 pm    Post subject:
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    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 Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm


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