Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

why the SQLCODE is '00000092P' ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: why the SQLCODE is '00000092P' ?
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: 3158
Location: Tucson AZ

PostPosted: Wed Jan 17, 2007 7:08 pm    Post subject: Re: why the SQLCODE is '00000092P' ?
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    Post subject:
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: 1452
Location: Chicago, IL

PostPosted: Thu Jan 18, 2007 8:43 am    Post subject: Re: why the SQLCODE is '00000092P' ?
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    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 SQLCODE-000000080N priya91 DB2 1 Mon Feb 01, 2016 4:35 pm
No new posts Need to understand SQLCODE = 12 rohanthengal DB2 3 Thu Nov 05, 2015 11:22 am
No new posts SQLCODE -922 in Batch-Cics program tr... kishpra CICS 2 Thu Sep 10, 2015 12:36 pm
No new posts SQLCODE -450 for stored procedure spoorni DB2 3 Fri Jan 16, 2015 2:45 am
No new posts -81 SQLCODE returned when Remote Stor... kameswaramanoj.Akella DB2 1 Wed Dec 03, 2014 5:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us