I am not getting the expected risult with SPLICE Tool:
File IN1 (LRECL=200,RECFM=FB) - Match Key (33,5)
File IN2 (LRECL=040,RECFM=FB) - Match Key (6,5)
File OUT(LRECL=207,RECFM=FB)
If key matches (IN1 and IN2)then i want the byte in position 11:1 of IN2 in output (OUT) at position 206 and a fix character 'S' at position 207
Input:
IN1 -> EE11087.FIDI.UNLOAD.FLRS10 :
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
G1FS000940000000112130498001 TS217 0000000000000000005000000000000000S2011031834686 C1000000009824310000000000000000500020080311102012013014244530349 P624934 0000000000000000
G1FS000940000000112130498001 TS217 0000000000000000005000000000000000S2012020634686 C1000000009824310000000000000000500020110208102012013014244530349 P624934 0000000000000000
G1FS000940000000112130498001 TS217 0000000000000000005000000000000000S2011031834686 C1000000009824310000000000000000500020080311102012013014244530349 P624934 0000000000000000
G1FS000940000000112130498001 TS217 0000000000000000005000000000000000S2012020634686 C1000000009824310000000000000000500020110208102012013014244530349 P624934 0000000000000000
IN2 -> EE11087.FIDI.UNLOAD.FLRSTFK :
----+----1----+----2----+----3----+----4
00094TS217S6007SSN00000SN
00094TS217S6007SSN00000SN
Output (OUT) :
i am getting spaces at position (206:2) on the first record, intead of expected 'SS'
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+--
TS217G1FS000940000000112130498001 TS217 0000000000000000005000000000000000S2011031834686 C1000000009824310000000000000000500020080311102012013014244530349 P624934 0000000000000000
TS217G1FS000940000000112130498001 TS217 0000000000000000005000000000000000S2011031834686 C1000000009824310000000000000000500020080311102012013014244530349 P624934 0000000000000000 SS
TS217G1FS000940000000112130498001 TS217 0000000000000000005000000000000000S2011031834686 C1000000009824310000000000000000500020080311102012013014244530349 P624934 0000000000000000
TS217G1FS000940000000112130498001 TS217 0000000000000000005000000000000000S2011031834686 C1000000009824310000000000000000500020080311102012013014244530349 P624934 0000000000000000 SS
Expected Output (OUT) :
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+--
TS217G1FS000940000000112130498001 TS217 0000000000000000005000000000000000S2011031834686 C1000000009824310000000000000000500020080311102012013014244530349 P624934 0000000000000000 SS
TS217G1FS000940000000112130498001 TS217 0000000000000000005000000000000000S2011031834686 C1000000009824310000000000000000500020080311102012013014244530349 P624934 0000000000000000 SS
TS217G1FS000940000000112130498001 TS217 0000000000000000005000000000000000S2011031834686 C1000000009824310000000000000000500020080311102012013014244530349 P624934 0000000000000000 SS
TS217G1FS000940000000112130498001 TS217 0000000000000000005000000000000000S2011031834686 C1000000009824310000000000000000500020080311102012013014244530349 P624934 0000000000000000 SS
ICETOOL :
//*--------------------------------------------------------------------*
//* ICETOOL SPLICE
//*--------------------------------------------------------------------*
//STEP60 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=EE11087.FIDI.UNLOAD.FLRS10,DISP=SHR
//IN2 DD DSN=EE11087.FIDI.UNLOAD.FLRSTFK,DISP=SHR
//TMP1 DD DSN=&&TEMP1,DISP=(MOD,PASS),
// SPACE=(CYL,(150,150),RLSE),UNIT=SYSDA
//OUT DD DSN=EE11087.FIDI.OUT.SPLICE,
// DISP=(,CATLG),
// SPACE=(CYL,(150,150),RLSE),
// DCB=(LRECL=207,RECFM=FB)
//DFSPARM DD *
OPTION SOLRF
/*
//TOOLIN DD *
COPY FROM(IN1) TO(TMP1) USING(CPY1)
COPY FROM(IN2) TO(TMP1) USING(CPY2)
SPLICE FROM(TMP1) TO(OUT) ON(1,05,CH) WITH(206,02) WITHALL
/*
//CPY1CNTL DD *
OUTREC FIELDS=(1:33,5,6:1,200,206:C' ')
/*
//CPY2CNTL DD *
OUTREC FIELDS=(6,5,200X,206:11,1,207:C'S')
/*
//
//* ICETOOL SPLICE
//*--------------------------------------------------------------------*
//STEP60 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=EE11087.FIDI.UNLOAD.FLRS10,DISP=SHR
//IN2 DD DSN=EE11087.FIDI.UNLOAD.FLRSTFK,DISP=SHR
//TMP1 DD DSN=&&TEMP1,DISP=(MOD,PASS),
// SPACE=(CYL,(150,150),RLSE),UNIT=SYSDA
//OUT DD DSN=EE11087.FIDI.OUT.SPLICE,
// DISP=(,CATLG),
// SPACE=(CYL,(150,150),RLSE),
// DCB=(LRECL=207,RECFM=FB)
//DFSPARM DD *
OPTION SOLRF
/*
//TOOLIN DD *
COPY FROM(IN1) TO(TMP1) USING(CPY1)
COPY FROM(IN2) TO(TMP1) USING(CPY2)
SPLICE FROM(TMP1) TO(OUT) ON(1,05,CH) WITH(206,02) WITHALL
/*
//CPY1CNTL DD *
OUTREC FIELDS=(1:33,5,6:1,200,206:C' ')
/*
//CPY2CNTL DD *
OUTREC FIELDS=(6,5,200X,206:11,1,207:C'S')
/*
//
Thanks.