View previous topic :: View next topic
|
Author |
Message |
achittu
New User
Joined: 26 Feb 2007 Posts: 14 Location: chennai
|
|
|
|
I am getting -805 issue while trying to run a DB2 query using REXX. I am running using DSNREXX
I have my REXX query as follows :
ADDRESS TSO
SUBSYS = TDN1
ADDRESS TSO "SUBCOM DSNREXX"
IF RC THEN
MYRC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
ADDRESS DSNREXX
"CONNECT" SUBSYS
IF SQLCODE <> 0 THEN DO
SAY "UNABLE TO CONNECT TO DB2"
END
ELSE DO
GFLX_H_TMP=FSA
GFLX_H_SQL = "SELECT SYS_DT_IND,SYS_DT,SYS_JULN_DT,CENTURY_IND",
"FROM D5426"GFLX_H_TMP".FSA_DATE"
ADDRESS DSNREXX "EXECSQL PREPARE S1 FROM :GFLX_H_SQL"
ADDRESS DSNREXX "EXECSQL DECLARE C1 CURSOR FOR S1"
ADDRESS DSNREXX "EXECSQL DESCRIBE S1 INTO :OUTSQLDA"
ADDRESS DSNREXX "EXECSQL OPEN C1"
ADDRESS DSNREXX "EXECSQL FETCH C1 USING DESCRIPTOR :OUTSQLDA"
IF SQLCODE = +100 THEN DO
PHFSADT =""
GFLX_H_JULDT =""
GFLX_H_CENT_IND=""
GFLX_H_DT_IND =""
END
ELSE DO
GFLX_H_DT_IND = OUTSQLDA.1.SQLDATA
PHFSADT = OUTSQLDA.2.SQLDATA
GFLX_H_ST_FSADT = OUTSQLDA.2.SQLDATA
GFLX_H_JULDT = OUTSQLDA.3.SQLDATA
GFLX_H_CENT_IND = OUTSQLDA.4.SQLDATA
END
ADDRESS DSNREXX "DISCONNECT"
For all the SQLCOMMANDS - PREPARE , DESCRIBE , OPEN AND FETCH I am getting SQLCODE of -805.
I know -805 is a bind issue. I know how to re-bind using COBOL but never done in REXX.
Can anybody pls let me know how to solve this issue. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Ask your DB2 DBAs to make sure they followed the steps needed to connect REXX to DB2 while installing DB2.
O. |
|
Back to top |
|
|
vini_srcna
Active User
Joined: 26 May 2005 Posts: 178 Location: Copenhagen, Denmark
|
|
|
|
That would give -924 but not -805. This is something he is getting after getting connected to DB2. I have used REXX PIPES to connect to DB2 and got -924 several times when i couldnt get connected to db2.
This is something to do with Timestamp mismatch. |
|
Back to top |
|
|
kansassho
New User
Joined: 31 Mar 2008 Posts: 14 Location: kansas city
|
|
|
|
This is bind related issue. You should ask your DBA,
Here I want to share a info with you, a job 'DSNTIJRX ' is there is libraray DNT*.*.SDSNSAMP, that your DBA should need to run to bind Rexx language support. |
|
Back to top |
|
|
satyender
New User
Joined: 05 Jan 2008 Posts: 50 Location: Olympia, WA, USA
|
|
|
|
achittu,
SQLCODE -805 is something related to DBRM or PACKAGE not found in the PLAN.
Please check if the DBRM or PACKAGE (COLLECTION ID) is present in PLAN or NOT?
If not add the one and recompile it. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please note this topic has been inactive for about 2 1/2 years. . .
If is best to reply to more current, active topics |
|
Back to top |
|
|
|