Page 1 of 1

Compare data from two files with utility

PostPosted: Mon Jul 19, 2010 3:51 pm
by rahul_phaltan
I have 2 files,
File 1 – Control file (with only one record)
Data –
0000319072010

File 2 – Main file
Data –
000000000000000019072010 (Header)
123123231
123123123
123123123
999999999999999999900003 (Trailer)

I need to compare these two files if date from File 1 is equal to date from File 2 – ‘19072010’
And count from file1 is equal to count from file 2 – ‘00003’

If the date and count is matching, process the file.
If not matching, show an error message.

Re: Compare data from two files with utility

PostPosted: Mon Jul 19, 2010 9:05 pm
by Frank Yaeger
process the file.


Process the file how? Copy it? Sort it? Something else?

If not matching, show an error message.


What error message?

What is the RECFM and LRECL of each input file? What is the starting position, length and format of each relevant field?