Kolusu, this is great - I did not think this could be done, and it works so
well. The changed format is fine, as that is easy to understand. Thanks so much
for teaching me along the way!
Now let me ask, is there a way to incorporate the Sort extract that creates
either or both of the files into the same step? I have them running as separate
steps to create the files you used in the Join. For example, here is the
program that creates the file you called APAR (this is the more dynamic input):
//SYSIN DD *
SORT FIELDS=(01,10,CH,A)
INCLUDE COND=(001,133,SS,EQ,C'DB00248I')
INREC IFTHEN=(WHEN=INIT,
BUILD=(001,133,SQZ=(SHIFT=LEFT,MID=C' '))),
IFTHEN=(WHEN=(40,40,SS,EQ,C'('),
PARSE=(%01=(STARTAFT=C', ',ENDBEFR=C'(',FIXLEN=8),
%02=(ENDBEFR=C')',FIXLEN=8),
%=(STARTAFT=BLANKS,ENDBEFR=BLANKS),
%03=(ENDBEFR=C'.',FIXLEN=2),
%04=(ENDBEFR=BLANKS,FIXLEN=1),
%05=(ENDBEFR=BLANKS,FIXLEN=7)),
BUILD=(%01,X, # Module
%02,X, # Subprogram
%03,%04,X, # Version
%05, # Last APAR
80:X)), # Blank fill
IFTHEN=(WHEN=(40,40,SS,NE,C'('),
PARSE=(%06=(STARTAFT=C', ',ENDBEFR=BLANKS,FIXLEN=8),
%=(ENDBEFR=BLANKS),
%07=(ENDBEFR=C'.',FIXLEN=2),
%08=(ENDBEFR=BLANKS,FIXLEN=1),
%09=(ENDBEFR=BLANKS,FIXLEN=7)),
BUILD=(%06,10X, # Module
%07,%08,X, # Version
%09, # Last APAR
80:X)) # Blank fill
*
OUTREC IFTHEN=(WHEN=(23,1,CH,EQ,C' '),OVERLAY=(40:C'BASE ')),
IFTHEN=(WHEN=(23,1,CH,NE,C' '),OVERLAY=(40:23,8))
*
OUTFIL IFTHEN=(WHEN=(10,1,CH,NE,C' '),
BUILD=(01:10,08,X,
10:19,03,X,
14:40,08,X,
23:01,16,SQZ=(SHIFT=LEFT,MID=C'(',TRAIL=C')'),
133:X)),
IFTHEN=(WHEN=(10,1,CH,EQ,C' '),
BUILD=(01:01,08,X,
10:19,03,X,
14:40,08,X,
23:01,08,X,
133:X))
/*
If this could be incorporated into the same JOIN step, that would be great, but
if not, a three-step SORT job is also fine.
Don
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN