View previous topic :: View next topic
|
Author |
Message |
ssk1711
New User
Joined: 16 Jun 2008 Posts: 40 Location: bangalore
|
|
|
|
Hi,
I am trying to access DB2 tables using REXX.
My program is :
*************************************************************
/* Rexx */
/* Access DB2 Tables */
/* Assign the query to a variable */
QUERYSQL = "SELECT USER_NAME FROM USER_DETAILS" ,
"WHERE EDIT_ACCESS='Y'"
Drop ResTable.
Cnt = 1
/* Check whether the DSNREXX environment is available */
'SUBCOM DSNREXX'
/* If not, then make it available */
IF RC THEN
DO
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
END
/* Connect to the DB2 subsystem */
ADDRESS DSNREXX 'CONNECT' 'SubsystemName' /* eg: DBT2 */
/* Set the DSNREXX environment */
ADDRESS DSNREXX
/* Prepare the SQL statement */
"EXECSQL PREPARE S1 FROM :QUERYSQL"
************************************************************
The problem is with CONNECT statement.
When I execute it, i got the error msg : "Routine not found"
Can anyone please tell me what may went wrong with the statement ? |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
ssk,
Quote: |
Can anyone please tell me what may went wrong with the statement ? |
The error message says it all. The connection has failed. Just check whether you have given the correct subsystem name. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Or whether the REXX/DB2 feature was correctly installed (DB2 installation process).
O. |
|
Back to top |
|
|
ssk1711
New User
Joined: 16 Jun 2008 Posts: 40 Location: bangalore
|
|
|
|
Thanks.
I have to contact my system administrator regarding this. |
|
Back to top |
|
|
|