Hello everyone,
I am new to this site so please forgive any mistakes or incorrect etiquette.
I am new to DFSORT as well and am still busy reading the DFSORT Getting started guide as recommended by Frank. I am faced with an issue at present wherein I have two files, one is RECFM=FB,LRECL=80. This file continues unique values, sorted in ascending sequence and looks something like this:
1111111
1111112
1111123
1222222
1333321
1444211
........
The second file is: RECFM=VB, LRECL=32756. This file is also sorted and
(1) contains multiple instances of records that match the "keys" in the first file, and
(2) the corresponding "key values" begin at byte 11 (4 bytes for RDW and 6 bytes of useless data); eg: (RDW not shown)
aajhsh1111111followed by some data
aabhsa1111111followed by data
...z.a..1111112followed by data
ajhjad1111112followed by data
.,mzmn1111113followed by data
/././.1222222followed by data
khajah1234567followed by data
The matching fields which are bytes 1-7 in FB file and bytes 11-17 (after RDW and 6 bytes) is a packed decimal field.
The records in file 2 has to be matched against those in file 1 and if a match is found, then those records in file 2 must be discarded. So for example, all the records in file 2 with the following values in columns 11-17 must be dropped: 111111; 1111112 ; 1222222
(Five of the seven records in file 2 as per my example above). The remaining records are the ones I am interested in. Would be a nice to have to write out the "dropped" records to another file but this is not necessary at the moment.
Is there a way this can be done using ICETOOL? Any assistance will be appreciated.
Thanks.
Aadil