Debugging with Micro Focus Server Express Animator

If you have the Micro Focus Server Express Animator debugging utility, you must compile with option D to use the Animator during testing.

To debug programs with the Micro Focus Server Express Animator

  1. Make sure that the $COBDIR/bin/rts32 or $COBDIR/bin/rts64 program file has been updated with the $GENDIR/bin/rtsldr file.
    1. Save off your rts32 file or rts64 file (depending on whether you have a 32-bit or a 64-bit processor) as rts32.orig or rts64.orig.
    2. Copy $GENDIR/bin/rtsldr to $COBDIR/bin.
    3. Rename the rtsldr file in $COBDIR/bin to rts32 or rts64, depending on whether you have a 32-bit or a 64-bit processor.
  2. For Linux operating systems: To enable the Lawson Debug Server (ladebug) to run properly, make the following changes to the gai.conf file:
    1. Run stopladebug.
    2. Copy the file gai.conf from the /usr/share/doc/glibc-common-<version number>/ directory to the /etc/ directory
    3. Change the file permissions for gai.conf in /etc/ to allow editing.
    4. Uncomment the following lines :

      label ::/0 1

      precedence ::/0 40

    5. Run startladebug.
  3. Make sure the ENABLEDBG parameter in $LAWDIR/system/ladebug.cfg is set to TRUE and that the Lawson Debug Server (ladebug) is running. Because this setting incurs some overhead, the ENABLEDBG parameter should always be set to FALSE in a production Lawson Environment. If the ENABLEDBG parameter in ladebug.cfg is set to TRUE and if ladebug is running, Lawson client programs will check with the Lawson Debug Server to see if the application program is being debugged. For more information on the Lawson Debug Server, see Infor Lawson Administration: Server Setup and Maintenance guide.
  4. If you will be debugging a batch program, define the batch job. Also the print directory for the batch program job must exist before you use the batchanim program.
  5. Compile the program you want to debug.

    qcompile -D productline systemcode programcode

  6. Start the Server Express Animator for the type of program you are debugging, online or batch.

    cobanim DataArea programcode

    where DataArea is the data area or data ID the program is to run against.

    - or -

    batchanim programcode DataArea username jobname stepnumber

    where stepnumber is always at least "1".

  7. Set break points as needed. In the case of online programs, all breakpoints must be after the statement:
    CALL "InitOnline" USING WS-DB-PRODUCT-LINE,
    CRT-PROGRAM-CODE,
    WS-DATE-DISPLAY-FORMAT
    CRT-DEFAULT-PRINTER.
  8. Perform the Zoom command (type z) to begin execution.
  9. If you are working with an online program, start another Lawson Interface Desktop (LID) session to bring up the program form and perform a transaction. (This step is not necessary with batch programs.)

    Server Express will stop execution if the program hits any of the break points. Perform the Zoom command again (type z) to resume execution.

  10. After you finish running the application program, press Ctrl+C to interrupt execution and then press Esc to exit the Animator.