Exercise. CA CA TPX Session Management
Reklamë
Reklamë
A Program That Displays System Information
The following COMPARE statement compares the value of &TAID with "PF2" and sets a condition code that is used by the BRANCH statement:
COMPARE '&TAID','PF2'
BRANCH EQ,SYS2
If the condition code is EQ (indicating that the user pressed the PF2 key) the program goes to the statement labeled SYS2, which displays the System 2 News screen. If the condition code is NE (indicating that the user did not press PF2), the program goes to the next statement, which checks to see if the user pressed PF3. If the user did press
PF3, the BRANCH statement terminates the ACL/E program.
The program uses the same logic to determine whether it should return to the menu from a news screen. If the user presses PF3 while viewing a news screen, the program returns to the statement labeled MNU that displays the menu screen (MNU001).
Create Alternate Screens
You can create panels for alternate screens using any text editor, and you must store them where CA TPX expects to find them. In z/OS, store your panel definitions as a data set member in a library referenced by the PANELS DD statement in your CA TPX startup procedure. In VM, store the panel definitions as the panel name with file type PANELS and mode E.
Exercise
Create the program and store it as SYSINFO1. Create the panels shown here in the specified file. Explain what you would need to do to display information about other systems at your site. Indicate what you would need to add to create a hierarchy of menus—for example, to display a System 1 and a System 2 menu, each listing three system-specific information screens.
Note: If the user presses a key other than PF1, PF2, or PF3, the program as it is written will display the System 1 News screen since that is the next statement in the program.
Change the program so that it displays an error message if the user does not press PF1 or PF2.
Chapter 3: Tutorial 37
Shkarko
Reklamë