/*REXX*/
CLEAR
START:
USER = SYSVAR('SYSUID')
"ISPEXEC LIBDEF ISPPLIB DATASET ID('ND2535A.INTL.TOOLS')"
"ISPEXEC DISPLAY PANEL(DELEMSCR)"
Message = ' '
If RC ¬= 0 Then
Do
exit
End
If RG = 'E1' Then
SSID = 'DB2D'
Else
SSID = 'DB2T'
ADDRESS TSO "SUBCOM DSNREXX"
IF RC THEN
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
ADDRESS DSNREXX "CONNECT "SSID
SAY 'RC1 'RC
QUERYSQL = "DELETE FROM VMUSHE.REL_AD_USE WHERE "||,
"PARTY_REL_ACCT_ID='"||AC1||"';"
rexxvar="COMMIT"
SAY 'DELETING 'AC1
SAY QUERYSQL
ADDRESS DSNREXX "EXECSQL PREPARE S1 FROM :QUERYSQL"
SAY 'RC2 'RC
ADDRESS DSNREXX "EXECSQL EXECUTE IMMEDIATE S1"
SAY 'RC3 'RC
SAY 'SQLCODE 'SQLCODE
SAY 'SQLSTATE 'SQLSTATE
IF SQLCODE = 0 THEN DO
ADDRESS DSNREXX "EXECSQL rexxvar"
SAY 'ACCT DELETED SUCCESSFULLY'
ADDRESS DSNREXX "DISCONNECT"
CLEAR
START:
USER = SYSVAR('SYSUID')
"ISPEXEC LIBDEF ISPPLIB DATASET ID('ND2535A.INTL.TOOLS')"
"ISPEXEC DISPLAY PANEL(DELEMSCR)"
Message = ' '
If RC ¬= 0 Then
Do
exit
End
If RG = 'E1' Then
SSID = 'DB2D'
Else
SSID = 'DB2T'
ADDRESS TSO "SUBCOM DSNREXX"
IF RC THEN
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
ADDRESS DSNREXX "CONNECT "SSID
SAY 'RC1 'RC
QUERYSQL = "DELETE FROM VMUSHE.REL_AD_USE WHERE "||,
"PARTY_REL_ACCT_ID='"||AC1||"';"
rexxvar="COMMIT"
SAY 'DELETING 'AC1
SAY QUERYSQL
ADDRESS DSNREXX "EXECSQL PREPARE S1 FROM :QUERYSQL"
SAY 'RC2 'RC
ADDRESS DSNREXX "EXECSQL EXECUTE IMMEDIATE S1"
SAY 'RC3 'RC
SAY 'SQLCODE 'SQLCODE
SAY 'SQLSTATE 'SQLSTATE
IF SQLCODE = 0 THEN DO
ADDRESS DSNREXX "EXECSQL rexxvar"
SAY 'ACCT DELETED SUCCESSFULLY'
ADDRESS DSNREXX "DISCONNECT"