Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Reason for SQL Code -991?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Hari Kishan

New User


Joined: 06 Jul 2007
Posts: 2
Location: Hyderabad

PostPosted: Thu Feb 21, 2008 7:22 pm    Post subject: Reason for SQL Code -991?
Reply with quote

Hi Could any one please help me in finding the reasons about
SQL Code -991???

I have compiled sub program subPGM2 and then main program named MainPGM, which is using DB2. After that we ran the main program and its giving SQL code -991 for one of the sub program named subPGM (which was called by mainprogram MainPGM). We have modified only subPGM2 not other sub programs.

For compiling we are using tool LIMA.

Main program : MainPGM
Modified sub program : subPGM2 (Static call)
Effected sub program : subPGM1 (Dynamic call) is called subPGM
(Static call and we are getting sqlcode -991 in this program)

Why this error is coming only for Sub program not for mainprogram??

What is the reason for getting -991????

Thanks in Advance.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Feb 21, 2008 8:54 pm    Post subject:
Reply with quote

Have you looked at the fine manual?
Quote:
| -991 CALL ATTACH WAS UNABLE TO ESTABLISH AN IMPLICIT CONNECT OR OPEN TO
| DB2. RC1= rc1 RC2= rc2

| Explanation: Call attach attempted to perform an implicit connect and
| open as the result of an SQL statement. The connect or open failed with
| the returned values.

| System Action: The statement cannot be executed.

| Programmer Response: Verify that the application intended to use the call
| attachment facility (CAF) as the mechanism to connect to DB2. For stored
| procedures running in the WLM-established stored procedure address space
| the application must be link-edited with or dynamically allocate the RRS
| attachment language interface module (DSNRLI), not CAF.
Back to top
View user's profile Send private message
Hari Kishan

New User


Joined: 06 Jul 2007
Posts: 2
Location: Hyderabad

PostPosted: Fri Feb 22, 2008 3:08 pm    Post subject: Reply to: Reason for SQL Code -991?
Reply with quote

Hi,

We have modified only subPGM2 and we are getting sql code:-991 for other sub program subPGM.

I have already gone through the programmer response.But I don't know how to verify this?

So can you please help me in this issue?

Programmer Response: Verify that the application intended to use the call
| attachment facility (CAF) as the mechanism to connect to DB2. For stored procedures running in the WLM-established stored procedure address space the application must be link-edited with or dynamically allocate the RRS attachment language interface module (DSNRLI), not CAF.

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

Active User


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

PostPosted: Mon Feb 25, 2008 9:14 pm    Post subject: Reply to: Reason for SQL Code -991?
Reply with quote

Well,
SQL -991 messge in manual shows something different. For me it turns out to be Link error.
I was breaking my head couple of days back and finally found tht the link libraries used in my compile JCL was not correct.
If you have endevor or changeman, try compiling your programs in them and use tht load module.
donot try to compile from a PDS JCL.
It solved my problem. Hope this helps.
Thanks,
Viji
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts I want to retire TRX and use only Rex... Abhinav Sharma CLIST & REXX 6 Sat Jul 29, 2017 2:53 am
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us