View previous topic :: View next topic
|
Author |
Message |
go4salu
New User
Joined: 12 Jan 2006 Posts: 11
|
|
|
|
Hi ,
I am getting RC (-) while connecting DB2 from Rexx. The code is pasted below.
ADDRESS ISPEXEC "LIBDEF ISPLLIB DATASET ID('DNDDB2.DB2.SDSNLOAD')"
"SUBCOM DSNREXX"
IF RC THEN
S_RC = RXSUBCOM("ADD","DSNREXX","DSNREXX")
ADDRESS DSNREXX "CONNECT DB2"
IF SQLCODE <> 0 THEN
DO
SAY " ERROR IN CONNECTING"
EXIT
END
Please help me out with this. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
This usually works for me
Code: |
"SUBCOM DSNREXX"
If Rc Then
s_rc = Rxsubcom("ADD","DSNREXX","DSNREXX")
Address Dsnrexx "CONNECT" DB2SubSys |
|
|
Back to top |
|
|
go4salu
New User
Joined: 12 Jan 2006 Posts: 11
|
|
|
|
Its not working for me. Does it depend upon the OS also? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Quote: |
Its not working for me. |
It's working for me...!!! Now go and find why it's not working for you.
Saying "Its not working for me" does not serve any purpose -- what error did you get, posting that could help us to provide some suggestion. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You need to post the exact code that you used, and the exact error message and code that was issued.
As Anuj has said, we need to see exactly what is happening before we can help.
Psychic day is tomorow this week. Post early and get help sooner. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Quote: |
Psychic day is tomorow this week. Post early and get help sooner. |
LOL-- Sales Business is teaching you to invent many eye-catchy slogans on the fly.... |
|
Back to top |
|
|
go4salu
New User
Joined: 12 Jan 2006 Posts: 11
|
|
|
|
I had already pasted my code in the begining of this thread. However, I am pasting the code again. The SSID is DB2.
Code: |
/*REXX*/
ADDRESS ISPEXEC "LIBDEF ISPLLIB DATASET ID('DNDDB2.DB2.SDSNLOAD')"
ADDRESS TSO "SUBCOM DSNREXX"
IF RC THEN
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
SSID = "DB2"
ADDRESS DSNREXX "CONNECT" SSID
IF SQLCODE <> 0 THEN
DO
SAY " ERROR IN CONNECTING"
EXIT
END |
The error message which I am getting is
7 *-* ADDRESS DSNREXX "CONNECT" SSID
+++ RC(-3) +++
ERROR IN CONNECTING |
|
Back to top |
|
|
|