ICETOOL-SPLICE 3 Files in, 1 out



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

ICETOOL-SPLICE 3 Files in, 1 out

Postby smfden » Thu Mar 19, 2009 9:58 pm

Hello, I have 3 input files, with the first being the base and the 2 others potentially having additional data for each base record.
I would like to splice them into 1 output file. There are no dupes, and there is a key in all 3 files. I would like to keep all records in the base file.

//IN1 DD * 
2432     REE
2433     REE
2434     REF
2436     REJ
2437     RRE
2477     RER
//IN2 DD * 
2432      MG
2437      MG
//IN3 DD * 
2437      CD
2477      CD


I would like to get results like this:
2432     REE     MG
2433     REE           
2434     REF           
2436     REJ           
2437     RRE     MG    CD
2477     RER           CD



I can get close with following:
  COPY FROM(IN1) TO(TEMP1) USING(CTL1)           
  COPY FROM(IN2) TO(TEMP1) USING(CTL2)           
  COPY FROM(IN3) TO(TEMP1) USING(CTL3)           
  SPLICE FROM(TEMP1) TO(OUTFILE) -               
     ON(1,4,CH) WITHEACH KEEPNODUPS WITH(18,2) -
                       WITH(24,2) USING(CTL4)   
 //CTL1CNTL DD *                                 
    OUTREC FIELDS=(1,12,25:X)                   
 //CTL2CNTL DD *                     
    OUTREC FIELDS=(1,4,18:11,2,25:X)
 //CTL3CNTL DD *                     
    OUTREC FIELDS=(1,4,24:11,2)     


However, it drops the value CD from IN3 for the 2477 record. giving me:
2432     REE     MG     
2433     REE               
2434     REF               
2436     REJ               
2437     RRE     MG    CD
2477     RER   


Hope that makes sense...any help would be appreciated. Thanks!
smfden
 
Posts: 2
Joined: Thu Mar 19, 2009 9:29 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ICETOOL-SPLICE 3 Files in, 1 out

Postby Frank Yaeger » Thu Mar 19, 2009 11:25 pm

Use WITHANY instead of WITHEACH.

WITHANY is available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008). If you don't have that PTF installed, ask your System Programmer to install it (it's free). For complete details on the new WITHANY function and the other new functions available with PTF UK90013, see:

http://www.ibm.com/systems/support/stor ... /mvs/ugpf/
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: ICETOOL-SPLICE 3 Files in, 1 out

Postby smfden » Fri Mar 20, 2009 1:31 am

hmm. I get an empty dataset using WITHANY...so, it must not be installed yet.
I will request our admin to install that PTF...hopefully he can get to it quickly. I will definitely use that function a lot.

Thanks for your fast reply!
smfden
 
Posts: 2
Joined: Thu Mar 19, 2009 9:29 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ICETOOL-SPLICE 3 Files in, 1 out

Postby Frank Yaeger » Fri Mar 20, 2009 2:02 am

If you didn't have the PTF, you would get an error message for WITHANY in TOOLMSG.
Perhaps you missed it.

            SPLICE FROM(TEMP1) TO(OUTFILE) -               
               ON(1,4,CH) WITHANY KEEPNODUPS WITH(18,2) -   
                              $                             
ICE604A 0 ERROR IN KEYWORD, PARAMETER, OR DELIMITER         
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post