4.2 Finding and Correcting Errors

The Error List window displays any error found during a Program Verify or compile. It lists the errors found in the current program and any copy files (/COPY) used by this program. The errors found for each program or copy file are listed under its name. You can use the list to identify errors and their severity, insert the error messages directly into the source and help navigate between errors in the source.

If the Error List window does not appear, select Windows > Error list from the menu bar. If no messages appear, select Options > Include and make sure all message types are selected.

Follow these steps:

  1. In the Error List window double-click on the first error under the <OS400>CUSTAPPxx/APPSOURCE(GUIDES1) name. The line containing the error is highlighted in the Editor window. The error message is inserted beneath the source line. The status line at the bottom of the Error List window displays the severity of the error as well as the location by line number.
  2. In the Error List window, when you correct an error a check mark appears beside the error, indicating that you have made a change to try to correct it. Also to see additional help for an error, select it and press F1.

  3. Since the error list contains numerous entries, you can choose to display particular types of errors (such as ones with greater severity). Select Options menu bar choice and then Include followed by the type of error to display the different error types. By default, all error types, excluding information messages, are displayed.
  4. Double-click on the message. Show lines appear containing error messages for any errors found in the file.
  5. All of the errors you should receive are information messages. If you receive other errors it is probably because the library CUSTAPPxx is missing from the library list on the AS/400. This can happen if you exit CODE/400 after completing a lesson in an exercise and return at another time without adding the library CUSTAPPxx to the library list. To correct the problem from CPO select Project > Actions > Add library to library list.... Click OK on the Confirm action window. Enter the library CUSTAPPxx.
  6. Click OK.
  7. To verify that the errors have been corrected, select the Actions menu bar in the CODE Editor, then select Verify program, then No prompt. A message appears in the message line at the bottom of the Editor window to let you know when the verifier function is finished (in this case, without errors).
  8. Click on to indicate that you've done all the steps.