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

How to compare two datasets by sending tso commands


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

New User


Joined: 15 Oct 2004
Posts: 16

PostPosted: Tue Nov 16, 2004 8:02 pm
Reply with quote

Hi

Could any one please let meknow how to compare two data sets

and Could any one also help me by sending tso commands document

Thanks in advacce


Naveen
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Nov 16, 2004 8:29 pm
Reply with quote

Use IBM's SuperC program, which is available under ISPF in the Utilities menu (option 3), option 12 (SuperC Compare data sets).

There are also third-party products available, such as Comparex.
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Tue Nov 16, 2004 8:35 pm
Reply with quote

Hi Naveen,

you can use option 3.13 (SuperCE) to compare two data sets

There you have compare type, select apropriate one,
-------------------------------------------------------------

Compare Type
2 1. File
2. Line
3. Word
4. Byte


if you want mention some conditions for compare type E on the command prompt and enter your crieteria

Let me know if you find any difficulty
Back to top
View user's profile Send private message
naveen_amudalapelly
Warnings : 1

New User


Joined: 15 Oct 2004
Posts: 16

PostPosted: Fri Nov 19, 2004 8:39 pm
Reply with quote

Hi jz1b0c,

This information has given good result for me.

and also could you please tell me how to write the records from first dataset into second data set which is not having the remaining records when we comapare the two datesets.

Thanks in advance

Naveen
Back to top
View user's profile Send private message
honeypria567

New User


Joined: 20 Nov 2006
Posts: 14
Location: chennai

PostPosted: Tue Feb 20, 2007 4:51 pm
Reply with quote

Hi All,

we can compare two dataset by using JCL Utility IEBCOMPR



regards,
Honey
Back to top
View user's profile Send private message
mikayag

New User


Joined: 10 Mar 2005
Posts: 16

PostPosted: Wed Feb 28, 2007 10:40 pm
Reply with quote

Hi All,

This compare discussion is great.

I have a list of sequential files that needs to be compared against one file.

e.g.:

XXXXX.YYYYY.ABCD001
to be compared against
XXXXX.YYYYY.ABCD001.BAK

and I need to produce an output file containing records which do not exist
in the first file.

However, thsi can be tedious because I have several sets of files that needs to be compared. Take this set of example below:

XXXXX.YYYYY.ABCD001 / XXXXX.YYYYY.ABCD001.BAK
XXXXX.YYYYY.ABCD002 / XXXXX.YYYYY.ABCD002.BAK

:
:
XXXXX.YYYYY.ABCD999 / XXXXX.YYYYY.ABCD999.BAK


How can I automate this process? I was thinking of creating a program that will process these files in a loop, each time incrementing by 1. However, the JCl needs a definite name for the files we specify.

Any workaround?
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: Thu Mar 01, 2007 2:11 am
Reply with quote

Hello,

You can set up a small PROC that compares the common file against a file what has the 001-999 specified at run time. Use a symbolic parameter for the number part of the dataset name.

When you run this, you will still need an EXEC statement for each, but with a little bit of editing, you will have a "whole" set very quickly - after you create the "whole" set, you could remove any that you wanted to skip or did not exist.

The basic EXEC would be:
Code:
//S000   EXEC MYCOMPR,NBR=000


Repeat that statement 9 more times and change the Stepname and NBR from 000 to 009. Repeat some more until you have 100 EXEC statements. One hundred steps at a time should be enough. Depending on your situation, you may want to run only 10 at a time - take your pick.

You can then change the "//S0" to whatever hundreds group you want and change "R=0" the same way for each of the hundreds.
Back to top
View user's profile Send private message
Pravin Raj

New User


Joined: 16 Mar 2007
Posts: 2
Location: chennai

PostPosted: Tue Mar 20, 2007 11:56 am
Reply with quote

By honeypriya,
we can compare two dataset by using JCL Utility IEBCOMPR

She is right but i jst want to add somemorethings in that:

IEBCOMPR: mainly used to check whether it is PS or PDS.



Syntax in the JCL: COMPARE TYPORG = PS / PDS -> Return code

Note: If Return Code = 0,files are of same type(Either they r Ps or PDS)

If Return Code = 8,files are of different type(May b one Ps and other is PDS)
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Tue Mar 20, 2007 7:09 pm
Reply with quote

hey,,

u can use this TSo command also.

Go inside the file(File1) u want to compare in View or Edit mode.

Then give COMP X 'FILE2'


This will show where all the difference lies between file1 and file2.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Mar 20, 2007 8:00 pm
Reply with quote

COMP (or COMPARE) is not a TSO command; it is an ISPF Editor Primary Command.

O.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Compare two files with a key and writ... SYNCSORT 3
No new posts Compare latest 2 rows of a table usin... DB2 1
Search our Forums:

Back to Top