IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Help needed in Icetool.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bijoybabu83

New User


Joined: 15 Jan 2007
Posts: 36
Location: Kerala

PostPosted: Mon Oct 12, 2009 5:28 pm
Reply with quote

I have two files, Both 133 Bytes. I need to compate these two files.

1. Compate the two files FILE1 and FILE2 based on key on (9,45) of both files.

2. If a mathching key is found, then need to move a) 1 TO 88 of FILE1 to output file and then move 89,10 of FILE2 to output file.

Can anyone help me in writing an ice tool for this.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Oct 12, 2009 5:46 pm
Reply with quote

Quote:
Can anyone help me in writing an ice tool for this.

could take a while. No one has ever asked for a solution to this problem.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Mon Oct 12, 2009 8:34 pm
Reply with quote

SPLICE function of ICETOOL can achieve the expecting result.

You can refer to DFSort manual for the usage of SPLICE.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Oct 12, 2009 8:59 pm
Reply with quote

bbb,

Please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.
Back to top
View user's profile Send private message
bijoybabu83

New User


Joined: 15 Jan 2007
Posts: 36
Location: Kerala

PostPosted: Tue Oct 13, 2009 5:51 pm
Reply with quote

Thank you Dejhunzu and Frank Yeagar for your help.
I created an ICETOOL for this myself. It is working perfectly now.
Please see the code :-
Code:

//STEP01   EXEC PGM=ICETOOL                                         
//TOOLMSG   DD  SYSOUT=*                                             
//DFSMSG    DD  SYSOUT=*                                             
//INPUT1    DD DISP=SHR,DSN=IHC$017.CBF.EXTRACT.FIL99               
//INPUT2    DD DISP=SHR,DSN=IHC$017.CBF.EXTRACT.FIL98               
//T1        DD DSN=&&EXT100,                                         
//             DISP=(,PASS),                               
//             UNIT=SYSDA,                                           
//             SPACE=(133,(13,1),RLSE)                               
//T2        DD DSN=&&EXT200,                                         
//             DISP=(,PASS),                               
//             UNIT=SYSDA,                                           
//             SPACE=(133,(13,1),RLSE)                               
//CONCT1    DD DSN=*.T1,VOL=REF=*.T1,DISP=(OLD,PASS)         
//          DD DSN=*.T2,VOL=REF=*.T2,DISP=(OLD,PASS)         
//OUTPUT1   DD DSN=IHC$017.CBF.EXTRACT.FIL100,                       
//             DISP=(,CATLG,DELETE),                                 
//             UNIT=SYSALLDA,                                       
//             SPACE=(CYL,(50,100),RLSE)
//TOOLIN   DD *                                                     
  COPY FROM(INPUT1) TO(T1) USING(CTL1)                               
  COPY FROM(INPUT2) TO(T2) USING(CTL2)                               
  SPLICE FROM(CONCT1) WITHALL -                                     
    ON(9,45,CH) -               
    ON(9,45,CH) -                                     
    WITH(64,10) -                                     
    TO(OUTPUT1)                                       
/*                                                 
//CTL1CNTL  DD  *                                   
  OUTREC FIELDS=(1:1,8,9:9,45,54:79,10,70X)         
/*                                                 
//CTL2CNTL  DD  *                                   
  OUTREC FIELDS=(8X,9:9,45,10X,64:79,10,60X)       
/*                                                                                         

This jcl is perfectly working for me.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Oct 13, 2009 9:24 pm
Reply with quote

You should NOT use that type of concatenation with referback as it can run afoul of a system restriction that can cause records to be lost. Instead, it's better to use a one MOD temp data set like this:

Code:

//STEP01   EXEC PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//INPUT1    DD DISP=SHR,DSN=IHC$017.CBF.EXTRACT.FIL99
//INPUT2    DD DISP=SHR,DSN=IHC$017.CBF.EXTRACT.FIL98
//T1        DD DSN=&&EXT100,
//             DISP=(MOD,PASS),
//             UNIT=SYSDA,
//             SPACE=(133,(13,1),RLSE)
//OUTPUT1   DD DSN=IHC$017.CBF.EXTRACT.FIL100,
//             DISP=(,CATLG,DELETE),
//             UNIT=SYSALLDA,
//             SPACE=(CYL,(50,100),RLSE)
//TOOLIN   DD *
  COPY FROM(INPUT1) TO(T1) USING(CTL1)
  COPY FROM(INPUT2) TO(T1) USING(CTL2)
  SPLICE FROM(T1) WITHALL -
    ON(9,45,CH) -
    ON(9,45,CH) -
    WITH(64,10) -
    TO(OUTPUT1)
/*
//CTL1CNTL  DD  *
  OUTREC FIELDS=(1:1,8,9:9,45,54:79,10,70X)
/*
//CTL2CNTL  DD  *
  OUTREC FIELDS=(8X,9:9,45,10X,64:79,10,60X)
/*


For more on the system restriction, see the second bullet at this link:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA40/1.8.3.1?SHELF=&DT=20090527161936&CASE=
Back to top
View user's profile Send private message
bijoybabu83

New User


Joined: 15 Jan 2007
Posts: 36
Location: Kerala

PostPosted: Wed Oct 14, 2009 6:26 pm
Reply with quote

Thank you so much franked. That worked.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
Search our Forums:

Back to Top