Developer for System z, Version 7.6.x

# Runtime message traceback information

In Rational® Developer for System z® Version 7.6, COBOL for Windows® is enhanced to provide traceback information for some runtime messages. If traceback information is available for a given message, additional lines of information appear after the message text.

To include the source-file name and line number in the traceback information, you must compile a COBOL program with the `-g` flag. For example:

    cob2 -g FNREM01.CBL

results in the source-file name `FNREM01.CBL` and a line number `1839` from the source file appearing in the traceback information for message `IWZ036W`:

    IWZ036W  Truncation of high order digit positions occurred in program FNREM01
             on line number 1967.
          iwzrlib.dll : 0
          FNREM01.CBL : 1839
          iwzrlib.dll : 0
          iwzrwin1.obj : 0
          kernel32.dll : 0

Note: The line number in the traceback information (`1839`) references the relevant line from the source file (`FNREM01.CBL`), and the line number specified in the message text (`1967`) references the `LineID` from the source listing (`FNREM01.lst`).
If you compile a COBOL program without the `-g` flag, you will see an executable-file name and zero for the line number. For example:

    cob2 FNREM01.CBL

results in the executable-file name `FNREM01.exe` and a line number `0` appearing in the traceback information for message `IWZ036W`:

    IWZ036W  Truncation of high order digit positions occurred in program FNREM01
             on line number 1967.
          iwzrlib.dll : 0
          FNREM01.exe : 0
          iwzrlib.dll : 0
          iwzrwin1.obj : 0
          kernel32.dll : 0

Traceback information is directed to stderr.

COBOL for Windows Programming Guide content will be updated at a future release to indicate these changes.

Terms of use | Feedback
This information center is powered by Eclipse technology. (http://www.eclipse.org)