MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compare two VSAM files

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
hdagar
Beginner


Joined: 18 May 2004
Posts: 5
Topics: 4

PostPosted: Tue May 18, 2004 3:46 am    Post subject: Compare two VSAM files Reply with quote

Hi,

I want to compare two VSAM which I can do using lot of tools like SUPERC,FILEAID,IDCAMS etc.

However requirement is such that I need the field name along with the field value in my compare results file.

Field names are stored in COBOL copybooks. There are different copybooks for different record types. We will always compare records of similar record type.
Both files are KSDS files with variable record length.

The problem is that if we were to compare two records field by field we would need to code say 100 IF statements for each field.
In addition we have about 100 different record formats which use different copybooks.

We tried using Fileaid with formatted compare and it worked for one type of record. However, we need our program to run in batch and should dynamically choose the layout format(copybook) based on the record type.

File-aid builds it's control statements while building the compare request. We do not know how to create those control statements and pass the copybook name into it for using as a record layout.

Is there any solution for this?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Tue May 18, 2004 7:35 am    Post subject: Reply with quote

Hdagar,

Can't you split the records into 'n' different files and then run the compare using the specfied layout? i.e Split each file into different files based on the record type.Now take these indivdual files and run the compare with the layout which matches the record type.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
hdagar
Beginner


Joined: 18 May 2004
Posts: 5
Topics: 4

PostPosted: Tue May 18, 2004 7:48 am    Post subject: Reply with quote

Thanks for the response.

I can certainly split the files according to Record types but that would create around 100 files and each file will be input to a step in JCL,which will result in around 100 steps in the JCL.

I am looking for something like if REC-TYPE ='1' get this copybook and compare the fields in Batch.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group