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
 

 

icetool problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
divya_maddi

New User


Joined: 03 Nov 2005
Posts: 33

PostPosted: Tue Jan 08, 2008 1:52 pm    Post subject: icetool problem
Reply with quote

IN1: File 1 has following records
1 1 1
1 1 2
3 1 1
4 1 5
6 1 1
7 1 3
7 1 4
7 1 5
8 1 9

IN2: File 2
2
6
7
8

OUT12: Now Outfile 1 should have

6 1 1
7 1 3
7 1 4
7 1 5
8 1 9

OUT1: Outfile 2 should have

1 1 1
1 1 2
3 1 1
4 1 5

please help... i tried using icetool as follows, but it is removing duplicates in the OUT1 file:

Code:

//T1 DD DSN=&&T1,DISP=(MOD,PASS),UNIT=SYSDA,SPACE=(TRK,(5,5))           
//TOOLIN DD *                                                           
 COPY FROM(IN1) TO(T1) USING(CTL2)                                     
 COPY FROM(IN2) TO(T1) USING(CTL1)                                     
 SPLICE FROM(T1) TO(OUT12) KEEPNODUPS WITH(21,1) -                     
 WITHALL WITH(21,1) WITH(1,1) ON(1,2,CH)                               
/*                                                                     
//CTL1CNTL DD *                                                         
 OUTREC FIELDS=(1,15,20:C'11')                                         
/*                                                                     
//CTL2CNTL DD *                                                         
 OUTREC FIELDS=(1,10,20:C'22')                                         
/*                                                                     
//CTL3CNTL DD *                                                         
 OUTFIL FNAMES=OUT12,INCLUDE=(20,2,CH,EQ,C'21'),OUTREC=(1:1,15,133:X)   
 OUTFIL FNAMES=OUT1,INCLUDE=(20,2,CH,EQ,C'11'),OUTREC=(1:1,20,133:X)   
/*                                                                     
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Jan 08, 2008 1:56 pm    Post subject:
Reply with quote

divya,

We expect some exaplanation regarding your requirement. Please remember its not possible for most of us to go trhu sort card and get the requirement.
Back to top
View user's profile Send private message
divya_maddi

New User


Joined: 03 Nov 2005
Posts: 33

PostPosted: Tue Jan 08, 2008 1:58 pm    Post subject:
Reply with quote

if the record is present in both input file 1 and 2 then write file1 record to outfile1 else write to outfile2. Note that outfile1 has duplicates and they need to be written in the output files.
Back to top
View user's profile Send private message
divya_maddi

New User


Joined: 03 Nov 2005
Posts: 33

PostPosted: Tue Jan 08, 2008 2:00 pm    Post subject:
Reply with quote

note that i have searched the dfsort/icetool forum but did not find any sample for this case..... none of them write the eliminated records to another file.... and most of them do not deal with duplicates.
Back to top
View user's profile Send private message
divya_maddi

New User


Joined: 03 Nov 2005
Posts: 33

PostPosted: Tue Jan 08, 2008 2:01 pm    Post subject:
Reply with quote

divya_maddi wrote:
if the record is present in both input file 1 and 2 then write file1 record to outfile1 else write to outfile2. Note that outfile1 has duplicates and they need to be written in the output files.


small correction. The key is the first byte and it is enough if the 1st byte of file 1 and 2 match to write to the outfile1
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jan 08, 2008 3:21 pm    Post subject:
Reply with quote

Code:
//STEP001  EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*     
//DFSMSG   DD SYSOUT=*     
//IN1      DD *           
1 1 1                     
1 1 2                     
1 1 2                     
3 1 1                     
4 1 5                     
6 1 1                     
7 1 3                     
7 1 4                     
7 1 5                     
8 1 9                     
/*                         
//IN2      DD *           
2                         
6                         
7                         
8                                                                     
/*                                                                     
//TMP1     DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA
//MATCH    DD SYSOUT=*                                                 
//UNMATCH  DD SYSOUT=*                                                 
//TOOLIN   DD *                                                       
 COPY FROM(IN2)  TO(TMP1) USING(CP01)                                 
 COPY FROM(IN1)  TO(TMP1) USING(CP02)                                 
 SPLICE FROM(TMP1) TO(MATCH) ON(1,1,CH) WITH(2,9) WITH(13,1) -         
      WITHALL KEEPBASE      USING(CP03) KEEPNODUPS                     
/*                                                                     
//CP01CNTL DD   *                                                     
  OUTREC BUILD=(1,10,12:C'11')                                         
/*                                                                     
//CP02CNTL DD   *                                                     
  OUTREC BUILD=(1,10,12:C'22')                                         
/*                                                                     
//CP03CNTL DD   *                                                     
  OUTFIL FNAMES=MATCH,INCLUDE=(12,2,CH,EQ,C'12'),BUILD=(1,10,133:X)   
  OUTFIL FNAMES=UNMATCH,INCLUDE=(12,2,CH,EQ,C'22'),BUILD=(1,10,133:X)
/*                                                                   

MATCH contains
Code:
6 1 1
7 1 3
7 1 4
7 1 5
8 1 9
UNMATCH contains
Code:
1 1 1
1 1 2
1 1 2
3 1 1
4 1 5
Back to top
View user's profile Send private message
divya_maddi

New User


Joined: 03 Nov 2005
Posts: 33

PostPosted: Tue Jan 08, 2008 4:02 pm    Post subject: Reply to: icetool problem
Reply with quote

thank you very much krisprem..... works perfectly
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 SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 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 Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm


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