We have requirement like in one panel if user selects two datasets then we need to compare two datasets and result would be displayed in next panel. I have searched past topics. I have executed below code it was not working can u please let me know correct code.
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
Your code worked fine for me, presuming that myfile1 and myfile2 are Physical Sequential (PS) datasets.
If they are Partitioned
(PO) datasets, then you also need to provide a SYSIN DD with the list of member names for comparison, or with a DD DUMMY if you want all members.
I think this rexx will do what you need.
Let me know if doesnt.
SAY ' ENTER MEMBER 1:'
PULL MEM1
SAY 'ENTER MEMBER 2:'
PULL MEM2
SP = POS(' ',MEM1)
IF SP /= 0 THEN MEM1 = SUBSTR(MEM1,1,SP-1)
IF SYSDSN("'"MEM1"'") /= 'OK' THEN DO
SAY ' MEMBER ' MEM1 'DOESNT EXISTS'
RETURN
END
SP = POS(' ',MEM2)
IF SP /= 0 THEN MEM2 = SUBSTR(MEM2,1,SP-1)
IF SYSDSN("'"MEM2"'") /= 'OK' THEN DO
SAY ' MEMBER ' MEM2 'DOESNT EXISTS'
RETURN
END
IF SYSDSN(COMP.LIST) = 'OK' THEN DO
ADDRESS TSO "DELETE COMP.LIST "
IF RC /= 0 THEN DO
SAY ' COMP.LIST DATASET IN USE'
EXIT(0)
END
END
IF SYSDSN(COMP.SYSIN) = 'OK' THEN DO
ADDRESS TSO "DELETE COMP.SYSIN"
IF RC /= 0 THEN DO
SAY ' COMP.SYSIN DATASET IN USE'
EXIT(0)
END
END
ADDRESS ISPEXEC
ADDRESS TSO
"ALLOC DD(NEWDD) SHR REUS DA('"MEM1"')"
"ALLOC DD(OLDDD) SHR REUS DA('"MEM2"')"
"ALLOC DD(OUTDD) DA(COMP.LIST) SP(10,10) TR NEW RELEASE REU",
"LRECL(133) BLKSIZE(13566) RECFM(F,B,A) ",
"MGMTCLAS(MCDCOMM)"
"ALLOC DD(SYSIN) DA(COMP.SYSIN) SP(10,10) TR NEW RELEASE",
"LRECL(80) BLKSIZE(800) RECFM(F,B) REU ",
"MGMTCLAS(MCDCOMM)"