Page 2 of 2

Re: maching of files using ICETOOL

PostPosted: Tue Apr 29, 2008 2:01 pm
by pulcinella
Thanks Frank, I think that undestand...
But If i want join three files (the third file are 42 position's and the key is the same 12 position (only work with 30 last position because the first 12 are the key), Could i be?...

//STEP032 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1
//IN2 DD DSN=... input file2
//IN3 DD DSN=... input file2
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=... output file
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
COPY FROM(IN3) TO(T1) USING(CTL3)
SPLICE FROM(T1) TO(OUT) ON(1,12,CH) -
WITH(388,7)
//CTL1CNTL DD *
INREC OVERLAY=(394:X)
//CTL2CNTL DD *
INREC BUILD=(1,12,388:13,7)
//CTL3CNTL DD *
INREC BUILD=(1,12,388:13,7,395:13,30)
/*

Re: maching of files using ICETOOL

PostPosted: Tue Apr 29, 2008 9:26 pm
by Frank Yaeger
Taking a quick look, I think you would need to change the SPLICE operator to:

SPLICE FROM(T1) TO(OUT) ON(1,12,CH) -
  WITHEACH WITH(388,7) WITH(395,30)


If that doesn't do it, let me know and I'll take a better look. Some example input and output records would help.