Previous Topic: Program That Finds the Screen IDNext Topic: A Program That Processes PDS Members


Program That Displays the Help Screens

The following help program uses the DISPLAY command to present a panel you have defined in the panel library. You can make the help cursor sensitive by checking the value of &CURSOR. In this program, there are two help panels for general areas of the screen: UH001 for cursor positions 1 to 160 and UH001A for cursor positions 161 to 240. There are also field specific help panels for cursor positions 320 and 332. When the user is finished with a help panel, the program redisplays the application screen and invokes the program that monitors the user's input for PF1.

UHP001   SET A1,&CURSOR       NOTE CURRENT CURSOR POSITION 
         COMPARE A1,160       CURSOR IN POS 160 OR LESS?
         BRANCH LE,GENHELP    GET GENERAL HELP SCREEN 
         COMPARE A1,240       CURSOR IN POS 240 OR LESS?
         BRANCH LE,HELPA      GET HELP FOR SECTION A 
         COMPARE A1,320       CURSOR IN POSITION 320?
         BRANCH EQ,HELPB      GET HELP FOR FIELD B 
         COMPARE A1,332       CURSOR IN POSITION 332?
         BRANCH EQ,HELPC      GET HELP FOR FIELD C
GENHELP  DISPLAY UH001        DISPLAY GENERAL HELP PANEL 
         BRANCH ANY,INP       GO AND WAIT FOR INPUT 
HELPA    DISPLAY UH001A       DISPLAY HELP FOR SECTION A 
         BRANCH ANY,INP       GO AND WAIT FOR INPUT 
HELPB    DISPLAY UH001B       DISPLAY HELP FOR FIELD B 
         BRANCH ANY,INP       GO AND WAIT FOR INPUT 
HELPC    DISPLAY UH001C       DISPLAY HELP FOR FIELD C 
         BRANCH ANY,INP       GO AND WAIT FOR INPUT 
INP      INPUT                WAIT FOR USER TO PRESS ACTION KEY 
         OPTION IMAGE,APPL    REDISPLAY APPLICATION SCREEN 
         BRANCH ANY,CONTINUE     ...