by bitbybit » Thu Oct 18, 2012 6:23 pm
Hi Kolusu,
It didn't work for me.
Here is my file1
#5 #6 +
PD 51:8 AN 59:155
<---+----1----+> <---+----1----+----2----+----3----+----4----+----5----
****** **** Top of data ****
=LGTH 96710211969104 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211969602 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211969704 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211969302 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211969406 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211969502 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211969208 .F.....F... ...{82..DRUGCRMK..... ...F.....F
****** **** End of data ****
and File2 is
#5 #6 +
PD 51:8 AN 59:155
<---+----1----+> <---+----1----+----2----+----3----+----4----+----5----
****** **** Top of data ****
=LGTH 96710211969100 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211969700 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211969800 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211969900 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211969400 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211961300 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211454400 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211969300 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211969200 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211961100 .F.....F... ...{82..DRUGCRMK..... ...F.....F
=LGTH 96710211961000 .F.....F... ...{82..DRUGCRMK..... ...F.....F
****** **** End of data ****
the field is starting at pos-51 and with RDW, it is 55, so I coded it as,
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//INA DD DSN=Your Input VB file1,DISP=SHR
//INB DD DSN=Your Input VB file2,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
JOINKEYS F1=INA,FIELDS=(55,6,A)
JOINKEYS F2=INB,FIELDS=(55,6,A)
REFORMAT FIELDS=(F1:1,4,5)
//*
My o/p file has 49 records??, it should only have records from F1 except for 96710211969502 and 96710211969602
Your help is greatly appreciated.
Thanks.