IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

-805 error while running REXX DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
achittu

New User


Joined: 26 Feb 2007
Posts: 14
Location: chennai

PostPosted: Wed Feb 28, 2007 5:51 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Mar 01, 2007 11:57 am
Reply with quote

Ask your DB2 DBAs to make sure they followed the steps needed to connect REXX to DB2 while installing DB2.

O.
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Tue Mar 06, 2007 4:44 pm
Reply with quote

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
View user's profile Send private message
kansassho

New User


Joined: 31 Mar 2008
Posts: 14
Location: kansas city

PostPosted: Fri Jul 17, 2009 5:04 pm
Reply with quote

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
View user's profile Send private message
satyender

New User


Joined: 05 Jan 2008
Posts: 50
Location: Olympia, WA, USA

PostPosted: Tue Jul 21, 2009 12:27 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jul 21, 2009 12:35 am
Reply with quote

Hello,

Please note this topic has been inactive for about 2 1/2 years. . .

If is best to reply to more current, active topics icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top