Program to compare two files in Natural

Software AG's platform-independent programming language with full support for open-source and Internet applications
diptisaini1
Posts: 4
Joined: Fri Jun 26, 2009 12:01 am
Skillset: cobol,jcl,vsam,db2,cics
Referer: from my freind

Program to compare two files in Natural

Postby diptisaini1 » Sun Nov 24, 2013 4:53 pm

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

steve-myers
Global moderator
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Skillset: Assembler, JCL, utilities
Referer: zos.efglobe.com

Re: Program to compare two files in Natural

Postby steve-myers » Sun Nov 24, 2013 9:55 pm

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.

enrico-sorichetti
Global moderator
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
Referer: www.ibmmainframes.com

Re: Program to compare two files in Natural

Postby enrico-sorichetti » Sun Nov 24, 2013 10:37 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

diptisaini1
Posts: 4
Joined: Fri Jun 26, 2009 12:01 am
Skillset: cobol,jcl,vsam,db2,cics
Referer: from my freind

Re: Program to compare two files in Natural

Postby diptisaini1 » Mon Nov 25, 2013 8:52 am

I am preparing for an interview and normally this question is being asked in interview..
Appreciate your views.. Any help.... Thanks for your help.

User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am

Re: Program to compare two files in Natural

Postby dick scherrer » Mon Nov 25, 2013 10:34 pm

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.
Hope this helps,
d.sch.

User avatar
RGZbrog
Posts: 101
Joined: Mon Nov 23, 2009 1:34 pm
Skillset: Natural, Adabas, Predict, Natural Security, Construct, EntireX, SPoD, NaturalONE
Referer: SAG Developer Forum
Location: California, USA
Contact:

Re: Program to compare two files in Natural

Postby RGZbrog » Tue Nov 26, 2013 1:54 pm

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.


  • Similar Topics
    Replies
    Views
    Last post