Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Help needed in Icetool.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Help needed in Icetool.
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    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Mon Oct 12, 2009 8:59 pm    Post subject:
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    Post subject: Reply to: Help needed in Icetool.
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 Moderator


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

PostPosted: Tue Oct 13, 2009 9:24 pm    Post subject:
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:

http://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    Post subject: Reply to: Help needed in Icetool.
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am
No new posts Help Needed with View Direct shailesh_do CA Products 2 Wed Jul 13, 2016 10:39 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us