Page 1 of 1

Program to compare two files in Natural

PostPosted: Sun Nov 24, 2013 4:53 pm
by diptisaini1
Hi,

Please provide me some sample program along with logic which used to compare two adabas file or non-adabas file ?

Thanks in advance.

Regards,
Dipti

Re: Program to compare two files in Natural

PostPosted: Sun Nov 24, 2013 9:55 pm
by steve-myers
diptisaini1 wrote:Hi,

Please provide me some sample program along with logic which used to compare two adabas file or non-adabas file ?

Thanks in advance.

Regards,
Dipti
You are asking for the work product of a professional. Professionals expect to be paid. If you are interested in paying a professional, leave a message here and someone may contact you using the private mail facility of this forum. Please be patient; few people seem to be willing to pay, so it may be some time before a qualified professional willing to perform this task will read your post.

Re: Program to compare two files in Natural

PostPosted: Sun Nov 24, 2013 10:37 pm
by enrico-sorichetti
with logic which used to compare two adabas file or non-adabas file ?

the logic to compare two files is here
http://ibmmainframes.com/about22649.html
the code is written in COBOL but should not be difficult to code the equivalent for a different language

Re: Program to compare two files in Natural

PostPosted: Mon Nov 25, 2013 8:52 am
by diptisaini1
I am preparing for an interview and normally this question is being asked in interview..
Appreciate your views.. Any help.... Thanks for your help.

Re: Program to compare two files in Natural

PostPosted: Mon Nov 25, 2013 10:34 pm
by dick scherrer
Hello,

As Enrico suggests, look at the topic he provided a link to.

This bit of code is rather straight forward and will work in every procedural language i've ever used.

If you see something that is not clear to you, post your doubt here.

Re: Program to compare two files in Natural

PostPosted: Tue Nov 26, 2013 1:54 pm
by RGZbrog
To compare Adabas file contents, I would extract the data via Adabas utility or Natural program, and pass the extracts to SuperC.

I wouldn't consider the posted COBOL program to be equivalent to a comparison, but if you need such a thing, a "Natural sequential match" program has been available for download for years. I know because I posted it.

If you don't need to see field value differences, just to know if two files are equivalent, then I recommend a "Natural checksum" program. An example is available for this, too.