Return codes

These return codes are possible:
 0
If the panel definition contains neither a )REINIT nor a )PROC section, the Enter key was pressed, or a scroll command was entered. Any of these occurred:
  • One row was selected in the scrollable part of the display. The CRP is set to point to that table row and the row is retrieved. The input fields from the selected model set on the display are then stored in the function pool.
  • The user entered information into the fixed portion of the display.
  • All of these:
    • A scroll return to function has been specified (ZTDRET defined to UP, DOWN, or VERTICAL).
    • More rows are needed to fill a scroll request.
    • No selected rows remain to be processed.

If the panel definition contains a )REINIT or )PROC section, there is the additional possibility that the user entered no information and just pressed the Enter key.

 4
The Enter key was pressed or a scroll command was entered. The first or both of these occurred:
  • Two or more rows in the scrollable part of the display were selected. The CRP is set to the first selected row and the row is retrieved. The input fields from the selected model set on the display are then stored in the function pool.
  • The user entered information into the fixed portion of the display.
  • If scroll return to function has been specified, and two or more rows are selected for processing, TBDISPL returns a return code 4 until all selected rows are processed. You process the request for more rows to be added to the table only after all selected rows have been processed; that is, only when ZTDSELS has a value of 0.

For subsequent TBDISPL requests with no panel name and no message-id, return code 4 is issued for each request until one selected row remains to be accessed. For this last row, a return code of zero is issued by TBDISPL, still specified with no panel name and no message-id. The variable ZTDSELS will have a value of one.

 8
The END or RETURN command was entered. For panels created by the conversion utility, CANCEL and EXIT commands also give return code 8. If CANCEL and EXIT is requested from a panel displayed using TBDISPL service calls and the panel was defined with Dialog Tag Language (DTL), the dialog manager returns the command in ZVERB and sets a return code of 8 from the display screen. The CRP is set to the first of any selected rows in the scrollable part of the display. The input fields from the selected model set on the display are then stored in the function pool.

If no rows were selected, the CRP is at the top (zero).

To process all selected rows when END or RETURN was entered, continue to issue TBDISPL requests with no panel name or message-id specified until ZTDSELS is one.

If you enter the END command on a table display panel, a subsequent redisplay will result in a return code of 8.

The user might have entered information into the fixed portion of the display.

12
The specified panel, message, cursor field, or message location field could not be found.
16
Truncation or translation error in storing defined variables.
20
Severe error.