IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Comparing 2 files(output of sql queries)


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Wed Nov 25, 2009 7:07 am
Reply with quote

I have to compare 2 files.

These are the output of Spufi run.

My first question is, how can i make these outputs of SPUFI into
normal flat files as they contain the column names from tables.

Second question is after i am able to get the flat files,

how i can compare them using Sort or some program,
what i have to do is, i have to compare each column of one file
with that of the other.

Both the files would be outcome of SQL query on the same table
but on different region.

Purpose is to check whether the data is consistent in both the regions
for the same table.


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

Moderator Emeritus


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

PostPosted: Wed Nov 25, 2009 10:02 am
Reply with quote

Hello,

If you run the queries in batch, it should be no trouble to define the output as a dataset rather than sysout.

Maybe a query is not the way to get what you want. If you unload the 2 tables, you should be able to more easily compare the unloaded data.

Regardless of how you "get the data", it will help if you post some sample data from both files and how you want it compared.
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Wed Nov 25, 2009 10:22 am
Reply with quote

Thanks.

I don't have to unload the complete table.

For some specific values of a column, i need to get all relevant records from the table, that's why i have used 'where' clause in my select query for that coulmn.
Back to top
View user's profile Send private message
CHANDAN KAPOOR

New User


Joined: 12 Apr 2008
Posts: 36
Location: NOIDA

PostPosted: Wed Nov 25, 2009 11:00 am
Reply with quote

Can't u use QMF , I think QMF can solve ur purpose . Thru QMF u can export the o/p to PS.

Thereafter u can use SUPERCE facility to compare both the PS files.
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Wed Nov 25, 2009 11:26 am
Reply with quote

thanks

export--QMF is not giving proper results
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Nov 25, 2009 11:43 am
Reply with quote

Quote:
export--QMF is not giving proper results
Will never get much help.

Do not post "it didn't work". Do post what happened that is not what you want.
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Wed Nov 25, 2009 12:17 pm
Reply with quote

I am sorry.

Actually it was checked by my collegue.

He is not available now but i have to deliver this task.

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

New User


Joined: 12 Apr 2008
Posts: 36
Location: NOIDA

PostPosted: Wed Nov 25, 2009 1:10 pm
Reply with quote

Have u tried with QMF as there will se some unwanted fields at the top(10-15 lines) , You can delete them. Then the data will look fine.
Back to top
View user's profile Send private message
karisurya

New User


Joined: 02 Aug 2007
Posts: 64
Location: Bangalore

PostPosted: Wed Nov 25, 2009 3:41 pm
Reply with quote

I am not sure what you are trying to do but what dick told should have definitely helped you, you can always unload data to a flat file from DB2 table. If you have DB2 File Aid its easy to select the criteria also, once the data is in flat file it should be very easy to compare as they both are in same format.
If this not help and if are still looking for help post what u r doing clearly with snapshots may be some one can help you.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Nov 25, 2009 9:14 pm
Reply with quote

Hello,

Quote:
Actually it was checked by my collegue.
He is not available now but i have to deliver this task.
Has nothing to do with the issue and is Not information we can use to help you. . . icon_confused.gif To Repeat:
Quote:
Do post what happened that is not what you want.


If the only info you are willing to post is "it didn't work", the best we can do is to say "Good Luck".

If other "solutions" are posted before the needed info is posted, they will be deleted.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top