View previous topic :: View next topic
|
Author |
Message |
Debasis Misra Warnings : 1 New User
Joined: 16 Sep 2008 Posts: 72 Location: Bangalore
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Debasis Misra Warnings : 1 New User
Joined: 16 Sep 2008 Posts: 72 Location: Bangalore
|
|
|
|
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 |
|
Back to top |
|
|
|