LegacyJ CICS and COBOL technology for the J2EE Enterprise Environment

Products     Services     Support     Sales     News     Partners     Contact

  

Academic
Programs

Customer
Information

News &
Information

Technical
Information

White
Papers

About Us

Frequently Asked Questions

Are there any tips for debugging LTP projects?

Use standard CICS tracing (EXEC CICS TRACE); this may be sufficient for your needs.  It requires the creation of a Journal (typically set to SYSOUT); then set the trace to use that Journal, all this is defined in the LTP deploy settings.

There is also an ability to debug COBOL programs running under an Application Server, but it does require extra setup of the Application Server to put it into debug mode. The remote debugging is done from the LegacyJ IDE. It follows the remote debugging rules of the LegacyJ IDE.

(Note, DISPLAY "text" UPON SYSOUT will typically display to the Application Server console and it's useful for spot debugging.)

Debugging

For debugging, use the normal PERCobol debugger,  and make sure that the Application Server is started in debug mode.  That involves either using an Application Server's special 'debug' startup script, or modifying the startup script that already exists (make a backup first).

The java line that starts the Application Server must be similar to the following:

java.exe -Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y ...

where ... is the rest of the normal line. 

(The -Djava.compiler=NONE parameter is not necessary for JDK 1.4.  It's required for JDK 1.3. Note, it does slow down the Application Server significantly.)

The PERCobol debugger is then be used in 'remote' mode to the Application Server machine.  (This is true even when the Application Server machine is the same as the one running the IDE since the program is controlled from a different process.)

However, since this procedure involves a lot of steps, it's usually easier to just add spot debugging statements (DISPLAY UPON SYSOUT or SYSERR will usually go to the Application Sserver console) or use EXEC CICS TRACE statements.  A journal may be setup to point to SYSOUT or SYSERR, and then the trace set to use said journal.

Does the *.ear need to be exported to something different than my *.ear file?  (And if so, what needs to be included).

No, the .ear file is all that's exported.  (The Debug switch is on automatically, unless explicitly disabled.  If you disabled the debug switch, then variable names will be obfuscated.)

 

Home         About Us         Privacy        Legal        
© Copyright LegacyJ Corp. 1998, 2007
All Rights Reserved.

All trademarks are the properties of their respective owners or licensers.