HLPRTN (Help Return) keyword for display files

You use this file-level or record-level keyword to return control to your program when you press the Help key.

If HLPRTN is not specified, online help information associated with the current cursor location is displayed.

See System/36 environment considerations for display files for special considerations when you specify the HLPRTN keyword in files that are used in the System/36 environment.

The format of the keyword is:
HLPRTN[(response-indicator ['text'])]

If you specify a response indicator, the response indicator is set on and returned to your program. No input data is transmitted from the device. Processing is similar to that of a command attention key.

The optional text is included on the computer printout created at program compilation time to explain the intended use of the indicator. This text has no function in the file or program other than as a comment. The single quotation marks are required. If you specify more than 50 characters between the single quotation marks, the text is truncated to 50 characters on the program computer printout.

HLPRTN at either the file or record level takes priority over any HLPRCD, HLPPNLGRP, or HLPDOC keywords. Any HLPRTN keyword found in the file is processed before any other applicable help keyword.

When you specify HLPRTN, control might or might not return to your program, depending on whether you use an option indicator:
  • If you specify HLPRTN without an option indicator, control returns to your program when you press the Help key. A warning message appears at creation time if you specify an unoptioned HLPRTN keyword on a file or record containing H specifications.
  • If you specify HLPRTN with an option indicator, control returns to your program if the option indicator is on at the time the record is displayed. The H specifications are used if the option indicator is off.

Option indicators are valid for this keyword.

Example 1

The following example shows how to use the HLPRTN keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A                                      HELP
     A                                      HLPRCD(GENERAL)
     A          R RECORD1
     A  02                                  HLPRTN
     A          H                           HLPARA(1 1 3 10)
     A                                      HLPRCD(HELPREC1)
     A            FIELD1        10A  B  2  2
     A          R RECORD2                   HLPRTN
     A            FIELDA         5A  B 10  7
     A

If indicator 02 is on when RECORD1 is written to the display, control will return to the user program when the Help key is pressed. If indicator 02 is off, online help information record HELPREC1 or GENERAL will be displayed when the Help key is pressed, depending on the position of the cursor. When RECORD2 is displayed, control will return to the user program when the Help key is pressed.

Example 2

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A                                      HELP
     A  01                                  HLPRTN
     A                                      HLPRCD(GENERAL)
     A          R RECORD1
     A          H                           HLPARA(1 1 3 10)
     A                                      HLPRCD(HELPREC1)
     A            FIELD1        10A  B  2  2
     A          R RECORD2
     A            FIELDA         5A  B 10  7
     A

If indicator 01 is on, control returns to your program when you press the Help key regardless of the cursor position.