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
 

 

Comparing 2 files(output of sql queries)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Comparing 2 files(output of sql queries)
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

Site Director


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

PostPosted: Wed Nov 25, 2009 10:02 am    Post subject:
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    Post subject:
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    Post subject: Reply to: Comparing 2 files(output of sql queries)
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    Post subject: Reply to: Comparing 2 files(output of sql queries)
Reply with quote

thanks

export--QMF is not giving proper results
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: Wed Nov 25, 2009 11:43 am    Post subject:
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    Post subject:
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    Post subject: Reply to: Comparing 2 files(output of sql queries)
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    Post subject:
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

Site Director


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

PostPosted: Wed Nov 25, 2009 9:14 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 7 Thu Jun 29, 2017 1:41 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm


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