Previous Topic Next topic Print topic


Debugging COBOL Stored Procedures

You can debug (step through the source code of) COBOL stored procedures from a Java application. You can only do this when the XDB Server is used in the blue screen character mode and not as a service.

To debug your COBOL stored procedure:

  1. Add two lines to the [SERVER] section of the xdb.ini file located in your %ProgramFiles(x86)%\Micro Focus\Studio Enterprise Edition x.xmfsql\cfg directory:
    [SERVER]
    StProcLoadLib=c:\projects\MyProj\DEBUG
    StProcAnimate=yes

    Where MyProj is the name of your project directory.

  2. Start the XDB Server.
  3. Set the timeout data connection property to -1. If you do not set this property, your application will time out while the XDB Server is preparing the debugging environment. See the topic timeout for more information.
  4. Compile the COBOL stored procedure.
  5. Register the stored procedure with the XDB Server by executing a CREATE PROCEDURE command either in SQL Wizard or embedded in a program.
  6. Run the Java application that calls the stored procedure. When the call is made to the XDB Server, a new window appears containing the COBOL stored procedure source code.
  7. Step through the source code of the stored procedure.

    A new window appears for each stored procedure you invoke via Java.

Previous Topic Next topic Print topic