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

SQLCODE -991. Help need in solving this error


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

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Thu Feb 07, 2008 8:58 pm
Reply with quote

Hi,
I am running Cobol/Db2 program. I am trying to run the prod version in development region.
I got access to the plan and did bind on the package.
When I try to execute the program, I am getting this error.
Code:
-991   CALL ATTACH WAS UNABLE TO ESTABLISH AN IMPLICIT CONNECT OR OPEN TO DB2.


I had a look at this discussion:
http://ibmmainframes.com/viewtopic.php?t=8550&highlight=sqlcode+991
It says no authorization to execute the plan. I spoke to my DBA, but he said its not access issue and asked me to check the application.
I even ran the program thru viasoft (debugging tool like xpeditor) and it fails at the first SQL statement its trying to execute.

Can anyone please tell me which SYSIBM table to look at to confirm tht I dont have access.?
I checked SYSIBM.SYSPLANAUTH table - it says my userid has execute access.
But I am bind this plan as package. I checked in SYSPPACKAUTH table, but no row exits.

can someone throw some light on it?

Hope I made myself clear. Thanks for your help.
-Viji
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Feb 08, 2008 4:01 am
Reply with quote

As in the link you provided, can you supply the RC1 & RC2?
Those will provide you anumition to shoot the DBA with (or not....grin...)....
Back to top
View user's profile Send private message
shekharmax

New User


Joined: 26 Dec 2007
Posts: 3
Location: hyderabad

PostPosted: Fri Feb 08, 2008 11:29 am
Reply with quote

hi,

it's a time out error , when u want to access the DB2 along with u r program at that moment db2 is unavailable but u r program wants to execute the SQL code.

ASK TO YOUR DBA for DB2 AVAILABILITY STATUS.
Back to top
View user's profile Send private message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Fri Feb 08, 2008 9:25 pm
Reply with quote

Hi,
Thanks for replies. The error code invokes a general abend routine and the message I see is user message from program.
Can you pls tell me what SQL variable to look for RC1 and RC2 so tht I can capture the values while running in smarttest(xpeditor).

Regarding, the availability of the tables, I am able to run the exact query outside in spufi.

Thanks,
Viji
Back to top
View user's profile Send private message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Sat Feb 09, 2008 2:43 am
Reply with quote

Hi,
I just figured the error. There was some improper compilation happened.
I tried compiling in endevor and it worked fine.
Previously I was compiling using a JCL outside endevor. Though tht Jcl was also taken from the availble ISPF options, not sure which Db2 module it used to link.

So its a compile and link issue!...One other DBA helped me in this.

Thanks,
Viji
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: Sat Feb 09, 2008 2:49 am
Reply with quote

Thank you for posting the solution icon_smile.gif

Good to hear that it is workng.

d
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 Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top