comp_ashok
New User
Joined: 30 Nov 2007 Posts: 15 Location: India
|
|
|
|
Hi all,
My requirement is:
input1: fb, lrec=7
2222600
3333700
4444300
input2 : fb, lrec=8
11117000
22220100
33331200
output file:fb ,lrec=11
11110007000
22226000100
33337001200
44443000000
initial 4 bytes are same, next 3 from input file 1 , next 4 from input file2
if initial 4 bytes are not present in that file thyen place zeros. |
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Code: |
//*******************************************************
//STEP001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
2222600
3333700
4444300
/*
//IN2 DD *
11117000
22220100
33331200
/*
//TMP1 DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA
//BOTH DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN1) TO(TMP1) USING(CP01)
COPY FROM(IN2) TO(TMP1) USING(CP02)
SPLICE FROM(TMP1) TO(BOTH) ON(1,4,CH) WITH(8,4) -
KEEPNODUPS USING(CP03)
/*
//CP01CNTL DD *
OUTREC BUILD=(1,7,8:4C'0',12:C'11')
/*
//CP02CNTL DD *
OUTREC BUILD=(1,4,5:3C'0',8:5,4,12:C'22')
/*
//CP03CNTL DD *
OUTFIL FNAMES=BOTH,BUILD=(1,11)
/*
|
OUT:
Code: |
11110007000
22226000100
33337001200
44443000000
|
|
|