KK Not Sign, in TextMap Command;Procedures, to Display Interactively (TextMap);Right Brace in TextMap Command;TextMap command">Use TextMap to display lines and obtain input from the user. The lines following the TextMap are displayed and the keyboard is freed. Keyboard entry is allowed where "updatable fields" have been indicated by special coding in the lines following the TextMap. The end-of-text line (++/*) terminates the TextMap command.
TextMap may also be entered as MapF.
TextMap has no operands.
Inside a procedure, TextMap will look something like the following:
----------------------------------------------------------
MAPF
COLOSSAL INVESTMENTS SELECTION MENU
&SECURITY
B = BUY
S = SELL
ENTER SELECTION S AND QUANTITY QUAN
++/*
----------------------------------------------------------
When processed, this command will display:
----------------------------------------------------------
OLOSSAL INVESTMENTS SELECTION MENU
NTERNATIONAL BUSINESS MACHINES COMMON
B = BUY
S = SELL
NTER SELECTION _ AND QUANTITY 100
----------------------------------------------------------
(Assuming the value of the variable SECURITY is "INTERNATIONAL BUSINESS MACHINES COMMON", the value of the variable S is " ", the value of the variable QUAN is "100", and the value of the predefined variable PPDVBL is "1" OR "2".)
On this screen, you may enter a value for variable S at the current location of the cursor (after SELECTION) and you may modify the value of the variable QUAN ("100") after QUANTITY. Data cannot be entered in other locations. When you hit ENTER, CLEAR or a PF or PA key, the procedure will continue executing after MAPF's ++/*. The changed values of S and QUAN will be available to the procedure if the user hit ENTER or a PF key, but not if the user hit CLEAR or a PA key.
TextMap displays normal text at the row and column in which it appears on the display lines. However, TextMap does most of its work by being sensitive to special characters in the display lines:
Ampersand (&). If the predefined variable PPDVBL is "1" or "2", and the ampersand is followed immediately by the name of a variable, the value of the variable will be replaced into the display. Display intensity will carry from the preceding text. (This is, in fact, normal variable replacement.)
Left brace (). Starts a low-intensity updatable field. Must be followed immediately by the name of the variable whose value corresponds to the field contents.
Explanation mark (!). Starts a high-intensity updatable field. Must be followed immediately by the name of the variable whose value corresponds to the field contents.
Broken vertical bar (|). Starts a no-display updatable field. Must be followed immediately by the name of the variable whose value corresponds to the field contents.
Right brace (). Ends an updatable field. Any following text will be displayed in low intensity.
Not symbol (^). Ends an updatable field. Any following text will be displayed in high intensity.
Common combinations are:
FIELD Low intensity field, low intensity non-field text
!FIELD High intensity field, low intensity non-field text
FIELD ^ Low intensity field, high intensity non-field text
The length of the updatable field is determined by the position of the starting and ending characters. Since the name of the variable that corresponds to a field must also be placed between the starting and ending characters, it is not possible for a the name of a variable used in a TextMapto be longer than its value.
Notes
The two end-field characters can be inserted anywhere in non-updatable text to change the intensity of subsequent text. Their use is not restricted to terminating an updatable field.
A variable that corresponds to a field must have been previously declared as a character variable. Its declared length must exactly match the number of positions between the field start character and the field end character.
If the variable was declared with CASE=U, input data is translated to upper case on receipt from the map.
There must be at least one updatable field defined within a TextMap screen.
The TextMap must not have more lines than the user's current screen size.
If predefined variable PPDALARM is set to "1" when the TextMap is executed, the terminal will beep. Any other value will suppress this function.
If predefined varaible PPDCSFLD is set to the name of a variable which appears as a field in the TextMap, the initial cursor position will be at the beginning of that field.
The key that the user entered to transmit the screen is available in the predefined variable PPDKEY. PPDKEY assumes one of the following values:
ENTER
CLEAR
PA1, PA2, PA3
PF1, PF2, ..., PF24
The position of the cursor when the user transmitted the screen is available in the predefined variables SIBCSROW and SIBCSCOL.
If any fields were changed by the user, predefined variable PPDMSGF will have the value "1" after the TextMap. Otherwise it will be "0".
Return Codes
OK Successful.
When Valid
TextMap can only be used in an online procedure.
Examples
Within an online procedure, interact with the user to get a job name to submit:
------------------------------------------------------------------------ .ip
DECLARE JOB,CHAR,8,V
SET PPDVBL,1
MAPF
-AP20- ACCOUNTS PAYABLE SYSTEM
ENTER JOB TO BE RUN: JOB
AVAILABLE JOBS
-------- -------------------------------
ESAP010 VENDOR LISTING
ESAP020 ACCOUNTS PAYABLE AGING
ESAP030 PAYMENTS SUMMARY
ESAP040 CASH PAYMENTS JOURNAL
++/*
SUBMIT &JOB
------------------------------------------------------------------------ .ip