Results 1 to 4 of 4

Thread: sqlcode -991

  1. #1
    Join Date
    Jun 2003
    Posts
    2

    Unanswered: 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

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    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

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •