Page 1 of 1

Compare 2 files and write O/P accordingly

Posted: Mon Aug 31, 2009 10:17 pm
by gracemanoj
I have a requirement in which I have to compare today's and previous day's file.

The file LRECL is 479

If the record is new in today's file then I need to write to a output file of the same LRECL with a CODE 'A' in the 470th position. If a record in previous day's file is not present then I need to write to the same output file with the CODE 'D' in the 470th position. Also if the record in previous day's file of the same key doesn't match with the record in today's file then the output file should be written with the Code 'C' in 470th position.

There will be no duplicates in the file. Also the keys will be the first 38 bytes

Please let me know if we can write an ICETOOL for this

Thanks in advance

Posted: Tue Sep 01, 2009 8:11 pm
by Frank Yaeger
Please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files.

Posted: Tue Sep 01, 2009 8:19 pm
by Frank Yaeger
Kolusu already provided a solution for this on another help board. Please don't post the same question on multiple help boards.