Page 1 of 1

Getting SQLCODE -927 with a new COBOL-DB2 program.

Posted: Wed Jan 06, 2016 2:21 pm
by Bhanu Pathak
Hi,

I have written a new COBOL-DB2 program. This program is being called by another program which is only a COBOL program. I have called it the way it should be called and coded in similar way the other programs are coded. But I still end up with SQLCODE -927 all the time. How can I solve it?

Regards.

Re: Getting SQLCODE -927 with a new COBOL-DB2 program.

Posted: Wed Jan 06, 2016 2:28 pm
by Bhanu Pathak
This is what I get as error:

SQLCODE = -927, ERROR: THE LANGUAGE INTERFACE (LI) WAS CALLED WHEN THE CONNECTING ENVIRONMENT WAS NOT ESTABLISHED. THE PROGRAM SHOULD BE INVOKED UNDER THE DSN COMMAND

Re: Getting SQLCODE -927 with a new COBOL-DB2 program.

Posted: Wed Jan 06, 2016 5:48 pm
by Akatsukami
Explicitly link with the necessary interface module.

Re: Getting SQLCODE -927 with a new COBOL-DB2 program.

Posted: Fri Jan 08, 2016 3:46 am
by mmcrew
Specifically, try:

Code: Select all

//SYSTSIN    DD *
  DSN SYSTEM(your db2 subsystem id)
  RUN PROGRAM(your program id) -
      PLAN(plan of the sub program) -
      PARM('parameters that your program wants')
  END
/*