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

Using ICETOOL to splice on more than 1 field


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

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Thu May 31, 2007 11:42 am
Reply with quote

Hi,

I have a requirement to to use two files as input and get the new records (unique) from the second file. I could do this using ICETOOL splice operator but I can do so on one field only. Please see the details below.

File1 and File2 have same layout (LRECl=22). the layout is given below. I want to get only those records of FILE2 that are not present in FILE1. (I dont need any duplicates of FILE2). To distinguish unique records of file2 from file 1 the following fields must be unique. -- WS-STORE , WS-LINE-NMBR, WS-MM ,WS-DD and WS-YR.

1 WS-OUTPUT-REC.
05 WS-STORE PIC S9(5) VALUE +0 COMP-3.
05 WS-MM PIC 9(2) VALUE ZEROS.
05 PIC X VALUE '/'.
05 WS-DD PIC 9(2) VALUE ZEROS.
05 PIC X VALUE '/'.
05 WS-YR PIC 9(4) VALUE ZEROS.
05 WS-LINE-NMBR PIC S9(5) VALUE +0 COMP-3.
05 WS-LINE-AMOUNT PIC S9(9)V99 VALUE +0 COMP-3.

If it was only I field I can do it using SPLICE , but how to SPLICE ON more than one fields.

I have the following TOOLIN for ICETOOL to pull records based on STORE only. Can u please modify it to Splice on the other fields as mentioned above?
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT12) ON(1,3,PD) WITH(25,1) -
USING(CTL3) KEEPNODUPS
/*

Thank you.
//CTL1CNTL DD *
INREC OVERLAY=(24:C'11')
/*
//CTL2CNTL DD *
INREC OVERLAY=(24:C'22')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT12,INCLUDE=(22,2,CH,EQ,C'12'),BUILD=(1,20)
OUTFIL FNAMES=OUT1,INCLUDE=(22,2,CH,EQ,C'11'),BUILD=(1,20)
OUTFIL FNAMES=OUT2,INCLUDE=(22,2,CH,EQ,C'22'),BUILD=(1,20)
/*
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu May 31, 2007 11:45 am
Reply with quote

You can use multiple ON in SPLICE statement.
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Thu May 31, 2007 11:52 am
Reply with quote

Can u please give me the syntax?
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu May 31, 2007 11:59 am
Reply with quote

SPLICE FROM(indd) TO(outdd) ON(p,m,f) ON(p,m,f) ON(p,m,f) -
WITH(p,m) ...

Refer to ibm site:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/6.13?DT=20050222160456
Back to top
View user's profile Send private message
arnab

New User


Joined: 13 Mar 2006
Posts: 59
Location: UK

PostPosted: Thu May 31, 2007 12:05 pm
Reply with quote

Thanks a lot Devzee.

It should work fine .

regards,
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: Thu May 31, 2007 8:17 pm
Reply with quote

arnab,

For complete details on the SPLICE operator of DFSORT's ICETOOL, see:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/6.13?DT=20060615185603

You can access all of the DFSORT books from:

Use [URL] BBCode for External Links
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 Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
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
Search our Forums:

Back to Top