Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to cmpare 2 records using its copy structure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Mon Jun 01, 2009 5:16 pm    Post subject: How to cmpare 2 records using its copy structure
Reply with quote

Hi all,

I want ur help..
i have to compare 2 records of two different files, field by field using a cobol progra.
i have 2 i/p files with same record structure bt may have different values.

Now i want 2 find which field is differing out of these two file records.

ultimately i have to compare two records using their copybook. I cant check field by field as its a big file having record size of 30k.

i cud hv find out difference but i m unable to find out the exact field.

so can u plz suggest me a solution.

Thanks
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Jun 01, 2009 5:47 pm    Post subject:
Reply with quote

Sometimes it is necessary for a programmer to actually resort to writing a program. 30K records a somewhat large how many fields are in the records? By carefully formatting your if statements and such you could accomplish a lot by using cut and paste and change when you are writing the program.
Back to top
View user's profile Send private message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Mon Jun 01, 2009 5:52 pm    Post subject: Reply to: How to cmpare 2 records using its copy structure
Reply with quote

thts true...
but its having too big structure as well...and having many occurs
tht is why i came here for any good innovative solution...
if u kno any plz suggest me...
Back to top
View user's profile Send private message
Succor

New User


Joined: 20 Feb 2009
Posts: 96
Location: Bangalore :)

PostPosted: Mon Jun 01, 2009 5:54 pm    Post subject: Reply to: How to cmpare 2 records using its copy structure
Reply with quote

ajaybshukla,
Quote:
i have to compare 2 records of two different files, field by field using a cobol progra.
And then
Quote:
I cant check field by field as its a big file having record size of 30k.

So, is this a VSAM file or a sequential.For example if there are 5 records in file A and 10 records in then B will you have 50 iterations for the complete comparison?Please elaborate a little more on the requirement side.

WTH.
Back to top
View user's profile Send private message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Mon Jun 01, 2009 6:03 pm    Post subject: Reply to: How to cmpare 2 records using its copy structure
Reply with quote

i have 2 PS files
i have file 1 and file 2 having same record size 30k and same copybook or structure.
file 1 wid 1 record and file 2 wid 1record.
now i want to compare these 2 file records.
if we directly compare it wont work for me as i want field which is having difference.

i think this is very much clear.

thanks
Back to top
View user's profile Send private message
Succor

New User


Joined: 20 Feb 2009
Posts: 96
Location: Bangalore :)

PostPosted: Mon Jun 01, 2009 6:27 pm    Post subject: Reply to: How to cmpare 2 records using its copy structure
Reply with quote

Quote:
i think this is very much clear.

Thanks,It was always clear to you and to us.
Quote:
but its having too big structure as well...and having many occurs
It would be a one time effort and I would suggest you go by Craq's post.

WTH.
Back to top
View user's profile Send private message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Mon Jun 01, 2009 6:36 pm    Post subject: Reply to: How to cmpare 2 records using its copy structure
Reply with quote

hi..
that means there is no solution...neways thanks for ur help
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jun 01, 2009 7:12 pm    Post subject:
Reply with quote

between files having the same structure.

Then use File-Aid, SuperC, Comparex or Ecomp
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Jun 01, 2009 10:59 pm    Post subject:
Reply with quote

Hello,

If you are unwilling to write the code to compare field-by-field, you could write simpler code that would compare byte-for-byte and list the record number and the unequal displacements in the records of the ones that have one or more mis-matched bytes.

The output would be more difficult to work with, but you nearly completely avoid having to program. . .
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Jun 01, 2009 11:40 pm    Post subject:
Reply with quote

If the copy books are accurate and readable, in 6 hours I could have setup a lot of "IF" statements and displays.
Back to top
View user's profile Send private message
Succor

New User


Joined: 20 Feb 2009
Posts: 96
Location: Bangalore :)

PostPosted: Mon Jun 01, 2009 11:53 pm    Post subject: Reply to: How to cmpare 2 records using its copy structure
Reply with quote

Quote:
If the copy books are accurate and readable, in 6 hours I could have setup a lot of "IF" statements and displays.
By now ajaybshukla would have written the code ..its more than 6 hours icon_biggrin.gif.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us