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
/*