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: 6967
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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 5 Thu Apr 27, 2017 1:15 am
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


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