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

Concatenation of 27 FB files depends on the avialability


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

New User


Joined: 15 May 2008
Posts: 9
Location: chennai

PostPosted: Thu Jun 17, 2010 6:45 pm
Reply with quote

Here is the requirement,

We have 27 input files to be concatenated to a 1 output file.
In that 27 files, 15 files LRECL = 9050 & 12 files LRECL = 3078.
We are not sure that all the 27 files will be available at all time.
Some files may be available and remaining may not available during run.

1. Is there any way to avoid the unavailable datasets in the SORTIN during run?
2. Is it possible to have the input files having LRECL=9050,3078 in a same sort step?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Jun 17, 2010 6:59 pm
Reply with quote

how to use BBCODE

also, use of the preview button - sort of like desk checking a program.
yeah, I know, unknown concept.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Jun 17, 2010 7:06 pm
Reply with quote

Rameshkumar.R wrote:
Is there any way to avoid the unavailable datasets in the SORTIN during run?


Yes, either use IDCAMS with a LISTCAT command for each of the datasets to determine if they are cataloged or not, or do the same process using the LISTCAT command in a batch TSO, REXX, or CLIST session.

Rameshkumar.R wrote:
Is it possible to have the input files having LRECL=9050,3078 in a same sort step?


You can't concatenate FB datasets with different LRECLS. They'll have to be assigned to different DD's, so you'll probably want to use ICETOOL for that step.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Jun 17, 2010 7:08 pm
Reply with quote

Quote:
Is it possible to have the input files having LRECL=9050,3078 in a same sort step?
Yes if VB, no if FB.
Quote:
Is there any way to avoid the unavailable datasets in the SORTIN during run?
Don't include the unavailable DDs in the concatenation?
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Thu Jun 17, 2010 7:25 pm
Reply with quote

You can use IDCAMS for availability.

Yes, you can concatenate files of different LRECL. To do that, you can either use OVERLAY or BUILD depending on your requirement.

However, please show us the sample input and output data if possible or atleast give us LRECL for the input and output with the field positions for each field.


Thanks,
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Jun 17, 2010 7:41 pm
Reply with quote

sqlcode1 wrote:
Yes, you can concatenate files of different LRECL. To do that, you can either use OVERLAY or BUILD depending on your requirement.
Could you please provide an example of how to use OVERLAY or BUILD on a concatenation of different FB lrecls that does not result in
ICE043A INVALID DATA SET ATTRIBUTES: ddname attribute - REASON CODE IS rsn
...
Reason code values (rsn) are as follows:
...
5 - Fixed length input data sets have different record lengths. Examples: Concatenated SORTIN data sets have RECFM=FB with LRECL=100 and RECFM=FB with LRECL=80. The SORTIN01 data set has RECFM=FB with LRECL=100 and the SORTIN02 data set has RECFM=FB with LRECL=135.
?
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Thu Jun 17, 2010 8:16 pm
Reply with quote

CICS Guy,

File1 :- 01-20
File2 :- 01-10

Using ICETOOL you can increase the file2 to 20 bytes.
Code:
OVERLAY=(20:X)


Now that your FILE1 and FILE2 are of the same length you can concatenate both of them but you would also need to align fields before you concatenate.

This is exactly what I have asked to OP in my earlier post.

Here is the sample ICETOOL job.

Code:
//STEP0100 EXEC PGM=ICETOOL                                             
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//I1       DD DISP=SHR,DSN=TSOID.TEST.LRECL10                         
//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(5,1),RLSE)           
//CON      DD DSN=*.T1,VOL=REF=*.T1,DISP=(OLD,PASS)                     
//         DD DISP=SHR,DSN=TSOID.TEST.LRECL20                         
//OUT      DD SYSOUT=*                                                 
//TOOLIN   DD *                                                         
  COPY FROM(I1) USING(CTL1)                                             
  COPY FROM(T1) TO(OUT)                                                 
//CTL1CNTL DD *                                                         
  OUTFIL FNAMES=T1,OVERLAY=(20:X)                                       
//*                                                                     



Thanks,
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: Thu Jun 17, 2010 8:29 pm
Reply with quote

Hello,

Why are there 2 T1 DD statements. . .
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Thu Jun 17, 2010 8:34 pm
Reply with quote

huh?

Sorry for using confusing names but one of them is I1 as in Input1 and the other is T1

Thanks,
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: Thu Jun 17, 2010 8:42 pm
Reply with quote

My bad. . . icon_redface.gif

Eyes only semi-functional today. . .

I'll clean this up later - maybe. . .

d
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Jun 17, 2010 8:47 pm
Reply with quote

when you are as old as we are,
Quote:
Eyes only semi-functional today. . .


is a good day!
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: Thu Jun 17, 2010 8:55 pm
Reply with quote

Quote:
is a good day!
As long as the plumbing works and we can still walk. . . icon_cool.gif

d
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 17, 2010 9:01 pm
Reply with quote

dick scherrer wrote:
As long as the plumbing works and we can still walk. . . icon_cool.gif
That comment was a bit below the belt icon_wink.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Jun 17, 2010 9:10 pm
Reply with quote

Some times we have to walk rather briskly, due to the plumbing.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Jun 17, 2010 9:18 pm
Reply with quote

To automatically handle possibly missing files, how about this:

1. create a GDG base
2. one step per file: copy it to the GDG (+1); if the step fails due to no input file, that's OK
3. input the GDG base only, which concatenates whatever generations are there

Note that this does not address the different LRECL issue.

BUT - this fails, because the non-existent dataset causes a JCL EROR, so the job does not run.

Anyone know how to avoid this?
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
Search our Forums:

Back to Top