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

Hi,

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.
Code:
----+----1----+----2----+----3----+----4----+----5----+
.......51........0530971350021138511000000....&.,000000
0310003FF10000000FFFFFFFFFFFFFFFFFFFFFFFFF0002504FFFFFF
03C001C514C00500C053097135002113851100000000770C0000000
,------------------------------------------------------
.......52........0303951350021420001000000...n.. 000000
0310003FF10001000FFFFFFFFFFFFFFFFFFFFFFFFF0019004FFFFFF
03C001C524C00200C030395135002142000100000000150C0000000
,------------------------------------------------------
.......53........0303951350021420455033106...n.. 000000
0310003FF10000000FFFFFFFFFFFFFFFFFFFFFFFFF0019004FFFFFF
03C001C534C00500C030395135002142045503310600250C0000000
,------------------------------------------------------
......ð00............&.............DEEMED RISK NN...
0310008FF00000000001250000000000000CCCDCC4DCED444DD0314
03C001C005C00000C00010C00000C00000C455454099220005503C0
,------------------------------------------------------
......ð51........0530971999521138511000000....&. 000000
0310008FF10001000FFFFFFFFFFFFFFFFFFFFFFFFF0012504FFFFFF
03C001C514C00000C053097199952113851100000000010C0000000
jaganmoni
 
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

Hello,

Do not post your questions on multiple forums.

The "other" one has been deleted.

d
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) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post