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

why the SQLCODE is '00000092P' ?


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

New User


Joined: 09 Oct 2006
Posts: 36

PostPosted: Wed Jan 17, 2007 6:41 pm
Reply with quote

Thank you everyone, why the SQLCODE is '00000092P' when i executing a COB/DB2 pgm by submiting a JCL,

-----JCL-----

Code:
                                       
//STEP1    EXEC PGM=PF222                                         
//STEPLIB  DD  DSN=OPERN.CICS3.LOADLIB,DISP=SHR                   
//*SYSPRINT DD  SYSOUT=*                                           
//SYSOUT   DD  SYSOUT=*   


-----COBOL-----

Code:

PROCEDURE DIVISION.                               
A0000-MAIN-PARA.                                 
    EXEC SQL                                     
      DECLARE MFCURSOR CURSOR FOR                 
        SELECT MFID,NAME,SALARY,BIRTH,UPDATE     
        FROM MAINFRAME                           
    END-EXEC                                     
    EXEC SQL                                     
      OPEN MFCURSOR                               
    END-EXEC                                     
    PERFORM S0000-FETCH-CURSOR
EXEC SQL         
  CLOSE MFCURSOR 
END-EXEC         
STOP RUN.         

S0000-FETCH-CURSOR.                                         
    MOVE 'N' TO WS-CURSOR-EOF                               
    MOVE 'N' TO WS-CURSOR-FETCH-ERROR                       
    EXEC SQL                                               
      FETCH MFCURSOR                                       
      INTO :MF-MFID,:MF-NAME,:MF-SALARY,:MF-BIRTH,:MF-UPDATE
    END-EXEC                                               
    MOVE MF-MFID TO EMP-EMPID                                 
    MOVE MF-NAME TO EMP-NAME                                 
    MOVE MF-SALARY TO EMP-SALARY                             
    MOVE MF-BIRTH TO EMP-BIRTH                               
    MOVE MF-UPDATE TO EMP-UPDATE                             
    MOVE -1 TO EMP-POSITION-IND                               
    EXEC SQL                                                 
     INSERT INTO EMP_EE(EMPID,NAME,SALARY,BIRTH,POSITION,UPDATE)
  VALUES(:EMP-EMPID,:EMP-NAME,:EMP-SALARY,:EMP-BIRTH,       
       :EMP-POSITION:EMP-POSITION-IND,:EMP-UPDATE)         
    END-EXEC                                                 
  IF SQLCODE NOT = 0                                       
    DISPLAY 'SQL ERROR(INSERT), ERROR CODE:' SQLCODE       
  END-IF
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Wed Jan 17, 2007 7:08 pm
Reply with quote

coria wrote:
Thank you everyone, why the SQLCODE is '00000092P' when i executing a COB/DB2 pgm by submiting a JCL
Being aware that 92P is actually -927, the FM says:
Quote:
-927 THE LANGUAGE INTERFACE (LI) WAS CALLED WHEN THE CONNECTING ENVIRONMENT WAS NOT ESTABLISHED. THE PROGRAM SHOULD BE INVOKED UNDER THE DSN COMMAND

Explanation: In the TSO environment, the user has attempted to execute an application program without first establishing the correct execution environment by issuing the DSN command. In the IMS, CICS, or call attachment facility (CAF) environment, the user has attempted to execute an application program that is not using the correct language interface module.

System Action: The statement cannot be executed.

Programmer Response: In the TSO environment, DB2 application programs should be invoked under the RUN subcommand of the DSN command processor. In the IMS, CICS or CAF environment check that the application was link-edited with or is dynamically allocating the correct language interface module. The language interface modules required in each environment are as follows:
Is this any help?
Back to top
View user's profile Send private message
coria

New User


Joined: 09 Oct 2006
Posts: 36

PostPosted: Thu Jan 18, 2007 8:07 am
Reply with quote

yes, thank you very much!

but still, i am not very clear about the words: "In the TSO environment, DB2 application programs should be invoked under the RUN subcommand of the DSN command processor"


could you pls give me a suggestion that what i can do here?

i have bind the plan, also the pre-compile etc. has passed, is there any other thing i missed?
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Thu Jan 18, 2007 8:43 am
Reply with quote

Quote:
could you pls give me a suggestion that what i can do here?

I would be rather more interested in your JCL Step being used to execute the DB2 program. You might want to use utilities like IKJEFT01 or IKJEFT1B to run the program.
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 SQLCODE = -122 while using the scalar... DB2 4
No new posts SQLCODE = -16002 when using XMLEXISTS DB2 1
No new posts Is SQLCODE -811 possible while fetchi... DB2 1
No new posts SQLCODE=-204 SQLSTATE=42704 DB2 4
No new posts Getting sqlcode 805 while executing R... DB2 10
Search our Forums:

Back to Top