View previous topic :: View next topic |
Author |
Message |
hdagar Beginner
Joined: 18 May 2004 Posts: 5 Topics: 4
|
Posted: Tue May 18, 2004 3:46 am Post subject: Compare two VSAM files |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue May 18, 2004 7:35 am Post subject: |
|
|
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 |
|
|
hdagar Beginner
Joined: 18 May 2004 Posts: 5 Topics: 4
|
Posted: Tue May 18, 2004 7:48 am Post subject: |
|
|
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 |
|
|
|
|