In AMT-COBOL there are two different ways to display a help screen to the end-user.
The first way is to use the 'Help Screens'
node of the form.
These screens are called by pressing the 'F1' button on runtime.
Depending on the defined help screens on a form, one of the following actions will
happen after pressing 'F1' on runtime:
See 'Help Screens' for information on how to define the screens.
The second way is to call a dynamically created help screen from a COBOL program using the following syntax:
CALL 'SHOWHELPSCREEN' USING '<Help Content>'.| Parameter | Description |
| <Help Content> | A variable or literal containing the content of the help screen to be displayed, including optional HTML formatting. |
The help screen will then be displayed when returning to the same form. Switching to an other form will clear the help screen request.
working-storage section.
...
01 HELP-SCREEN.
03 HELPHTMLBEGIN PIC X(41) VALUE '<span style="color:blue;font-size:20px;">'.
03 HELPCONTROL PIC X(20).
03 HELP1 PIC X(25) VALUE '<br>is a control used to '.
03 HELPCONTROLFUNCTION PIC X(30).
03 HELP2 PIC X(29) VALUE '.<br>Located on the form:<br>'
03 HELPFORM PIC X(20).
03 HELPHTMLEND PIC X(7) VALUE '</span>'.
procedure division.
...
0900-display-help.
MOVE SI-FOCUSEDFIELD to HELPCONTROL.
MOVE 'move to the corresponding form' to HELPCONTROLFUNCTION.
MOVE SI-CURRFORM TO HELPFORM.
CALL 'SHOWHELPSCREEN' USING HELP-SCREEN.
GO TO 0400-return-form.