Compare two VB files and key has both packed and zoned decim

IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Compare two VB files and key has both packed and zoned decim

Postby jaganmoni » Fri Mar 04, 2011 7:59 pm


I am looking for help on the below query.
File1: Current day file
File2: Previous day file
I have two variable block files (current day and previous day) and the LRECL is 600.
File1: Current day file
File2: Previous day file
The key value starts from column 1 to 11.
This key has both packed data and zoned decimal data. I have to compare both the files only if the key has 140 in last two bytes of key.
In the below given example the first three records key is ending with 140 and the fourth record key is ending with 050.
If we have matching records (only for the keys which ends with 140) in both the files then I have two write this matching record in output file only if the value in 49th position is mismatch.
.......52........0303951350021420001000000...n.. 000000
.......53........0303951350021420455033106...n.. 000000
......ð00............&.............DEEMED RISK NN...
......ð51........0530971999521138511000000....&. 000000
Posts: 6
Joined: Tue Oct 28, 2008 12:13 am
Has thanked: 0 time
Been thanked: 0 time

Re: Compare two VB files and key has both packed and zoned d

Postby dick scherrer » Sat Mar 05, 2011 12:46 am


Do not post your questions on multiple forums.

The "other" one has been deleted.

User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Compare two VB files and key has both packed and zoned d

Postby Frank Yaeger » Sat Mar 05, 2011 2:33 am

Some questions:

What is the RECFM of your input files? You say "variable block files", but your example does not show the RDW. Are the records really VB?

Are you trying to match the two files by key, or record-by-record?

Please show a better example of the records in each input file and what you expect for output.

If you are matching by key: Can file1 have duplicate records within it? Can file2 have duplicate records within it? If so, show that in your example.

Feel free to represent your example records in EBCDIC rather than hex with just the relevant fields (key and position 49), e.g.

keyaa140  A
keybb140  B
Frank Yaeger - DFSORT Development Team (IBM) -
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at
User avatar
Frank Yaeger
Global moderator
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times



  • Related topics
    Last post