Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Please help with ICETOOL problem!!!

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

New User


Joined: 03 Jul 2006
Posts: 53

PostPosted: Sat Aug 29, 2009 11:16 pm    Post subject: Please help with ICETOOL problem!!!
Reply with quote

Hello there. Need a little assistance with ICETOOL
I actually solved the problem with SORT but I'm sure that ICETOOL can be more efficient and nice....
I have two files - main file and driver file. I have to skip everything from main file if there is matching record on driver file based on key. Second output file needs to have records which I skipped.

Main file is 1000 bytes, key is 6:10CH
Code:
----+----1----+----2----+----3----+----4---
*******************************************
XXXXX1111111111C7722XXXXXXXXXXXXXXXX....987
XXXXX1111111111C7722XXXXXXXXXXXXXXXX....987
XXXXX1111111111C7722XXXXXXXXXXXXXXXX....987
XXXXX1111111111C7722XXXXXXXXXXXXXXXX....987
XXXXX1111111111C7722XXXXXXXXXXXXXXXX....987
XXXXX1111111111C7722XXXXXXXXXXXXXXXX....987
XXXXX3333333333C7722XXXXXXXXXXXXXXXX....987
XXXXX3333333333C7722XXXXXXXXXXXXXXXX....987
XXXXX3333333333C7722XXXXXXXXXXXXXXXX....987
XXXXX3333333333C7722XXXXXXXXXXXXXXXX....987
XXXXX3333333333C7722XXXXXXXXXXXXXXXX....987
XXXXX5555555555C7722XXXXXXXXXXXXXXXX....987
XXXXX5555555555C7722XXXXXXXXXXXXXXXX....987
XXXXX5555555555C7722XXXXXXXXXXXXXXXX....987


Driver file is 10 bytes long and it's key is 1:10CH
Code:
----+----1
**********
1111111111
2222222222
3333333333
4444444444


So my output file 1 should have:
Code:
XXXXX5555555555C7722XXXXXXXXXXXXXXXX....987
XXXXX5555555555C7722XXXXXXXXXXXXXXXX....987
XXXXX5555555555C7722XXXXXXXXXXXXXXXX....987


Output file to should have:
Code:
XXXXX1111111111C7722XXXXXXXXXXXXXXXX....987
XXXXX1111111111C7722XXXXXXXXXXXXXXXX....987
XXXXX1111111111C7722XXXXXXXXXXXXXXXX....987
XXXXX1111111111C7722XXXXXXXXXXXXXXXX....987
XXXXX1111111111C7722XXXXXXXXXXXXXXXX....987
XXXXX1111111111C7722XXXXXXXXXXXXXXXX....987
XXXXX3333333333C7722XXXXXXXXXXXXXXXX....987
XXXXX3333333333C7722XXXXXXXXXXXXXXXX....987
XXXXX3333333333C7722XXXXXXXXXXXXXXXX....987
XXXXX3333333333C7722XXXXXXXXXXXXXXXX....987
XXXXX3333333333C7722XXXXXXXXXXXXXXXX....987



Any help would be greatly appreciated.

Thanks. icon_smile.gif
Back to top
View user's profile Send private message

rmd3003

New User


Joined: 03 Jul 2006
Posts: 53

PostPosted: Sun Aug 30, 2009 11:44 pm    Post subject: Reply to: Please help with ICETOOL problem!!!
Reply with quote

I was able to create first output file. But I'm stuck with second file were I write records which were omitted.

Code:
//STEP001  EXEC PGM=ICETOOL                                       
//TOOLMSG  DD SYSOUT=*                                             
//DFSMSG   DD SYSOUT=*                                             
//IN1      DD DSN=TESTFL.DRIVER.FILE,DISP=SHR             
//IN2      DD DSN=TESTFL.MAIN.FILE,DISP=SHR
//TMP1     DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(CYL,(50,10)),   
//            UNIT=SYSDA                                           
//OUT      DD SYSOUT=*                                             
//TOOLIN   DD *                                                   
 COPY FROM(IN1) TO(TMP1) USING(CP01)                               
 COPY FROM(IN2) TO(TMP1) USING(CP02)                               
 SPLICE FROM(TMP1) TO(OUT) ON(6,10,CH) WITH(6,10) KEEPNODUPS-     
 USING(CP03) KEEPBASE WITHALL                                     
/*                                                                 
//CP01CNTL DD *                                                   
 OUTREC FIELDS=(6:1,10,1001:C'11')                                 
 SUM FIELDS=NONE                                                   
//CP02CNTL DD *                                                   
  OUTREC FIELDS=(1,1000,1001:C'22')             
//CP03CNTL DD *                                 
  OUTFIL FNAMES=OUT,INCLUDE=(1001,2,CH,EQ,C'22')


Please show me how to write to second file records which were omitted.
Thanks. icon_smile.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Aug 31, 2009 1:37 am    Post subject:
Reply with quote

Hello,

From a previous post (The forum SEARCH is your friend icon_smile.gif ):
Quote:
check the smart DFSORT trick "Create files with matching and non-matching records"

http://www.ibm.com/support/docview.wss?rs=0&uid=isg3T7000094

See if this has what you need. . .
Back to top
View user's profile Send private message
rmd3003

New User


Joined: 03 Jul 2006
Posts: 53

PostPosted: Mon Aug 31, 2009 6:47 pm    Post subject: Reply to: Please help with ICETOOL problem!!!
Reply with quote

Thanks, I downloaded it but still struggling with writing to two files duplicates and non duplicates in the same step icon_cry.gif
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Aug 31, 2009 9:23 pm    Post subject:
Reply with quote

rmd3003,

The following DFSORT/ICETOOL JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICETOOL                                           
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//FB0010   DD DSN=Your input 10 byte fb file,DISP=SHR
//FB1000   DD DSN=Your input 1000 byte fb file,DISP=SHR
//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(X,Y),RLSE)         
//OUT1     DD SYSOUT=*                                                 
//OUT2     DD SYSOUT=*                                                 
//TOOLIN   DD *                                                       
  COPY FROM(FB0010) USING(CTL1)                                       
  COPY FROM(FB1000) USING(CTL2)                                       
  SORT FROM(T1) USING(CTL3)                                           
//CTL1CNTL DD *                                                       
  OUTFIL FNAMES=T1,BUILD=(6:1,10,1001:C'1')                           
//CTL2CNTL DD *                                                       
  OUTFIL FNAMES=T1,OVERLAY=(1001:C'2')                                 
//CTL3CNTL DD *                                                       
  SORT FIELDS=(6,10,CH,A)                                             
  OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(1003:SEQNUM,8,ZD,RESTART=(6,10))),
  IFTHEN=(WHEN=GROUP,BEGIN=(1003,8,ZD,EQ,1),PUSH=(1002:1001,1))       
  OUTFIL FNAMES=OUT1,BUILD=(1,1000),INCLUDE=(1001,2,ZD,EQ,22)         
  OUTFIL FNAMES=OUT2,BUILD=(1,1000),INCLUDE=(1001,2,ZD,EQ,21)         
/*
Back to top
View user's profile Send private message
rmd3003

New User


Joined: 03 Jul 2006
Posts: 53

PostPosted: Mon Aug 31, 2009 10:48 pm    Post subject: Reply to: Please help with ICETOOL problem!!!
Reply with quote

Skolusu, thank you very much icon_smile.gif . Simple and efficient.
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 Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us