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

Unable to compare two datasets using ISRSUPC


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Debasis Misra
Warnings : 1

New User


Joined: 16 Sep 2008
Posts: 72
Location: Bangalore

PostPosted: Wed Jun 16, 2010 7:24 pm
Reply with quote

I am in need to compare two datasets to check whether the code in both the datasets is same, say

DSN1 is 'LST.CODE.CMPR.ONE(MEM1)'
DSN2 is 'LST.CODE.CMPR.TWO(MEM2)'

I am using the below REXX routine for the same, as i am running a loop where in i am comparing many datasets sequentially.


Code:

 
 NEWDD1= "LST.CODE.CMPR.ONE(MEM1)"
 OLDDD1 = "LST.CODE.CMPR.TWO(MEM1)"

 "ALLOC FI(NEWDD) DA('"NEWDD1"') REUSE SHR "               
 "ALLOC FI(OLDDD) DA('"OLDDD1"') REUSE SHR "               
 "ALLOC FI(SYSIN) DUMMY          REUSE SHR "               
                                                           
 PARMS = "DELTAL,LINECMP,NOSEQ"                           
 ADDRESS ISPEXEC "SELECT PGM(ISRSUPC) PARM("PARMS")"       



But even when both the datasets are same i get the return code as 1 which tells that there is a difference between the two datasets. I am not sure whether the parameters that i am using are correct.
Could any one help me on this?
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Wed Jun 16, 2010 7:37 pm
Reply with quote

I use code like this:

Code:

/* REXX */
...
"ALLOC FI(newdd) DA('"newdd1"') REU SHR"       
"ALLOC FI(olddd) DA('"olddd1"') REU SHR"       
"ALLOC FI(outdd) DUMMY REU"                     
"ALLOC FI(sysin) DUMMY REU"                     
"ISPEXEC SELECT PGM(ISRSUPC)"                   
Say rc           


and I get rc=0 when both datasets are identical, rc=1 if they aren't.
Back to top
View user's profile Send private message
Debasis Misra
Warnings : 1

New User


Joined: 16 Sep 2008
Posts: 72
Location: Bangalore

PostPosted: Wed Jun 16, 2010 8:29 pm
Reply with quote

Thank you for the reply,

I added the line "ALLOC FI(OUTDD) DUMMY REUSE SHR "

and now the results are as you told above,

RC = 0 Identical
RC = 1 not identical

Problem solved icon_smile.gif
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
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 ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts Compare latest 2 rows of a table usin... DB2 1
No new posts How to compare two rows of same table DB2 11
Search our Forums:

Back to Top