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 SPLICING - Help needed in VB file

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

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Sat Dec 01, 2007 1:22 am    Post subject: ICETOOL SPLICING - Help needed in VB file
Reply with quote

Hi,
I have a VB file and FB file to compare and provide 3 files.
Input file1 - FB,Lrecl=8000
Input file2 - VB,lrecl=268
Output files:
Match - DCB-same as File2
Only f1 - DCB-same as File1
Onlyf2 - DCB-same as file2
I tried the following JCL. It ended fine, but am not getting the desired output.
The match file is empty.
sample data:
File1:
Code:
Account-Nbr
(1,8,CH)
14006260
16104027
16108015
16108015
16108015
16108015
16108015
16108015
16108015
16130600
16130600
16130600
16130609
16130609
16130609
23B00797
23B00797
23B00797
23B00797
23B00797
23B00797
23B00797
23B00797
23B00797
23B00797


File2:
Code:
Acct/Nbr
(1,8,CH)
00000001
16104027
16104027
16104027
00000006
00000007
00000008
00000009
00000010
00000011
16108015
16108015
00000014
23B00797
00000016
00000017
00000020
00000029
00000031
00000036
00000038
00000039
00000040
00000041
00000043


My output : Match file should be VB-268 with the following records:
Code:
16104027
16104027
16104027
16108015
16108015
23B00797

There can be duplictes in both the files and I need all of them in the respective output files. Example, my output MATCH file should have all the duplicate records from FILE2.

This is my JCL
Code:
//S1 EXEC PGM=ICETOOL                                           
//TOOLMSG DD SYSOUT=*                                           
//DFSMSG DD SYSOUT=*                                           
//*                                                             
//IN1 DD DISP=SHR,DSN=XXXXXXX.File1     
//*   FB 8000                                                   
//IN2 DD DISP=SHR,DSN=XXXXXXX.File2     
//*  VB 268                                                     
//T1 DD DSN=&&T1,UNIT=PRIME,SPACE=(CYL,(1,1),RLSE),             
//       DISP=(MOD,PASS),DCB=(RECFM=VB,LRECL=8006,BLKSIZE=0)   
//*                                                             
//*                                                             
//MATCH DD DISP=SHR,DSN=XXXXXXXX.MTCHNAM 
//*  VB 268                                                     
//ONLYF1 DD DISP=SHR,DSN=XXXXXXXX.ONLYF1
//* FB 8000                                                     
//ONLYF2 DD DISP=SHR,DSN=XXXXXXXX.ONLYF2
//*  VB 268                                     
//*                                             
//DFSPARM DD *                                 
  OPTION SOLRF                                 
/*                                             
//*                                             
//TOOLIN DD *                                   
COPY FROM(IN2) TO(T1) USING(CTL2)               
COPY FROM(IN1) TO(T1) USING(CTL1)               
SPLICE  FROM(T1) TO(MATCH) ON(5,8,CH) -         
  WITHALL WITH(1,8006) USING(CTL3)             
/*                                             
//CTL1CNTL DD *                                 
  OUTFIL FNAMES=(T1),FTOV,                     
        BUILD=(8001:C'VV')                     
/*                                             
//CTL2CNTL DD *                                 
  INREC OVERLAY=(8001:C'BB')                   
/*                                             
//CTL3CNTL DD *                                 
  OUTFIL FNAMES=ONLYF1,INCLUDE=(8001,2,CH,EQ,C'VV'),VTOF,   
    BUILD=(1,8000)                                         
  OUTFIL FNAMES=ONLYF2,INCLUDE=(8001,2,CH,EQ,C'BB'),       
    BUILD=(1,268)                                           
  OUTFIL FNAMES=MATCH,INCLUDE=(8001,2,CH,EQ,C'BV'),         
    BUILD=(1,268)                                           
/*                                                         
//                                                         
//*                                                         


Pls let me know where I went wrong. Any pointers will be of great help.
Thanks and appreciate everyone's time.
-Viji
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: Sat Dec 01, 2007 2:53 am    Post subject:
Reply with quote

For starters, you have:

Code:

  OUTFIL FNAMES=(T1),FTOV,                     
        BUILD=(8001:C'VV')


which gives you a VB record without the account number.

You're also putting the id at the end of the VB record which unnecessarily expands all of the VB records to 8006 bytes. And you have duplicates in both files, but you're not taking care of that.

I believe the following DFSORT/ICETOOL job will give you what you want. I used concatenation with referback (the CON DD) ... watch out for the system restriction on that described in the second bullet at:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/1.8.3.1?SHELF=&DT=20060615185603&CASE=

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN1 DD DISP=SHR,DSN=XXXXXXX.File1
//*   FB 8000
//IN2 DD DISP=SHR,DSN=XXXXXXX.File2
//*  VB 268
//MATCH DD DISP=SHR,DSN=XXXXXXXX.MTCHNAM,LRECL=268
//*  VB 268
//ONLYF1 DD DISP=SHR,DSN=XXXXXXXX.ONLYF1
//* FB 8000
//ONLYF2 DD DISP=SHR,DSN=XXXXXXXX.ONLYF2,LRECL=268
//*  VB 268
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//T2 DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//T3 DD DSN=&&T3,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//CON DD DSN=*.T3,VOL=REF=*.T3,DISP=(OLD,PASS)
//    DD DSN=*.T2,VOL=REF=*.T2,DISP=(OLD,PASS)
//TOOLIN DD *
COPY FROM(IN1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(MATCH) ON(7,8,CH) KEEPBASE KEEPNODUPS VLENOVLY -
  WITHALL WITH(6,8001) USING(CTL3)
SPLICE FROM(CON) TO(ONLYF1) ON(7,8,CH) KEEPBASE KEEPNODUPS VLENOVLY -
  WITHALL WITH(6,8001) USING(CTL4)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=(T1,T2),FTOV,BUILD=(C'BB',1,8000)
/*
//CTL2CNTL DD *
  INREC BUILD=(1,4,5:C'VV',7:5)
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=MATCH,INCLUDE=(5,2,CH,EQ,C'BV'),
    BUILD=(1,4,5:7)
  OUTFIL FNAMES=T3,INCLUDE=(5,2,CH,EQ,C'BV'),
    OVERLAY=(5:C'QQ')
  OUTFIL FNAMES=ONLYF2,INCLUDE=(5,2,CH,EQ,C'VV'),
    BUILD=(1,4,5:7)
/*
//CTL4CNTL DD *
  OUTFIL FNAMES=ONLYF1,INCLUDE=(5,2,CH,EQ,C'BB'),
    VTOF,BUILD=(7,8000)
/*
Back to top
View user's profile Send private message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Sat Dec 01, 2007 3:19 am    Post subject: Reply to: ICETOOL SPLICING - Help needed in VB file
Reply with quote

WOW....Its perfect....your solution is amazing!

Thanks...Its really going to be a long way for me to write this kinda sort card all my own with concatenation and two splicing...am little scared now!!!

As always u rock..
Thanks Frank.
Viji icon_smile.gif
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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