I have 2 files FILE1 and FIle2 both of 80 in length and the key fields are the first 12 bytes.I want to compare the file1 with file2 and those records which differ in keyfields that is the first 12 should come in a dsn as inserted records and those records which are both in file1 and file2 but which differ in fields other than the keyfields should come as updated records in another DSN can u suggest a sorting method using ICETOOL
If you need more specific help, please show an example of the records in each input file and the expected output. If input file1 has duplicate records, show that in the example. If input file2 has duplicate records, show that in the example. Be as specific as possible.
Will be more preicse about the requirement.I have 2 files FIle1 and file2.File1 is the older one file and file2 is the newer version.
I am Comparing the file2 with file1
The condition is
A)The records which are common to both file1 and file2 need to be eliminted
B)IF the key is only 12 in length starting from position one and filelength is 80,So whatever records which are differing which have the same key in file1 and file2 and which differ only from position 13-80 need to created in a seperate DSN as updated records
c) the records which differ are in file2 and which differ in key field with file1 should come as inserted records
d)the records which differ are in file1 and which differ in key field with file2 should come as Deleted records
IF we are giving the INREC OVERLAY=(81:C'11') does it adds a header '11' from the 81byte onwards for file 1 and '22' as a header for the File2 records.How does it SPLICE the records again to get updated records as '21'inserted as 22 and deleted as 11 .Could you share your thoughts on this
WITH(1,81) tells DFSORT to splice positions 1-81 from the second record with each key (overlay record) and position 82 from the first record with each key (base record). So for the first pair of records with the same key:
000000000001 AB ... 11
000000000001 AB ... 22
000000000001 AB ... 2
in positions 1-81 from the second record and the 1 in position 82 from the first record to get:
000000000001 AB ... 21
For records that only appear in file1, no splicing occurs and the id will be 11. KEEPNODUPS ensures we keep these non-dup records.
For records that only appear in file2, no splicing occurs and the id will be 22. KEEPNODUPS ensures we keep these non-dup records.
For complete information on the SPLICE operator of DFSORT's ICETOOL, see Chapter 6 of "z/OS DFSORT Application Programming Guide". You can access all of the DFSORT books online from:
But the actual Scenario is If we include a condition like that it will give the record in file2 as deleted record. But i want the record from file1 that got updated as when compared to file2 as updated record For example
so the inserted file should contain
The updated file should contain
001Iamher (since the record changed in position other than 1-3)
and the deleted should contain both the updated records in file1 as well as the deleted records from file1
001Iamhere(this is the record from file1 and not from file2)
If we include the condition as u specified it will produce a deleted records file as
001Iamher (Instead of the record from file1 which is 001Iamhere)