Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1329 Location: Bamberg, Germany
|
|
|
|
To combine all your attempts, this one should work.
Code: |
//WHATEVER EXEC PGM=ICEMAN
//F1 DD DISP=OLD,DSN=&SYSUID..VB2004
//F2 DD DISP=OLD,DSN=&SYSUID..VB2004
//SYSOUT DD SYSOUT=*
//SORTOUT DD DISP=OLD,DSN=&SYSUID..VB2004
//SYSIN DD *
OPTION COPY
JOINKEYS F1=F1,FIELDS=(2005,1,A),SORTED,NOSEQCK
JOINKEYS F2=F2,FIELDS=(2005,1,A)
REFORMAT FIELDS=(F1:5,2000,F2:2006,4)
INREC IFTHEN=(WHEN=INIT,OVERLAY=(2005:SEQNUM,8,BI))
OUTFIL FNAMES=(SORTOUT),
OMIT=(1,3,CH,EQ,C'$F'),
REMOVECC,FTOV,
IFTHEN=(WHEN=(2005,8,BI,EQ,+1),
BUILD=(1,2000,/,C'$F COUNT',X,2001,4,BI,M11,LENGTH=6)),
IFTHEN=(WHEN=NONE,BUILD=(1,2000))
END
/*
//JNF1CNTL DD *
INREC IFTHEN=(WHEN=INIT,OVERLAY=(2005:X))
END
/*
//JNF2CNTL DD *
INREC IFTHEN=(WHEN=INIT,OVERLAY=(2006:4Z)),
IFTHEN=(WHEN=GROUP,BEGIN=(5,3,CH,EQ,C'$A'),END=(5,3,CH,EQ,C'$U'),
PUSH=(2010:ID=8),RECORDS=1),
IFTHEN=(WHEN=(2010,8,FS,EQ,NUM),OVERLAY=(2006:+1,BI,LENGTH=4))
SUM FIELDS=(2006,4,BI)
END
/* |
|
|