HP RPG/XL Programmer's Guide (30318-90001)

7-: 3
Columns 43-48 specify that the contents of the field, PTR1, are
also written to the disc file.
4 This line logs DEBUG information to a disc file.
Columns 18-27 contain a tag, M-1END, that identifies this DEBUG
operation data in the disc file.
Handling Execution Errors
If an error occurs while you're executing an RPG program, an error
message (and often an error number) is displayed. If the error is a file
error, the File Information Display is produced automatically along with
an Error Dump (you can request error dumps independently, if you wish).
The sections which follow in this chapter discuss error messages, Error
Dumps and the File Information Display in detail.
If you're executing a program in session mode, the error message and File
Information Display are shown on your terminal. In job mode, error
messages are displayed on the operator's console and the File Information
Display is saved with the job listing. It is a good idea, when running
in job mode, to capture the messages and file information in a disc file.
This gives you more flexibility in scheduling your jobs and lets you
examine results at a later time. The following RUN command executes the
program GL50 and redirects error information to the existing disc file,
MESSFL:
:RUN GL50;STDLIST=MESSFL
Error Messages
There are four types of error messages: RPG, IMAGE, USWITCH and BUFCHK.
RPG errors are general errors such as arithmetic overflow and matching
record sequence errors. TurboIMAGE errors originate in the TurboIMAGE
subsystem and you may see these errors if you're using an IMAGE database
in your program. You may see USWITCH and BUFCHK errors if you're using
the USWITCH Source or the BUFCHK features of RPG, respectively.
Each type of error message has a different format and is documented
separately. RPG, USWITCH and BUFCHK errors are documented in Appendix B
of the
HP RPG Reference Manual
. TurboIMAGE errors are explained in the
TurboIMAGE/XL Database Management System manual
. It is important,
therefore, to learn to recognize these three types of message formats so
that you will know where to find explanations and remedial procedures for
them.
RPG Errors. Most of the error messages you see when running an RPG
program are RPG error messages. RPG errors are detected by the software
that performs the basic RPG processing. They also include errors
occurring in software that RPG interfaces with, such as VPLUS, RSI, and
KSAM.
Appendix B of the
HP RPG Reference Manual
contains a complete description
of the RPG errors and actions that you can take to correct the errors.
Identifying RPG Errors
Figure 7-3 shows a typical RPG error message. Lines relating to RPG
errors are shaded. You identify an RPG error by the line,
*** RPG ERROR ***
You identify the specific error by the error number line,
1. FATAL FILE ERROR, FILENAME=DACCOUNT