If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > sqlcode -991

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-30-04, 18:06
csmanohar csmanohar is offline
Registered User
 
Join Date: Jun 2003
Posts: 2
sqlcode -991

DB2 7.1.1, zOS/OS390, COBOL, JCL


I have pre-compiled/compiled/link edited and bound a simple DB2 program that essentially reads a file and inserts recrods into a db2 table.

when I try to run the program I receive the sqlcode -991. I have looked up the description and it is as follows.

DSNT408I SQLCODE = -991, ERROR: CALL ATTACH WAS UNABLE TO ESTABLISH AN IMPLICIT CONNECT OR OPEN TO DB2. RC1=0008 RC2=00F30049

To me this did not make much sense.
Please help me understand what is wrong and how I can fix it.
-- Manohar
Reply With Quote
  #2 (permalink)  
Old 03-30-04, 20:08
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Assuming you a batch application, you probably want to execute it under TSO batch. Here is some sample JCL from the DB2 Applciation Programming Guide:

//jobname JOB USER=MY DB2ID
//GO EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB DD DSN=prefix.SDSNEXIT,DISP=SHR
// DD DSN=prefix.SDSNLOAD,DISP=SHR
//SYSTSPRT DD SYSOUT=A
//SYSTSIN DD *
DSN SYSTEM (ssid)
RUN PROG (SAMPPGM) -
PLAN (SAMPLAN) -
LIB (SAMPPROJ.SAMPLIB) -
PARMS (’/D01 D02 D03’)
END
/*

You can also run programs under CICS, IMS, and the Call Attach Facility (whcih requres special coding), and a few other interfaces.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 03-31-04, 09:02
csmanohar csmanohar is offline
Registered User
 
Join Date: Jun 2003
Posts: 2
My run JCL looks exactly like this. Until yesterday, I had no clue what CAF was. When I looked it up, I realised that it is unnecessary in my case. The compile jcl I used was created by a homegrown utility that included the DSNALI by default in the linkedit step. When I changed it to DSNELI, it seemed to work. So, for now at least I seem to have overcome this. However, I'd still like to know in plain english what CAF is meant to do and how it is different from TSO/DSN.
Thanks
-- Manohar
Reply With Quote
  #4 (permalink)  
Old 03-31-04, 17:20
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
There is a section in the Application Programming and SQL Guide on the Call Attach Facility called "Programming for the call attachment facility (CAF)" that may explain what you want to know. I don't think many people use CAF, partly because it requires extra DB2 coding (for the attach) that is not compatable when running under other connections (TSO, IMS, CICS).

Here is a link to the manuals:
http://www-306.ibm.com/software/data...s/v7books.html
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On