home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pds.zip / PDS.DOC < prev    next >
Text File  |  1994-07-05  |  157KB  |  4,807 lines

  1.  
  2.  
  3.  
  4.  
  5.                         Panel Display System (PDS)
  6.  
  7.           Base System and Rexx Application Programming Interface
  8.  
  9.                                  V1.05
  10.  
  11.  
  12.          Copyright (c) Rick W. Hodgson 1994; All Rights Reserved;
  13.  
  14.  
  15.                              June 22, 1994
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.                                                                                 
  53.  
  54.  
  55.  
  56.  
  57.                            Panel Display System (PDS)                           
  58.  
  59.  
  60.  
  61.  
  62.  OS/2, Presentation Manager and PM are trademarks of IBM Corporation.
  63.  
  64.  Use of any other copyrighted material without any mention of the owner of
  65.  material is unintentional and should be brought to my attention so that I
  66.  update this document.
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.                                                                                 
  107.  
  108.  
  109.  
  110.  
  111.                            Panel Display System (PDS)                           
  112.  
  113.                                Section                                     Page
  114. 1  PDS Overview                                                               1
  115. 1.1  Character Based User Interface                                           1
  116. 1.2  Panels                                                                   2
  117. 1.3  Fields                                                                   4
  118. 1.3.1  Field Definition and Attributes                                        4
  119. 1.3.1.1  Text Fields                                                          5
  120. 1.3.1.2  Output Fields                                                        5
  121. 1.3.1.3  Input Fields                                                         6
  122. 1.3.1.3.1  Default PDS Input Field behavior                                   7
  123. 1.3.1.4  PDS Output/Input Field Variable Name Substitution                    8
  124. 1.4  Variables                                                                9
  125. 1.4.1  Variable's Attributes                                                 10
  126. 1.4.1.1  String Variables                                                    10
  127. 1.4.1.2  Floating Point Variables                                            11
  128. 1.4.1.3  Integer Variables                                                   11
  129. 1.4.1.4  Right Adjusted Variables                                            12
  130. 1.4.1.5  Left Zero Filled Variables                                          12
  131. 1.4.1.6  Global Variables                                                    12
  132. 1.4.1.7  Static Variables                                                    13
  133. 1.5  Attention Identification Keys (AID Keys)                                14
  134. 1.5.1  Field Data Verification Procedure/Routine                             15
  135. 1.5.1.1  Field Data Verification Procedure/Routine Return Codes              19
  136. 1.6  Exit Identification Keys (XID Keys)                                     21
  137. 2  Panel Definition Language                                                 22
  138. 2.1  Creating PDL Statements                                                 22
  139. 2.2  Order of PDL Statements                                                 23
  140. 2.3  Panel Attributes Definition Statements.                                 32
  141. 2.3.1  ")PANEL" Panel Definition Statement                                   33
  142. 2.3.1.1  "NAME=" Panel Name Operand                                          33
  143. 2.3.1.2  "CLS=" Clear Screen Option                                          33
  144. 2.3.1.3  "AID=" Attention ID Option                                          33
  145. 2.3.1.4  "XID=" Exit ID Option                                               34
  146. 2.3.1.5  "ATTR=" Attribute Character(s) Option                               34
  147. 2.3.2  ")AID" Attention ID Definition Statement                              36
  148. 2.3.3  ")XID" Exit ID Definition Statement                                   36
  149. 2.3.4  ")VARS" Substitution Variable Name Statement                          37
  150. 2.3.5  ")COLORS" Field Attribute Colors Statement                            37
  151. 2.3.5.1  "OUTPUT=" Output Color Option                                       38
  152. 2.3.5.2  "INPUT=" Input Color Option                                         38
  153. 2.3.5.3  "TEXT=" Text Color Option                                           38
  154. 2.3.5.4  "BCKG=" Background Color Option                                     38
  155. 2.3.6  ")PROC" Data Verification Procedure Definition Statement              39
  156. 2.3.7  ")PROCEND" Data Verification Procedure Delimiter Statement            39
  157. 2.3.8  ")END" Panel Delimiter Statement                                      39
  158. 2.3.8.1  ")BLANK" Blank the Last Row Option                                  39
  159.  
  160.                                                                                 
  161.  
  162.  
  163.  
  164.  
  165.                            Panel Display System (PDS)                           
  166.  
  167.                                Section                                     Page
  168. 2.3.8.2  ")NOWAIT" Defer End User Input Option                               39
  169. 2.3.8.3  ")NODISPLAY" Suppress Panel Display Option                          40
  170. 2.3.8.4  "FLDS=" Field Definition Option                                     40
  171. 2.4  Panel Row Definition Statements.                                        42
  172. 2.4.1  Current Row Panel Row Definition Records                              42
  173. 2.4.2  ")NULL" Null Row Definition Statement                                 43
  174. 2.4.3  ")BLANK" Blank Row Definition Statement                               43
  175. 2.4.4  ")ROW" Explicit Row Panel Row Definition Statement                    43
  176. 2.4.4.1  Target )ROW Row Option                                              44
  177. 2.4.4.2  Target )ROW Column Option                                           44
  178. 2.4.4.3  Target )ROW "FLDS=" Field Definition Option                         44
  179. 2.5  Miscellaneous PDL Statements                                            46
  180. 2.5.1  ")REM" Remarks Statement                                              46
  181. 2.6  Defining Panel Rows and Fields                                          47
  182. 3  REXX PDS Application Programming Interface                                51
  183. 3.1  Defining the REXX PDS, "RXPD", interface to OS/2                        51
  184. 3.2  Initializing the RXPD environment with rxPDInit                         52
  185. 3.3  Terminating the RXPD environment with rxPDTerm                          54
  186. 3.4  Displaying a PDS panel with rxPDDisplay                                 55
  187. 3.5  Saving an image of the display with rxPDSaveScreen                      56
  188. 3.6  Restoring an image of the display with rxPDRestoreScreen                56
  189. 3.7  Setting an error or informational message with rxPDSetMsgText           56
  190. 3.8  Setting the target field for the cursor with rxPDSetCursorFld           62
  191. 3.9  Defining variable attributes with rxPDVarDefine                         64
  192. 3.10  Deleting variable attributes with rxPDVarDelete                        65
  193. 3.11  Querying a panel's field 'MDT' state with rxPDQueryMDT                 66
  194. 3.12  Querying a panel's modified field names with rxPDQueryMDTFld           67
  195. 3.13  Retrieving predefined variable values with rxPDVDefVarRetrieve         69
  196. 3.14  Dynamically setting Field colors with rxPDSetFldColors                 71
  197. 3.15  Dynamically setting Panel colors with rxPDSetPnlColors                 73
  198. APPENDIX A  - REXX AID/XID Keys and other 'Z' Values                         74
  199. APPENDIX B  - Color values for PDS fields and background                     82
  200. Index                                                                        83
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.                                                                                 
  215.  
  216.  
  217.  
  218.  
  219.                            Panel Display System (PDS)                           
  220.  
  221.                                Figures                                     Page
  222. Figure 1. - Simple PDS Panel                                                  3
  223. Figure 2. - Example of ")REM" ")AID" and ")PROC"                             17
  224. Figure 3. - Example of a "COMPOSITE" display                                 25
  225. Figure 4. - Example of a "POPUP" panel                                       28
  226. Figure 5. - Example of a "BASE" panel                                        30
  227. Figure 6. - Example of the ")ROW" statement                                  45
  228. Figure 7. - Example of the ")ROW" statement                                  46
  229. Figure 8. - Example of a "COMPOSITE" display                                 49
  230. Figure 9. - Example of a "COMPOSITE" display                                 50
  231. Figure 10. - Example of setting message text                                 58
  232. Figure 11. - Example of a short message                                      59
  233. Figure 12. - Example of a long message                                       60
  234. Figure 13. - Example of a "POPUP" panel                                      61
  235. Figure 14. - Example of setting a cursor field                               63
  236. Figure 15. - Example of retrieving variables                                 71
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                                                                                 
  269.  
  270.  
  271.  
  272.  
  273.                            Panel Display System (PDS)                           
  274.  
  275. ╔══════════════════════════════════════════════════════════════════════════════╗
  276. ║ 1                                PDS Overview                                ║
  277. ╚══════════════════════════════════════════════════════════════════════════════╝
  278.  
  279. The Panel Display System provides a simple yet powerful method by which an
  280. application developer can create an interactive user interface without requiring
  281. OS/2 Presentation Manager (PM).
  282.  
  283. The method by which information is presented by the application to the end user
  284. and information from the end user is returned to the application is via a
  285. construct known as a 'PANEL'.
  286.  
  287. A panel is defined by the developer and displayed by the application thru calls
  288. to the REXX application programming interface (API), herein referred to as the
  289. REXX Panel Display API or rxPD, or thru calls to an optional high level language
  290. interface.
  291.  
  292. As the end user interacts with a displayed panel, the PD system takes care of
  293. most keystrokes and combinations of keystrokes, known as chords, without the
  294. application having to interpret these keystrokes.
  295.  
  296. The application can, however, be written to handle any keystroke that might
  297. require special handling other than the PDS default for that key or chord.
  298.  
  299. The following sections describe various aspects of the PD system at a 'concepts'
  300. level.
  301.  
  302. Other sections describe the Panel Definition Language (PDL) and the REXX
  303. application interface.
  304.  
  305.  
  306.   1.1 Character Based User Interface                                          
  307.  
  308.  
  309. The PD system uses what is known as a Character User Interface or CUI.
  310.  
  311. This is in contrast to a Graphical User Interface, or GUI, such as OS/2's
  312. Presentation Manager (PM).
  313.  
  314. A CUI interface can be used wherever there is a need to interact with the end
  315. user without the requirement for presenting data in a graphical format.
  316.  
  317. One such interaction would be for a high speed data entry application where the
  318. end user is keying in data collected off line thru non-computerized methods.
  319.  
  320. Another situation where a quick CUI interface can be used is where a batch job
  321.  
  322.                                  1 PDS Overview                        Page   1
  323.  
  324.  
  325.  
  326.  
  327.                            Panel Display System (PDS)                           
  328.  
  329. might need to present an error message and ask for a response before continuing
  330. the job or cancelling its execution.
  331.  
  332. More sophisticated CUI applications can be written using the PD system including
  333. the use of popup windows, context sensitive help and accelerator keys.
  334.  
  335. The PD system is best suited for the porting or right-sizing of current
  336. character based applications from mainframe OSs, DOS or UNIX to OS/2.
  337.  
  338. The PD system is robust enough for most applications, and continuing
  339. enhancements to PDS will make it even more useful for more applications.
  340.  
  341.  
  342.   1.2 Panels                                                                  
  343.  
  344.  
  345. A 'Panel' is a collection of 'Fields' which are used to format and create the
  346. display presented to the end user.
  347.  
  348. The panel can be built from a composite of other panels which, to the user,
  349. looks like a single display of information.
  350.  
  351. Panels are defined in a library which is processed when the application
  352. initializes an instance of PDS for its use. Normally each library is used to
  353. define panels used only by a single application. A single application however
  354. could use multiple libraries and initialize a library only when a panel defined
  355. in that library is needed.
  356.  
  357. Creative use of composite panels can lead to some rather sophisticated displays
  358. such as popups and simple animation sequences.
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.                        1.1 Character Based User Interface              Page   2
  377.  
  378.  
  379.  
  380.  
  381.                            Panel Display System (PDS)                           
  382.  
  383.                           Figure 1. - Simple PDS Panel                        
  384.  
  385. Figure 1 is a simple PDS panel definition composed of a number of panel and row
  386. definition records each of which defines one or more fields.
  387.  
  388. )PANEL NAME=DEMO0001 CLS=Y
  389.  
  390.                  ╔═════════════════════════════════════════════╗
  391.                  ║            My PDS Application               ║
  392.                  ║                                             ║
  393.                  ║ Old Value..:%sOldValue           +          ║
  394.                  ║                                             ║
  395.                  ║ New Value..:_sNewValue           +          ║
  396.                  ║                                             ║
  397.                  ╚═════════════════════════════════════════════╝
  398. )END )BLANK FLDS="<Press ESC to reset, F3 to cancel or F1 for help>"
  399.  
  400.  
  401.    Figure 1 - Complete PDS panel whose name is defined to PDS as 'DEMO0001'.
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.                                    1.2 Panels                          Page   3
  431.  
  432.  
  433.  
  434.  
  435.                            Panel Display System (PDS)                           
  436.  
  437.   1.3 Fields                                                                  
  438.  
  439.  
  440. There are three types of fields.
  441.  
  442. 1. TEXT   - This is the default field which defines the static text that
  443.             composes the body of the panel.
  444.  
  445. 2. OUTPUT - This is a field that instead of text, defines a variable that PDS is
  446.             to use to retrieve the data necessary to fill in the field where the
  447.             variable is defined.
  448.  
  449. 3. INPUT  - This is a field that like an 'OUTPUT' field is used to define a
  450.             variable to use to fill in the field and it is also the variable
  451.             used to store any data the user types into that field.
  452.  
  453. Refering back to Figure 1, there is one 'OUTPUT' field, one 'INPUT' field and
  454. all of the rest, including blank space and lines, are 'TEXT' fields.
  455.  
  456.  
  457.   1.3.1 Field Definition and Attributes                                       
  458.  
  459.  
  460. Fields are defined for a panel by the use of an escape character.
  461.  
  462. Each field type has a default escape character.
  463.  
  464. 1. TEXT   - All fields are by default 'TEXT' fields and no escape character is
  465.             necessary except when an 'OUTPUT' or 'INPUT' field has been defined
  466.             and more static panel 'TEXT' needs to be defined. In that case, the
  467.             default 'TEXT' escape character is the '+' character.
  468.  
  469. 2. OUTPUT - The default 'OUTPUT' escape character is the '%' character.
  470.  
  471. 3. INPUT  - The default 'INPUT' escape character is the '_' character.
  472.  
  473. As can be seen in Figure 1, the text fields are the box created by the use of
  474. ANSI characters, the phrases 'My PDS Application', 'Old Value...:', 'New
  475. Value...:', the blank line preceeding the box and a special 'FLDS=' operand
  476. declared on the ')END' panel definition statement.  The output field is the one
  477. where the word 'sOldValue' is found. The input field is the one where the word
  478. 'sNewValue' is found. The words 'sOldValue' and 'sNewValue' are in fact variable
  479. names defined to PDS as the source of data for the both the output and input
  480. fields and the target for any data entered by the user into the input field.
  481.  
  482. Note also, the end of a field is determined by the beginning of the next field
  483.  
  484.                                    1.3 Fields                          Page   4
  485.  
  486.  
  487.  
  488.  
  489.                            Panel Display System (PDS)                           
  490.  
  491. or the end of the row definition record.
  492.  
  493. Each field type has a default set of characteristics known as it's attribute.
  494.  
  495. Other characteristics can be added to an input or output field by modifying the
  496. attributes of the variable defined for that field. This is discussed in a later
  497. section.
  498.  
  499.  
  500.   1.3.1.1 Text Fields                                                         
  501.  
  502.  
  503. One characteristic of 'TEXT' fields are that they are static fields whose data
  504. is contained wholey within the panel definition itself. These fields can not be
  505. changed or manipulated in any way by the application.
  506.  
  507. By default, all fields in a panel are text fields and do not require the use of
  508. the text field escape character. The text escape character is used when static
  509. text needs to be defined in a row at a place following either an output or input
  510. field.
  511.  
  512. Example:
  513.  
  514.       This is static text followed by %sOutputVar +and more static text.
  515.  
  516. In the above example of a row definition record, there are two fields of static
  517. text and one output field. The output field is defined to contain data from the
  518. variable 'sOutputVar' and is to be a maximum of 12 bytes in length as determined
  519. by the number of bytes from one escape character to the next.
  520.  
  521. Another characteristic of a 'TEXT' field is that it can contain any character
  522. except for one of the escape characters that by their very nature define the
  523. start of a different field.
  524.  
  525. The color of a text field is determined first by the PD system default for
  526. 'TEXT' fields, second by the 'TEXT' color defined when the PD system is
  527. initialized to process a panel library and lastly by the 'TEXT=' operand of the
  528. ')COLORS' panel definition statement.
  529.  
  530.  
  531.   1.3.1.2 Output Fields                                                       
  532.  
  533.  
  534. The main characteristic of an 'OUTPUT' field is that it defines a variable,
  535. known to PDS, which contains data to be merged with the panel when the panel is
  536. displayed.
  537.  
  538.                      1.3.1 Field Definition and Attributes             Page   5
  539.  
  540.  
  541.  
  542.  
  543.                            Panel Display System (PDS)                           
  544.  
  545.  
  546. The variable name must be a single word and must not contain an escape
  547. character. The data contained within the 'OUTPUT' variable can be any character
  548. including escape characters. This is because the escape characters are processed
  549. when the PDS system is initialized prior to displaying the panel and not when
  550. the display itself is built.
  551.  
  552. The length of an 'OUTPUT' field is determined by the number of character
  553. positions from the 'OUTPUT' field escape character up to any succeeding escape
  554. character or the end of a panel row definition record.
  555.  
  556. The default type of data that PDS expects for 'OUTPUT' fields are character
  557. strings. The datatype for a field is overridden by defining the variable for
  558. that field with a different datatype.
  559.  
  560. The color of an output field is determined first by the PD system default for
  561. 'OUTPUT' fields, second by the 'OUTPUT' color defined when the PD system is
  562. initialized to process a panel library and lastly by the 'OUTPUT=' operand of
  563. the ')COLORS' panel definition statement.
  564.  
  565.  
  566.   1.3.1.3 Input Fields                                                        
  567.  
  568.  
  569. 'INPUT' fields have many characteristics.
  570.  
  571. One characteristic is that they function exactly like 'OUTPUT' fields when the
  572. physical display is being constructed from the panel definition.
  573.  
  574. The main characteristic about an 'INPUT' field is that these fields are where
  575. the end user can and will be expected to enter data required by the application.
  576.  
  577. The length of an 'INPUT' field is determined by the number of character
  578. positions from the 'INPUT' field escape character up to any succeeding escape
  579. character or the end of a panel row definition record.
  580.  
  581. The default type of data that PDS expects for 'INPUT' fields are character
  582. strings. The datatype for a field is overridden by defining the variable for
  583. that field with a different datatype.
  584.  
  585. The color of an input field is determined first by the PD system default for
  586. 'INPUT' fields, second by the 'INPUT' color defined when the PD system is
  587. initialized to process a panel library and lastly by the 'INPUT=' operand of the
  588. ')COLORS' panel definition statement.
  589.  
  590.  
  591.  
  592.                              1.3.1.2 Output Fields                     Page   6
  593.  
  594.  
  595.  
  596.  
  597.                            Panel Display System (PDS)                           
  598.  
  599.   1.3.1.3.1 Default PDS Input Field behavior                                  
  600.  
  601.  
  602. The PD system has a default behavior for most keystrokes and chords that the
  603. user might use for an input field.
  604.  
  605. One behavior is to 'ECHO' the keystroke into the 'INPUT' field. This is the
  606. default behavior for the alpha-numeric keys.
  607.  
  608. Other behaviors are defined for some keys which perform much as one would
  609. expect them to do when processing input data.
  610.  
  611. 'TAB'         - Tab to the first position in the next input field.
  612. 'BACK_TAB'    - Tab to the first position in the preceeding input field.
  613. 'INSERT'      - Alternate the 'ECHO' behavior between 'INSERT' and 'OVERTYPE'.
  614. 'DELETE'      - Delete the character under the cursor and left shift the rest.
  615. 'HOME'        - Tab to the first position in the current input field.
  616. 'END'         - Tab to the first blank trailing the last non-blank character
  617.                 in the current input field.
  618. 'UP_ARROW'    - Tab to the first position of the first input field on the
  619.                 preceeding panel row.
  620. 'DOWN_ARROW'  - Tab to the first position of the first input field on the
  621.                 succeeding panel row.
  622. 'LEFT_ARROW'  - Move the cursor left one position within the current input
  623.                 field. If already at the first position, move to the last
  624.                 position within the preceeding input field.
  625. 'RIGHT_ARROW' - Move the cursor right one position within the current input
  626.                 field. If already at the last position, move to the first
  627.                 position within the succeeding input field.
  628. 'ENTER'       - The default action for this field is identical to that for
  629.                 the 'DOWN_ARROW' field.
  630.  
  631. There are also some default actions defined when one of the following are
  632. chorded with the 'CONTROL' key:
  633. 'DELETE'      - Delete all characters from the current position to the end of
  634.                 the input field.
  635. 'HOME'        - Tab to the first position in the first input field defined for
  636.                 the panel.
  637. 'END'         - Tab to the first blank trailing the last non-blank character
  638.                 in the last input field defined for the panel.
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.                    1.3.1.3.1 Default PDS Input Field behavior          Page   7
  647.  
  648.  
  649.  
  650.  
  651.                            Panel Display System (PDS)                           
  652.  
  653.   1.3.1.4 PDS Output/Input Field Variable Name Substitution                   
  654.  
  655.  
  656. Because not all fields should be as wide or wider than the name of the variable
  657. used to hold the data for an output or input field, there is a mechanism by
  658. which the developer can define a field that is shorter in length than the
  659. variable name for that field.
  660.  
  661. This mechanism uses a separate list of variable names, specified for the entire
  662. panel, which are used to define variable names for each field which is either 1
  663. byte in width or which uses the PD system's variable name substitution escape
  664. character.
  665.  
  666. The list of substitution variables is defined by the ')VARS' statement.
  667.  
  668. The field variable name substitution escape character is the '*' character.
  669.  
  670. Example:
  671.  
  672.      )VARS sField1 sField2
  673.              --- other PDL statements ---
  674.      The variable sField1 is substituted here=> %+ and
  675.      the variable sField3 is not substituted here=> %sField3 +;
  676.      the variable sField2 is substituted here=> _* +;
  677.  
  678. In this example the output field "%+" is only 1 byte wide.  This causes PDS to
  679. use the first variable name defined by the ")VARS" statement. This results in
  680. the variable name 'sField1' being defined as the source of data for this field.
  681. The maximum width of data that will be displayed from the 'sField1' variable is
  682. 1 byte.
  683.  
  684. The input field "_*  +" has the PDS substitution escape character defined as its
  685. variable name. This escape character is replaced with the variable 'sField2'
  686. since the variable 'sField1' has already been used by the preceeding output
  687. field. The maximum width of data that will be displayed or can be keyed into the
  688. field by the end user is 3 bytes.
  689.  
  690. Note that substitutable fields can be intermixed with non-substitution fields.
  691. This is shown by the 'sField3' field being in between the other two fields in
  692. the PDS panel processing order.
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.            1.3.1.4 PDS Output/Input Field Variable Name Substitution   Page   8
  701.  
  702.  
  703.  
  704.  
  705.                            Panel Display System (PDS)                           
  706.  
  707.   1.4 Variables                                                               
  708.  
  709.  
  710. Variables are collections of data that are accessable by a published name for
  711. that data.
  712.  
  713. PDS uses variables to communicate data and other information between PDS and the
  714. application.
  715.  
  716. PDS uses variables to retrieve data from the application in order to merge that
  717. data into a panel to be displayed to the end user. It also uses variables to
  718. send data, keyed into a panel by the end user, back to the application.
  719.  
  720. In a REXX PD application, all output and input variables defined on a panel are
  721. automatically available to the PD system without the application having to
  722. provide any information other than the variable's name. The only restriction is
  723. that the variable must have been defined in the REXX shared variable pool prior
  724. to the display of any panel that requires data from that variable. Note, the
  725. restrictions of accessability to shared variables imposed on REXX 'PROCEDURE's
  726. are also imposed upon the rxPD system in that they do not exist unless defined
  727. within the 'PROCEDURE' or 'EXPOSE'd by the procedure so that a preceeding
  728. definition is available. If a REXX variable is not defined or not accessable,
  729. the act of retrieving the data from that variable returns the variable's name as
  730. the data.
  731.  
  732. Also, if the data retrieved from a variable is longer than the width of the
  733. output or input field that defines that variable, then the data is truncated to
  734. the width of the target field.
  735.  
  736. Named variables are also used to communicate information not related to a data
  737. field on a panel.
  738.  
  739. One such variable is 'ZCURVAR'. This variable is updated by PDS when an 'AID' or
  740. 'XID' key is pressed (discussed in detail in a later section). The information
  741. contained in this variable is the cursor position within an input field when the
  742. 'AID/XID' key was pressed and the name of that input field.
  743.  
  744. There are two routines available to a REXX PD application which help with the
  745. interaction between the rxPD application and the rxPD system thru the use
  746. of 'Z' variables and data variables.
  747.  
  748. The first is the rxpdZVarDefine routine. This routine can be used to create
  749. 'Z' variables whose values are needed to test 'AID' or 'XID' keys and to define
  750. alternate attributes for data variables.
  751.  
  752. One such variable is the 'ZENTER' variable.
  753.  
  754.                                  1.4 Variables                         Page   9
  755.  
  756.  
  757.  
  758.  
  759.                            Panel Display System (PDS)                           
  760.  
  761.  
  762. The 'ZENTER' variable is used by an rxPD application to test if the user pressed
  763. the 'ENTER' key.
  764.  
  765. Another such variable is the 'ZVTYPE_LZEROFILL' used to assign a 'Left Zero
  766. Fill' attribute to a data variable.
  767.  
  768. Data variables can be defined to the rxPD system thru the rxPDVarDefine routine.
  769.  
  770. The definition of REXX variables to rxPD is done solely to define additional
  771. attributes to a variable. These attributes will be used by the PD system to
  772. modify the behavior of a variable when it is processed by PDS as the result of
  773. being displayed by a panel.
  774.  
  775. The act of defining a variable to PDS by an rxPD application does not override
  776. the REXX shared variable pool restrictions and make the variable globally
  777. available.
  778.  
  779. In a high level language other than REXX, variables must be defined to the rxPD
  780. system in order to make their data accessable. Discussion of this is included in
  781. the optional 'HLL', High Level Language, interface for PDS.
  782.  
  783.  
  784.   1.4.1 Variable's Attributes                                                 
  785.  
  786.  
  787. In a REXX environment, all variables are, by default, defined as being a string
  788. of characters.
  789.  
  790. The PD system provides other attributes which can be applied to a variable and
  791. which will modify the action that PDS takes on that variable.
  792.  
  793.  
  794.   1.4.1.1 String Variables                                                    
  795.  
  796.  
  797. This is the default attribute for all variables and as such does not need to be
  798. defined for any variable in the rxPD environment.
  799.  
  800. The name of the 'Z' value for this attribute is 'ZVTYPE_ZSTRING'.
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.                                  1.4 Variables                         Page  10
  809.  
  810.  
  811.  
  812.  
  813.                            Panel Display System (PDS)                           
  814.  
  815.   1.4.1.2 Floating Point Variables                                            
  816.  
  817.  
  818. When a variable is defined with this attribute, a number of additional
  819. behaviors are added by PDS to this variable when it is displayed as an output
  820. or input variable.
  821.  
  822. The first is that when displayed by a panel, a floating point precision
  823. attribute is applied to round the variable to a specified number of decimal
  824. positions.
  825.  
  826. If the variable is an input variable, I.E. the variable for an 'INPUT' field,
  827. then PDs will prevent the end user from typing any non-floating point character
  828. and will insure that the field contains a proper floating point number. Once the
  829. input data is determined to be a valid floating point number, PDS will again
  830. apply the precision attribute to the field data before actually updating the
  831. variable itself.
  832.  
  833. Note, a blank field is considered to be a valid value for a floating point
  834. field. The application's predefined 'Data Verification Procedure' for a
  835. panel can verify that a field is non-blank and refuse the field. Further
  836. discussion of 'DVP's can be found in a later section.
  837.  
  838. The name of the 'Z' value for this attribute is 'ZVTYPE_DOUBLE'.
  839.  
  840.  
  841.   1.4.1.3 Integer Variables                                                   
  842.  
  843.  
  844. Like a floating point variable, an integer variable can be defined with a
  845. precision that is applied to the variable to insure the minimum number of
  846. digits is displayed for that integer.
  847.  
  848. If the variable is an input variable, then PDs will prevent the end user from
  849. typing any non-numeric character.  Once the input data is determined to be a
  850. valid integer, PDS will again apply the precision attribute to the data before
  851. actually updating the variable itself.
  852.  
  853. Again, a blank field is considered to be a valid value for an integer variable.
  854.  
  855. The name of the 'Z' value for this attribute is 'ZVTYPE_LONG'.
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.                         1.4.1.2 Floating Point Variables               Page  11
  863.  
  864.  
  865.  
  866.  
  867.                            Panel Display System (PDS)                           
  868.  
  869.   1.4.1.4 Right Adjusted Variables                                            
  870.  
  871.  
  872. All types of data variables can be automatically aligned to the right of an
  873. output or input field when the data is displayed.
  874.  
  875. The name of the 'Z' value for this attribute is 'ZVTYPE_RIGHTADJUST'.
  876.  
  877.  
  878.   1.4.1.5 Left Zero Filled Variables                                          
  879.  
  880.  
  881. Both the floating point and integer types of data variables can, in conjunction
  882. with the 'ZVTYPE_RIGHTADJUST' attribute, be padded on the left with leading
  883. zeros (0).
  884.  
  885. In other words, an integer value of 41 to be displayed in a 5 byte wide output
  886. field with an attribute of 'ZVTYPE_RIGHTADJUST' can be displayed as 00041 with
  887. the addition of the 'ZVTYPE_LZEROFILL' attribute.
  888.  
  889.  
  890.   1.4.1.6 Global Variables                                                    
  891.  
  892.  
  893. At times, some variables need to be defined as 'Global' variables.
  894.  
  895. Global variables are made visable to certain REXX procedures which would not
  896. normally have access to all variables in an rxPD application.
  897.  
  898. The 'ZVTYPE_GLOBAL' attribute is used to define a variable as being 'Global' in
  899. scope.
  900.  
  901. The need for a 'Global' attribute is discussed in the section on 'Data
  902. Verification Procedures' and the 'rxPDVDefVarRetrieve' routine.
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.                         1.4.1.4 Right Adjusted Variables               Page  12
  917.  
  918.  
  919.  
  920.  
  921.                            Panel Display System (PDS)                           
  922.  
  923.   1.4.1.7 Static Variables                                                    
  924.  
  925.  
  926. There are times when it is desirable to display a variable in an 'INPUT'
  927. field without allowing the end user to modify the data in that variable.
  928.  
  929. This behaviour is useful for defining fields which the end user can 'tab'
  930. into and out of but which the end user can not modify.
  931.  
  932. It is useful for conditionally 'locking' and 'unlocking' an 'INPUT' field by
  933. modifying the attribute of the variable without having to define multiple panels
  934. which alternate the field attribute used to display the variable. This alternate
  935. method of defining multiple panels can become very cumbersome given a panel with
  936. a number of fields which need to alternate between 'INPUT' and 'OUTPUT' field
  937. types.
  938.  
  939. Variables with this attribute are 'Static' variables in that their data can NOT
  940. be changed by the end user.
  941.  
  942. The 'ZVTYPE_STATIC' attribute is used to define a variable as being a 'Static'
  943. variable.
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.                             1.4.1.7 Static Variables                   Page  13
  971.  
  972.  
  973.  
  974.  
  975.                            Panel Display System (PDS)                           
  976.  
  977.   1.5 Attention Identification Keys (AID Keys)                                
  978.  
  979.  
  980. An 'AID' key is an 'Attention IDentification' key which is used to indicate what
  981. key(s) the end user must press to notify the application that they are done with
  982. the panel and that any input field data is available to the application.
  983.  
  984. What this means is that when a PDS application asks for a panel to be displayed
  985. and to wait until the end user has entered all required data, that a specified
  986. key or list of keys will return control back to the application.
  987.  
  988. The most common 'AID' key is the 'ENTER' key.
  989.  
  990. A panel can be defined to accept the 'ENTER' key as an 'AID' key by specifying
  991. 'ZENTER' as either a value for the 'AID=' operand on the ')PANEL' definition
  992. statement or as an operand for the ')AID' statement.
  993.  
  994. If a panel has been defined with 'ZENTER' as an 'AID' key and when that panel is
  995. displayed and the end user presses the 'ENTER' key, a number of actions will
  996. take place.
  997.  
  998. 1. All floating point numbers are verified by PDS to contain a proper floating
  999.    point number.
  1000.  
  1001. 2. If a 'Data Verification Procedure' has been defined for a panel, or in the
  1002.    case of the 'HLL' interface if a 'Data Verification Routine' has been
  1003.    provided for the panel, then that 'DVP' will be executed thereby giving that
  1004.    'DVP' the opportunity to validate the input fields within the context of the
  1005.    application.
  1006.  
  1007. 3. If there isn't a 'DVP' or if the 'DVP' says that all of the data is valid
  1008.    application data, then PDS will replace the variables with the data from
  1009.    their respective panel input fields.
  1010.  
  1011. 4. PDS will update the 'ZCURVAR' with the name of the variable which had the
  1012.    cursor focus and the index of the cursor within that field. The 'ZCURVAR'
  1013.    variable is defined as a string variable that contains the index as a blank
  1014.    delimited integer followed by the cursor field name.
  1015.  
  1016.    Example:
  1017.  
  1018.       If the cursor was over the 2nd byte of the sNewValue input field, then
  1019.       'ZCURVAR' would look like having been set by the following REXX statement.
  1020.  
  1021.             ZCURVAR = iFieldIndex||' SNEWVALUE'
  1022.  
  1023.  
  1024.                   1.5 Attention Identification Keys (AID Keys)         Page  14
  1025.  
  1026.  
  1027.  
  1028.  
  1029.                            Panel Display System (PDS)                           
  1030.  
  1031. 5. In the REXX environment, rxPD will return the value of the 'AID' key
  1032.    that caused the attention request. In this example, the REXX 'RESULT'
  1033.    variable will contain the value equal to the 'ZENTER' variable. In
  1034.    the 'HLL' environment, the target 'AID' key field will be updated.
  1035.  
  1036. Almost any key or chord can be defined as an 'AID' key. See Appendix A for the
  1037. current list of available 'AID' keys.
  1038.  
  1039. There are two psuedo keys which can be defined as 'AID' keys.
  1040.  
  1041. The first is 'ZALL'. This means that the application wants to see every
  1042. keystroke the end user makes. In the REXX environment, this will slow down the
  1043. application, but this means that the application has complete control of the
  1044. functioning of the PD system with respect to the panel being displayed with this
  1045. 'AID' key.
  1046.  
  1047. The second psuedo key is the 'ZNONE' key. This value will prevent all keys from
  1048. being used as an 'AID' key.
  1049.  
  1050. If a panel does not have any input fields defined, then 'ZNONE' is the default
  1051. 'AID' key for that panel regardless of whether or not there are any 'AID' keys
  1052. defined for that panel.
  1053.  
  1054. Also, 'ZNONE' is the default 'AID' key value for all panels.
  1055.  
  1056. While this may seem strange and could possibly lead to a 'hung' application,
  1057. there is also the concept of an 'Exit ID' or 'XID' key for each and every panel.
  1058.  
  1059.  
  1060.   1.5.1 Field Data Verification Procedure/Routine                             
  1061.  
  1062.  
  1063. As was mentioned in the 'AID' key discussion, a panel can be defined with a
  1064. 'Data Verification Procedure' which can verify the correctness of the data
  1065. entered into the input fields of a panel when an 'AID' key is pressed.
  1066.  
  1067. The 'DVP' is a very powerful method by which some of the responsibility for
  1068. processing data can be offloaded from the application layer and placed under the
  1069. care of the PD system.
  1070.  
  1071. Essentially, a 'DVP' is an inline REXX procedure that has been defined for a
  1072. specific panel.
  1073.  
  1074. This REXX procedure has automatic 'Read' access to all input fields on the panel
  1075. where it is defined along with some special 'Z' variables. Such a REXX procedure
  1076. also has access to all variables defined to PDS as 'Global' variables.
  1077.  
  1078.                   1.5 Attention Identification Keys (AID Keys)         Page  15
  1079.  
  1080.  
  1081.  
  1082.  
  1083.                            Panel Display System (PDS)                           
  1084.  
  1085.  
  1086. When a panel with input fields, 'AID' keys and a 'DVP' is displayed by a call to
  1087. PDS, and when the end user presses an 'AID' key for that panel, PDS will:
  1088.  
  1089. 1. Verify that a 'DVP' has been defined for that panel.
  1090.  
  1091. 2. Copy all of the input fields into a REXX shared variable pool explicitly
  1092.    for that 'DVP'.
  1093.  
  1094. 3. Copy the following 'Z' variables into that same REXX variable pool.
  1095.    ZBid - The base handle to the current instance of the PDS environment.
  1096.    ZPid - The handle to the panel being displayed.
  1097.    ZKey - The value of the 'AID' key just pressed.
  1098.    ZPName - The name of the panel being displayed.
  1099.    ZFName - The name of the input field where the cursor is positioned.
  1100.    ZFNdx  - The index into that input field.
  1101.  
  1102. 4. Execute the 'DVP'.
  1103.  
  1104. The 'DVP' is then responsible for testing the ZKey and the input fields for
  1105. correctness within the application.
  1106.  
  1107. All rxPD routines are available to the 'DVP'. In fact, a 'DVP' can be written
  1108. such that it is a complete application unto itself. This is not recommended
  1109. except in the case where 'HELP' information is being presented.
  1110.  
  1111. The rxPD routines most useful to a 'DVP' are the rxPDZVarDefine,
  1112. rxPDSetCursorFld, rxPDSetMsgText, rxPDSaveScreen, rxPDDisplay and
  1113. rxPDRestoreScreen routines.
  1114.  
  1115. While this is almost every rxPD routine there is, the use of these routines can
  1116. create a very powerful rxPD application.
  1117.  
  1118. An example, suppose we add a few things to the definition of the 'DEMO0001'
  1119. panel shown in Figure 2.
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.                 1.5.1 Field Data Verification Procedure/Routine        Page  16
  1133.  
  1134.  
  1135.  
  1136.  
  1137.                            Panel Display System (PDS)                           
  1138.  
  1139.                 Figure 2. - Example of ")REM" ")AID" and ")PROC"              
  1140.  
  1141.  
  1142. )PANEL NAME=DEMO0001 CLS=Y
  1143. )REM Define the 'ENTER' key and the 'F1' key as 'AID' keys for this panel.
  1144. )AID ZENTER ZF1
  1145.  
  1146.                  ╔═════════════════════════════════════════════╗
  1147.                  ║            My PDS Application               ║
  1148.                  ║                                             ║
  1149.                  ║ Old Value..: %sOldValue          +          ║
  1150.                  ║                                             ║
  1151.                  ║ New Value..: _sNewValue          +          ║
  1152.                  ║                                             ║
  1153.                  ╚═════════════════════════════════════════════╝
  1154. )REM Define a 'Data Verification Procedure' for this panel.
  1155. )PROC
  1156.  
  1157.   /* Define the possible AID ZKeys */
  1158.   Call rxPDZVarDefine 'ZENTER', 'ZF1'
  1159.  
  1160.   /* Define the possible return codes */
  1161.   Call rxPDZVarDefine 'ZVERIFYPROC_RC_RETURN', 'ZVERIFYPROC_RC_NORETURN'
  1162.  
  1163.   if ZKey = ZF1 then
  1164.    do
  1165.     svid = rxPDSaveScreen(ZBid)
  1166.     akey = rxPDDisplay(ZBid,'DEMO0002')
  1167.     rc = rxPDRestoreScreen(ZBid,svid)
  1168.     return ZVERIFYPROC_RC_NORETURN
  1169.    end
  1170.  
  1171.   if ZKey = ZENTER then
  1172.    do
  1173.     if sNewValue = '' then
  1174.      do
  1175.       Call rxPDZVarDefine 'ZALARM_ERROR'
  1176.       sShortMsg = 'DEMO001E'
  1177.       sLongMsg = ' << New Value Required >> '
  1178.       rc = rxPDSetMsgText(ZBid,sShortMsg,sLongMsg,,ZALARM_ERROR)
  1179.       Call rxPDSetCursorFld ZBid, ZPName, 'sNewValue'
  1180.       return ZVERIFYPROC_RC_NORETURN
  1181.      end
  1182.     return ZVERIFYPROC_RC_RETURN
  1183.    end
  1184.  
  1185.  
  1186.                 1.5.1 Field Data Verification Procedure/Routine        Page  17
  1187.  
  1188.  
  1189.  
  1190.  
  1191.                            Panel Display System (PDS)                           
  1192.  
  1193.   svid = rxPDSaveScreen(ZBid)
  1194.   Call rxPDZVarDefine 'ZALARM_SEVERE'
  1195.   sShortMsg = 'DEMO002S'
  1196.   sLongMsg = ' << Unknown AID key >> '
  1197.   rc = rxPDSetMsgText(ZBid,sShortMsg,sLongMsg,,ZALARM_SEVERE)
  1198.   akey = rxPDDisplay(ZBid,'DEMO0099')
  1199.   rc   = rxPDRestoreScreen(ZBid,svid)
  1200.   return ZKey
  1201. )PROCEND
  1202. )END )BLANK FLDS="<Press ESC to reset, F3 to cancel or F1 for help>"
  1203.  
  1204.  
  1205.          Figure 2 - Example of ")REM", ")AID" and ")PROC" statements.
  1206.  
  1207.  
  1208. The new statements added to the 'DEMO0001' panel are the ')REM', ')AID' and
  1209. ')PROC' statement.
  1210.  
  1211. The ')REM' is a 'REMarks' statement just for adding comments.
  1212.  
  1213. The ')AID' statment defines the 'ENTER' and 'F1' keys as 'AID' keys for this
  1214. panel.
  1215.  
  1216. The ')PROC' statement in combination with the ')PROCEND' statement delimits the
  1217. 'Data Verification Procedure' for this panel.
  1218.  
  1219. What follows is a brief description of what this 'DVP' does when one of the
  1220. 'AID' keys is pressed.
  1221.  
  1222. - Since the 'DVP' is in effect a REXX 'PROCEDURE', it must define any 'Z'
  1223.   variables it wants to use in its own variable pool.
  1224.  
  1225. - Define the possible 'AID' keys 'ZENTER' and 'ZF1'
  1226.  
  1227. - Define the possible return codes for the 'DVP'
  1228.  
  1229. - If the 'AID' key pressed was the 'F1' key then
  1230.  
  1231.   - Save an image of the entire display as it currently exists
  1232.  
  1233.   - Display the help panel associated with this panel
  1234.  
  1235.   - Restore the display image
  1236.  
  1237.   - Return the code that indicates that PDS should NOT return the AID key to the
  1238.     application code nor update any input variables
  1239.  
  1240.                 1.5.1 Field Data Verification Procedure/Routine        Page  18
  1241.  
  1242.  
  1243.  
  1244.  
  1245.                            Panel Display System (PDS)                           
  1246.  
  1247.  
  1248. - If the 'AID' key pressed was the 'ENTER' key then
  1249.  
  1250.   - If the 'sNewValue' variable is all blanks then
  1251.  
  1252.     - Define the 'Z' variable for an 'ERROR' alarm
  1253.  
  1254.     - Define a short and long error message and inform PDS that it should handle
  1255.       them when it next displays or redisplays a panel
  1256.  
  1257.     - Inform PDS that the next time this panel is displayed or redisplayed that
  1258.       it should position the cursor at the beginning of the 'sNewValue' field
  1259.  
  1260.     - Return the code that indicates that PDS should NOT return the AID key to
  1261.       the application code nor update any input variables
  1262.  
  1263.   - If the 'sNewValue' variable is NOT all blanks then
  1264.  
  1265.     - Return the code that indicates that PDS should return the AID key to
  1266.       the application code and also update all input variables
  1267.  
  1268. The rest of the 'DVP' is code that complains about an 'Unknown AID key' by
  1269. setting an error message, popping up an error panel and then returning that
  1270. 'AID' key to the application.
  1271.  
  1272. This last code is not really necessary since only the 'ZENTER' and 'ZF1' keys
  1273. are defined as possible 'AID' keys. In fact, the 'ZENTER' key test is not
  1274. necessary at all as long as all other possible 'AID' keys are properly tested.
  1275.  
  1276.  
  1277.   1.5.1.1 Field Data Verification Procedure/Routine Return Codes              
  1278.  
  1279.  
  1280. When a 'DVP' returns control to the PD system, it can affect the behavior of
  1281. PDS by carefully selecting what value it returns to PDS.
  1282.  
  1283. The possible values that a 'DVP' can return are:
  1284.  
  1285. 1. ZVERIFYPROC_RC_RETURN - This value indicates to PDS that it should update all
  1286.    input variables with the corresponding data from the panel's input fields.
  1287.  
  1288. 2. ZVERIFYPROC_RC_NORETURN - This value indicates to PDS that it should not
  1289.    update any input variables nor should it return control to the application.
  1290.  
  1291. 3. Any integers other than ZVERIFYPROC_RC_RETURN and ZVERIFYPROC_RC_NORETURN are
  1292.    treated as an application error code which suppresses updates to the input
  1293.  
  1294.                 1.5.1 Field Data Verification Procedure/Routine        Page  19
  1295.  
  1296.  
  1297.  
  1298.  
  1299.                            Panel Display System (PDS)                           
  1300.  
  1301.    fields, suppresses the return of the 'AID' key and propogates the integer to
  1302.    the application as a return code.
  1303.  
  1304. 4. An alternate 'AID' key or the value in 'ZKEY' can be returned. This is
  1305.    treated like ZVERIFYPROC_RC_RETURN except that the alternate 'AID' key is
  1306.    returned in place of the original 'AID' key. This is intended as a
  1307.    method by which nested 'DVP's can propogate a decision back thru the
  1308.    nested 'DVP's.
  1309.  
  1310.    Example:
  1311.  
  1312.         'DVP's could be nested 3 deep displaying popup help panels as follows:
  1313.  
  1314.         Each of the popup help panels are defined with 'ZF1', 'ZF3', 'ZF4' and
  1315.         'ZF4_A' as possible 'AID' keys.
  1316.  
  1317.         At each level, when a 'DVP' pops up another help panel in response to
  1318.         the 'ZF1' key and if that panel has a 'DVP', then that 'DVP' can pop up
  1319.         another help panel and so on.
  1320.  
  1321.         The lowest nested panel could receive a 'ZF3', which means to pop off
  1322.         just this lowest level panel, 'ZF4' which could mean return to the first
  1323.         'DVP' which popped up a help panel and stop at the panel being displayed
  1324.         by the application or 'ZF4_A' (Alt+F4) could be propogated all the way
  1325.         back to the application as an indication that the application be
  1326.         terminated.
  1327.  
  1328.         In other words, even tho each popup help panel was displayed as a result
  1329.         of the user pressing 'F1', the 'DVP's for those panels can return an
  1330.         'AID' key other than 'F1' in order to alter the default action of the
  1331.         application.
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.          1.5.1.1 Field Data Verification Procedure/Routine Return Code Page  20
  1349.  
  1350.  
  1351.  
  1352.  
  1353.                            Panel Display System (PDS)                           
  1354.  
  1355.   1.6 Exit Identification Keys (XID Keys)                                     
  1356.  
  1357.  
  1358. An 'XID' key is an 'eXit IDentification' key which is used to indicate what
  1359. key(s) the end user must press to cancel any input field updates or to exit
  1360. a panel which does not have any input fields.
  1361.  
  1362. Any key can be defined as an 'XID' key.
  1363.  
  1364. The default 'XID' key for all panels is the 'ESC' key.
  1365.  
  1366. The definition of an 'XID' key is similar to the 'AID' key in that it can be
  1367. defined on the 'XID=' operand of the ')PANEL' definition statement or as an
  1368. operand on the ')XID' statement.
  1369.  
  1370. The action taken by PDS when an 'XID' key is press is different from that taken
  1371. when an 'AID' key is pressed.
  1372.  
  1373. 1. No 'Data Verification Procedure/Routine' is executed.
  1374.  
  1375. 2. No input fields are updated.
  1376.  
  1377. 3. In the REXX environment, rxPD will return the value of the 'XID' key
  1378.    that caused the attention request.
  1379.  
  1380. The PD system does update the 'ZCURVAR' field when an 'XID' key is pressed if
  1381. there is an input field on the panel.
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.                     1.6 Exit Identification Keys (XID Keys)            Page  21
  1403.  
  1404.  
  1405.  
  1406.  
  1407.                            Panel Display System (PDS)                           
  1408.  
  1409. ╔══════════════════════════════════════════════════════════════════════════════╗
  1410. ║ 2                         Panel Definition Language                          ║
  1411. ╚══════════════════════════════════════════════════════════════════════════════╝
  1412.  
  1413.  
  1414. The Panel Definition Language or PDL is a collection of statements that define
  1415. panels, attributes for the panels, rows of fields for the panels and attributes
  1416. for the fields of the panels.
  1417.  
  1418. The PDL statements reside in a simple text file that can be modified by any
  1419. normal text editor such as OS/2's 'E' or 'EPM' editors.
  1420.  
  1421. This text file is known a the panel library. The only restriction about the name
  1422. of the file is that it must end with a '.PNL' extension.
  1423.  
  1424. Each panel library is accessed only during the initialization of an instance of
  1425. the PD system for a particular application. All panel definition statements are
  1426. processed at that time and an image of the defined panels are retained in memory
  1427. for quicker access and processing of the panels when the application desires to
  1428. display a panel.
  1429.  
  1430. There are two main types of panel definition statements.
  1431.  
  1432. 1. Panel attributes definition statements.
  1433.  
  1434. 2. Panel row definition statements.
  1435.  
  1436. There are miscellaneous statements that are neither Panel Attributes Definition
  1437. statments nor Panel Row Definition statements.
  1438.  
  1439. 1. Miscellaneous statements.
  1440.  
  1441. All PDL statements, except for one style of row definition statements, are
  1442. identified by the character ')' in column 1 of the statement.
  1443.  
  1444.  
  1445.   2.1 Creating PDL Statements                                                 
  1446.  
  1447.  
  1448. The application developer can use any available text editor to create PDL
  1449. statements.
  1450.  
  1451. Because of the many different ways in which text editors create text records, an
  1452. understanding of how PDS processes text records is needed in order to know how
  1453. to assemble a set of PDL statements into a PANEL definition.
  1454.  
  1455.  
  1456.                           2 Panel Definition Language                  Page  22
  1457.  
  1458.  
  1459.  
  1460.  
  1461.                            Panel Display System (PDS)                           
  1462.  
  1463. The PD system trims all records of their trailing blank characters.
  1464.  
  1465. This means that any record which does not have any characters or fields defined
  1466. for that record is in effect a zero length or null record. This means that such
  1467. a record does not result in the definition of any panel fields for the row where
  1468. such a record is defined.
  1469.  
  1470. Horizontal tab characters are NOT expanded.
  1471.  
  1472. All such special characters are treated as being PDL statement characters.
  1473.  
  1474. In other words, Line Feeds, Vertical Tabs, Form Feeds, etc., will be treated as
  1475. displayable characters.
  1476.  
  1477. This allows the use of some of the specialy ANSI characters to define column
  1478. separators, panel borders, etc..
  1479.  
  1480.  
  1481.   2.2 Order of PDL Statements                                                 
  1482.  
  1483.  
  1484. It is best to describe the order of the PDL statements in the panel library at
  1485. this point even tho the PDL statements have not as yet been discussed.
  1486.  
  1487. The PDL statements are:
  1488.  
  1489.  1. )PANEL   - Panel Definition Statement
  1490.  2. )AID     - Attention ID Definition Statement
  1491.  3. )XID     - Exit ID Definition Statement
  1492.  4. )VARS    - Substitution Variable Name Statement
  1493.  5. )COLORS  - Field Attribute Colors Statement
  1494.  6. -------- - Current Row Panel Row Definition Records
  1495.  7. )NULL    - Null Row Statement
  1496.  8. )BLANK   - Blank Row Statement
  1497.  9. )ROW     - Explicit Row Panel Row Definition Records
  1498. 10. )PROC    - Data Verification Procedure Definition Statement
  1499. 11. )PROCEND - Data Verification Procedure Delimiter Statement
  1500. 12. )END     - Panel Delimiter Statement
  1501. 13. )REM     - Remarks Statement
  1502.  
  1503. Panels are defined within the PDL library as groups of related PDL statements.
  1504. The start of a specific panel is marked by the ")PANEL" statement. The end of a
  1505. specific panel is marked by its paired ")END" statement. These two statements
  1506. delimit one entire panel. All other statements, except for the ")REM" statement,
  1507. must reside between these two statements.
  1508.  
  1509.  
  1510.                           2.1 Creating PDL Statements                  Page  23
  1511.  
  1512.  
  1513.  
  1514.  
  1515.                            Panel Display System (PDS)                           
  1516.  
  1517. The ordering of the other statements within the panel delimiters is dependent
  1518. upon their function and whether or not they are related to the attributes of the
  1519. panel or a row within the panel.
  1520.  
  1521. The ")AID" and ")XID" statement define special keystrokes to PDS for the panel
  1522. being defined. They are therefore panel attribute statements and can in fact
  1523. reside anywhere within the panel delimiters.
  1524.  
  1525. The ")PROC" and ")PROCEND" statements delimit a 'Data Verification Procedure'
  1526. for the panel. These delimiters may be paired anywhere within the panel, but
  1527. only valid REXX statements may reside between these 'DVP' delimiters.
  1528.  
  1529. If the 'DVP' is defined as the last block of statements within the panel, the
  1530. ")PROCEND" is not needed because the ")END" statement will act as the default
  1531. 'DVP' delimiter.
  1532.  
  1533. The ")COLORS" statement must be defined before any row containing a field of the
  1534. type whose color is being defined.
  1535.  
  1536. The ")VARS" statements must be defined before any panel row statements that
  1537. contain variable name substitition escape characters.
  1538.  
  1539. The "BODY" of the panel is defined by the panel row definition statements
  1540. ")NULL", ")BLANK" and ")ROW".
  1541.  
  1542. Also, any other record between the panel delimiters which is not an explict PDL
  1543. statement is considered to be a row definition record for the "BODY" of the
  1544. panel.
  1545.  
  1546. The ")REM" statement is ignored by PDS and can be put anywhere in the panel
  1547. library as a convenient way to add 'Remarks' to the library. This is the only
  1548. statement that can be put within the panel delimiters which does not affect a
  1549. panel attribute, a field attribute or a row within the "BODY" of the panel.
  1550.  
  1551. The only valid records outside of the panel delimiters are the ")REM" statement
  1552. and blank records.
  1553.  
  1554. Figure 3 is a slightly modified version of the 'DEMO0001' panel which shows the
  1555. relationship of the various PDL statements.
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.                           2.2 Order of PDL Statements                  Page  24
  1565.  
  1566.  
  1567.  
  1568.  
  1569.                            Panel Display System (PDS)                           
  1570.  
  1571.                   Figure 3. - Example of a "COMPOSITE" display                
  1572.  
  1573.  
  1574. )PANEL NAME=DEMO0001 CLS=N
  1575. )REM Define only the 'ENTER' key as the 'AID' key for this panel.
  1576. )AID ZENTER
  1577. )REM Define 'F3' and 'Alt+F4' keys as the 'XID' keys for this panel.
  1578. )XID ZF3 ZF4_A
  1579. )REM Define two substitutable variable names
  1580. )VARS sOldValue sNewValue sYesNo
  1581. )REM Override any defaulted field attribute colors
  1582. )COLORS TEXT=RED OUTPUT=WHITEHI INPUT=GREENHI
  1583. )REM Start the "BODY" of this panel
  1584. )REM Skip row # 1 and leave it untouched
  1585. )NULL
  1586. )REM Blank the rows # 2 thru # 9
  1587. )BLANK
  1588. )BLANK
  1589. )BLANK
  1590. )BLANK
  1591. )BLANK
  1592. )BLANK
  1593. )BLANK
  1594. )BLANK
  1595. )REM Reposition the current row number to # 2
  1596. )ROW 2
  1597. )REM Define rows # 2 thru # 9
  1598.                  ╔═════════════════════════════════════════════╗
  1599.                  ║            My PDS Application               ║
  1600.                  ║                                             ║
  1601.                  ║ Old Value..: %*                  +          ║
  1602.                  ║                                             ║
  1603.                  ║ New Value..: _*                  +          ║
  1604.                  ║                                             ║
  1605.                  ╚═════════════════════════════════════════════╝
  1606. )REM Skip row # 10 and leave it untouched
  1607. )NULL
  1608. )REM Blank row # 11
  1609. )BLANK
  1610. )REM Jump to row # 15, column # 30 and overlay with field data.
  1611. )ROW 15 30 FLDS=" -- Type in a 'Y' here _+-- "
  1612. )REM Define a 'Data Verification Procedure' for this panel.
  1613. )PROC
  1614.   /* 'ZENTER' is the only possible 'AID' key */
  1615.   if sNewValue = '' then
  1616.    do
  1617.  
  1618.                           2.2 Order of PDL Statements                  Page  25
  1619.  
  1620.  
  1621.  
  1622.  
  1623.                            Panel Display System (PDS)                           
  1624.  
  1625.     Call rxPDZVarDefine 'ZALARM_ERROR'
  1626.     sShortMsg = 'DEMO001E'
  1627.     sLongMsg = ' << New Value Required >> '
  1628.     rc = rxPDSetMsgText(ZBid,sShortMsg,sLongMsg,,ZALARM_ERROR)
  1629.     Call rxPDSetCursorFld ZBid, ZPName, 'sNewValue'
  1630.     return ZVERIFYPROC_RC_NORETURN
  1631.    end
  1632.   if TRANSLATE(sYesNo) <> 'Y' then
  1633.    do
  1634.     Call rxPDZVarDefine 'ZALARM_ERROR'
  1635.     sShortMsg = 'DEMO002E'
  1636.     sLongMsg = " << Value 'Y' Required >> '
  1637.     rc = rxPDSetMsgText(ZBid,sShortMsg,sLongMsg,,ZALARM_ERROR)
  1638.     Call rxPDSetCursorFld ZBid, ZPName, 'sYesNo'
  1639.     return ZVERIFYPROC_RC_NORETURN
  1640.    end
  1641.   return ZVERIFYPROC_RC_RETURN
  1642. )REM Define the end of the 'Data Verification Procedure'
  1643. )PROCEND
  1644. )REM Define the end of the DEMO0001 panel.
  1645. )REM Also, define attributes for the last row of the display.
  1646. )REM These attributes are to blank out the last row and display a
  1647. )REM prompt for the end user.
  1648. )END )BLANK FLDS="<Press ENTER when done, F3 to cancel or Alt-F4 to exit>"
  1649.  
  1650.  
  1651.      Figure 3 - Example of a panel which is part of a "COMPOSITE" display.
  1652.  
  1653.  
  1654. Figure 3 is an unnecessarily complex panel and should not be viewed as being too
  1655. cumbersome to define. Nor is it a necessarily good example of a PDS panel.  It
  1656. merely shows the use of all of the PDL statements in the suggested order.
  1657.  
  1658. This type of panel is normally referred to as a "COMPOSITE" panel since the
  1659. display is not cleared, 'CLS=N', thereby causing the physical display to be
  1660. composed of whatever information was previously displayed plus the new fields
  1661. that this panel adds to the display.
  1662.  
  1663. The effect of this version of DEMO0001 is to explictly leave rows 1 and 10
  1664. untouched, to blank out rows 2 - 9 and 11, to write fields on rows 2 - 9, jump
  1665. to row 15, column 30 and overlay whatever is on the display at that position
  1666. with 2 text fields and an input field named 'sYesNo' and, depending upon the
  1667. depth of the physical display, reposition the current row pointer to the last
  1668. row of the display, blank out that row and write 1 text field centered within
  1669. that row.
  1670.  
  1671.  
  1672.                           2.2 Order of PDL Statements                  Page  26
  1673.  
  1674.  
  1675.  
  1676.  
  1677.                            Panel Display System (PDS)                           
  1678.  
  1679. Unless otherwise modified by the ")ROW" statement, the "BODY" of the panel
  1680. always begins at the upper left corner of the physical display at row # 1,
  1681. column # 1.
  1682.  
  1683. For this reason, the first field in the first "BODY" record will be written to
  1684. row 1, column 1 of the display. Subsequent fields on that record will be written
  1685. to the display at their respective positions within the record.
  1686.  
  1687. Subsequent "BODY" records increment the row counter by 1 in the order they are
  1688. processed.
  1689.  
  1690. This order can be modified by two PDL statements.
  1691.  
  1692. The ")NULL" statement is a "place holder" for the current row. This statement
  1693. causes the row counter to be incremented by 1 without defining any fields for
  1694. the current row. In effect, this preserves whatever was previously displayed on
  1695. that row when this panel is displayed.
  1696.  
  1697. The ")ROW" statement, in its simplest form, resets the current row pointer to a
  1698. specific value. Subsequent "BODY" records will then define fields starting with
  1699. that specific row.
  1700.  
  1701. In its more complex form, the ")ROW" statement resets the current row pointer to
  1702. a specific row, sets the column pointer to a specific column within that row
  1703. and defines a series of fields beginning at that position. This form of the
  1704. ")ROW" statements subsequently sets the current row pointer to the following
  1705. row.
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.                           2.2 Order of PDL Statements                  Page  27
  1727.  
  1728.  
  1729.  
  1730.  
  1731.                            Panel Display System (PDS)                           
  1732.  
  1733.                      Figure 4. - Example of a "POPUP" panel                   
  1734.  
  1735.  
  1736. )PANEL NAME=DEMO0001 CLS=N AID=(ZENTER) XID=(ZF3,ZF4_A)
  1737. )VARS sYesNo
  1738. )ROW 2 18  FLDS="╔═════════════════════════════════════════════╗"
  1739. )ROW 3 18  FLDS="║            My PDS Application               ║"
  1740. )ROW 4 18  FLDS="║                                             ║"
  1741. )ROW 5 18  FLDS="║ Old Value..: %sOldValue          +          ║"
  1742. )ROW 6 18  FLDS="║                                             ║"
  1743. )ROW 7 18  FLDS="║ New Value..: _sNewValue          +          ║"
  1744. )ROW 8 18  FLDS="║                                             ║"
  1745. )ROW 9 18  FLDS="╚═════════════════════════════════════════════╝"
  1746. )ROW 15 30 FLDS=" -- Type in a 'Y' here _+-- "
  1747. )PROC
  1748.   /* 'ZENTER' is the only possible 'AID' key */
  1749.   if sNewValue = '' then
  1750.    do
  1751.     Call rxPDZVarDefine 'ZALARM_ERROR'
  1752.     sShortMsg = 'DEMO001E'
  1753.     sLongMsg = ' << New Value Required >> '
  1754.     rc = rxPDSetMsgText(ZBid,sShortMsg,sLongMsg,,ZALARM_ERROR)
  1755.     Call rxPDSetCursorFld ZBid, ZPName, 'sNewValue'
  1756.     return ZVERIFYPROC_RC_NORETURN
  1757.    end
  1758.   if TRANSLATE(sYesNo) <> 'Y' then
  1759.    do
  1760.     Call rxPDZVarDefine 'ZALARM_ERROR'
  1761.     sShortMsg = 'DEMO002E'
  1762.     sLongMsg = " << Value 'Y' Required >> '
  1763.     rc = rxPDSetMsgText(ZBid,sShortMsg,sLongMsg,,ZALARM_ERROR)
  1764.     Call rxPDSetCursorFld ZBid, ZPName, 'sYesNo'
  1765.     return ZVERIFYPROC_RC_NORETURN
  1766.    end
  1767.   return ZVERIFYPROC_RC_RETURN
  1768. )END )BLANK FLDS="<Press ENTER when done, F3 to cancel or Alt-F4 to exit>"
  1769.  
  1770.  
  1771.                     Figure 4 - Example of a "POPUP" panel.
  1772.  
  1773.  
  1774. Figure 4 is a slightly different version of the 'DEMO0001' panel.
  1775.  
  1776. While it looks less complex that the panel shown in figure 3, they are, in fact,
  1777. almost identical in function.
  1778.  
  1779.  
  1780.                           2.2 Order of PDL Statements                  Page  28
  1781.  
  1782.  
  1783.  
  1784.  
  1785.                            Panel Display System (PDS)                           
  1786.  
  1787. This version uses the default field attribute colors defined for the current
  1788. instance of the PD system.
  1789.  
  1790. It defines only 1 substitutable variable. This is because 'sYesNo' is the only
  1791. variable that can not be defined wholey within the field.
  1792.  
  1793. Instead of blanking out various rows and replacing the entire row with new
  1794. display fields, it overlays the same rows with just the fields defined for
  1795. specific rows and columns.
  1796.  
  1797. This version of 'DEMO0001' is commonly referred to as a "POPUP" panel.
  1798.  
  1799. The application would normally save the current display image before displaying
  1800. this panel and then restore the display image after end user interaction with
  1801. the panel.
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.                           2.2 Order of PDL Statements                  Page  29
  1835.  
  1836.  
  1837.  
  1838.  
  1839.                            Panel Display System (PDS)                           
  1840.  
  1841.                      Figure 5. - Example of a "BASE" panel                    
  1842.  
  1843.  
  1844. )PANEL NAME=DEMO0001 CLS=Y AID=(ZENTER) XID=(ZF3,ZF4_A)
  1845. )VARS sYesNo
  1846. )COLORS TEXT=RED OUTPUT=WHITEHI INPUT=GREENHI
  1847.  
  1848.                  ╔═════════════════════════════════════════════╗
  1849.                  ║            My PDS Application               ║
  1850.                  ║                                             ║
  1851.                  ║ Old Value..: %sOldValue          +          ║
  1852.                  ║                                             ║
  1853.                  ║ New Value..: _sNewValue          +          ║
  1854.                  ║                                             ║
  1855.                  ╚═════════════════════════════════════════════╝
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.                               -- Type in a 'Y' here _+--
  1862. )PROC
  1863.   /* 'ZENTER' is the only possible 'AID' key */
  1864.   if sNewValue = '' then
  1865.    do
  1866.     Call rxPDZVarDefine 'ZALARM_ERROR'
  1867.     sShortMsg = 'DEMO001E'
  1868.     sLongMsg = ' << New Value Required >> '
  1869.     rc = rxPDSetMsgText(ZBid,sShortMsg,sLongMsg,,ZALARM_ERROR)
  1870.     Call rxPDSetCursorFld ZBid, ZPName, 'sNewValue'
  1871.     return ZVERIFYPROC_RC_NORETURN
  1872.    end
  1873.   return ZVERIFYPROC_RC_RETURN
  1874.   if TRANSLATE(sYesNo) <> 'Y' then
  1875.    do
  1876.     Call rxPDZVarDefine 'ZALARM_ERROR'
  1877.     sShortMsg = 'DEMO002E'
  1878.     sLongMsg = " << Value 'Y' Required >> '
  1879.     rc = rxPDSetMsgText(ZBid,sShortMsg,sLongMsg,,ZALARM_ERROR)
  1880.     Call rxPDSetCursorFld ZBid, ZPName, 'sYesNo'
  1881.     return ZVERIFYPROC_RC_NORETURN
  1882.    end
  1883.   return ZVERIFYPROC_RC_RETURN
  1884. )END FLDS="<Press ENTER when done, F3 to cancel or Alt-F4 to exit>"
  1885.  
  1886.  
  1887.  
  1888.                           2.2 Order of PDL Statements                  Page  30
  1889.  
  1890.  
  1891.  
  1892.  
  1893.                            Panel Display System (PDS)                           
  1894.  
  1895.                     Figure 5 - Example of a "BASE" panel.
  1896.  
  1897.  
  1898. Figure 5 is a version of the 'DEMO0001' panel commonly referred to as a "BASE"
  1899. panel since it clears the entire screen and creates the display with only those
  1900. fields defined for this panel.
  1901.  
  1902. This is the easiest and most common output/input form of a PDS panel.
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.                           2.2 Order of PDL Statements                  Page  31
  1943.  
  1944.  
  1945.  
  1946.  
  1947.                            Panel Display System (PDS)                           
  1948.  
  1949.   2.3 Panel Attributes Definition Statements.                                 
  1950.  
  1951.  
  1952. Panel attribute statements are statements that define panels and their
  1953. characteristics. These statements are not visible when the panel is displayed,
  1954. but the characteristics imparted by these statements may or may not visible to
  1955. the end user.
  1956.  
  1957. Some of the characteristics are:
  1958.  
  1959. 1. The name of the panel.
  1960.  
  1961. 2. Whether or not to clear the display screen when the panel is displayed.
  1962.  
  1963. 3. What 'AID' and 'XID' keys are available to the end user for the panel.
  1964.  
  1965. 4. What the escape characters are for the 'TEXT', 'OUTPUT' and 'INPUT' fields.
  1966.  
  1967. 5. What the colors are for the 'TEXT', 'OUTPUT' and 'INPUT' fields.
  1968.  
  1969. 6. What REXX statements to execute when an 'AID' key is pressed.
  1970.  
  1971. 7. Whether or not to present the panel immediately to the end user when the
  1972.    panel is displayed.
  1973.  
  1974. 8. Whether or not to wait for the end user to press an 'AID' key.
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.                   2.3 Panel Attributes Definition Statements.          Page  32
  1997.  
  1998.  
  1999.  
  2000.  
  2001.                            Panel Display System (PDS)                           
  2002.  
  2003.   2.3.1 ")PANEL" Panel Definition Statement                                   
  2004.  
  2005.  
  2006. This is the main PDL statement.
  2007.  
  2008. It is the statement which defines the beginning of a collection of PDL
  2009. statements that make up a single panel within the panel library.
  2010.  
  2011. This statement has a number of operands which define various attributes of the
  2012. panel.
  2013.  
  2014. It has the following format:
  2015.  
  2016.    )PANEL NAME=pnlname CLR=clropt AID=(aidlist) XID=(xidlist) ATTR=attrlist
  2017.  
  2018.  
  2019.   2.3.1.1 "NAME=" Panel Name Operand                                          
  2020.  
  2021.  
  2022. This operand asigns a name to the panel being defined. It is this name by which
  2023. the panel is referrenced in all subsequent interactions with the PD system.
  2024.  
  2025. This operand is required.
  2026.  
  2027.  
  2028.   2.3.1.2 "CLS=" Clear Screen Option                                          
  2029.  
  2030.  
  2031. This operand tells PDS whether or not to clear the display buffer before
  2032. updating the buffer with the rows of fields defined for the panel.
  2033.  
  2034. CLS=Y - Clear the video buffer before constructing the panel.
  2035.  
  2036. CLS=N - Do not clear the video buffer. This is the default action.
  2037.  
  2038.  
  2039.   2.3.1.3 "AID=" Attention ID Option                                          
  2040.  
  2041.  
  2042. This operand defines one or more 'AID' keys for the panel.
  2043.  
  2044. It has the following format:
  2045.  
  2046.            AID=(aidkey,aidkey,aidkey,...)
  2047.  
  2048. There should be no intervening blanks anywhere in the operand.
  2049.  
  2050.                    2.3.1 ")PANEL" Panel Definition Statement           Page  33
  2051.  
  2052.  
  2053.  
  2054.  
  2055.                            Panel Display System (PDS)                           
  2056.  
  2057.  
  2058. The default for any panel which doesn't have an "AID=" operand is to have no
  2059. 'AID' keys defined.
  2060.  
  2061. Example:
  2062.  
  2063.            AID=(ZENTER,ZF1)
  2064.  
  2065.  
  2066.   2.3.1.4 "XID=" Exit ID Option                                               
  2067.  
  2068.  
  2069. This operand defines one or more 'XID' keys for the panel.
  2070.  
  2071. It has the following format:
  2072.  
  2073.            XID=(xidkey,xidkey,xidkey,...)
  2074.  
  2075. There should be no intervening blanks anywhere in the operand.
  2076.  
  2077. The default for any panel which doesn't have an "XID=" operand is to have
  2078. just the 'ESC' key defined as an 'XID' key.
  2079.  
  2080. Example:
  2081.  
  2082.            XID=(ZESC,ZF3,ZF4_A)
  2083.  
  2084.  
  2085.   2.3.1.5 "ATTR=" Attribute Character(s) Option                               
  2086.  
  2087.  
  2088. This operand defines alternate characters as the field attributes escape
  2089. characters.
  2090.  
  2091. It has the following format:
  2092.  
  2093.            ATTR=iot
  2094.  
  2095. Where:
  2096.  
  2097.   'i' is the overriding 'INPUT' field attribute character.
  2098.  
  2099.   'o' is the overriding 'OUTPUT' field attribute character.
  2100.  
  2101.   't' is the overriding 'TEXT' field attribute character.
  2102.  
  2103.  
  2104.                        2.3.1.3 "AID=" Attention ID Option              Page  34
  2105.  
  2106.  
  2107.  
  2108.  
  2109.                            Panel Display System (PDS)                           
  2110.  
  2111. Default:
  2112.  
  2113.            ATTR=_%+
  2114.  
  2115. Example:
  2116.  
  2117.            ATTR=_$+
  2118.  
  2119. In this example, the '$' key is defined as the 'OUTPUT' field attribute
  2120. character replacing the default '%' key.
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.                  2.3.1.5 "ATTR=" Attribute Character(s) Option         Page  35
  2159.  
  2160.  
  2161.  
  2162.  
  2163.                            Panel Display System (PDS)                           
  2164.  
  2165.   2.3.2 ")AID" Attention ID Definition Statement                              
  2166.  
  2167.  
  2168. This statement can be used in place of or in addition to the "AID=" operand
  2169. available on the ")PANEL" statement.
  2170.  
  2171. Multiple instances of this statement can be defined. Each additional statement
  2172. adds to the 'AID' key list.
  2173.  
  2174. This allows for the definition of large numbers of 'AID' keys for a particular
  2175. panel.
  2176.  
  2177. An AID key of 'ZNONE' can be defined on this statement. The only caution is that
  2178. the definition of this value deletes all preceeding 'AID' keys in the list.
  2179.  
  2180. It has the following format:
  2181.  
  2182.            )AID aidkey aidkey aidkey
  2183.  
  2184. Example:
  2185.  
  2186.            )AID ZENTER ZF1
  2187.  
  2188.  
  2189.   2.3.3 ")XID" Exit ID Definition Statement                                   
  2190.  
  2191.  
  2192. This statement can be used in place of or in addition to the "XID=" operand
  2193. available on the ")PANEL" statement.
  2194.  
  2195. Multiple instances of this statement can be defined. Each additional statement
  2196. adds to the 'XID' key list.
  2197.  
  2198. This allows for the definition of large numbers of 'XID' keys for a particular
  2199. panel.
  2200.  
  2201. An XID key of 'ZNONE' can be defined on this statement. The only caution is that
  2202. the definition of this value deletes all preceeding 'XID' keys in the list.
  2203.  
  2204. It has the following format:
  2205.  
  2206.            )XID xidkey xidkey xidkey
  2207.  
  2208. Example:
  2209.  
  2210.            )XID ZESC ZF3 ZF4_A
  2211.  
  2212.                  2.3.2 ")AID" Attention ID Definition Statement        Page  36
  2213.  
  2214.  
  2215.  
  2216.  
  2217.                            Panel Display System (PDS)                           
  2218.  
  2219.  
  2220.  
  2221.   2.3.4 ")VARS" Substitution Variable Name Statement                          
  2222.  
  2223.  
  2224. This statement is used to define a list of substitutable field variable names
  2225. for those fields whose widths are shorter than the name of the variable itself.
  2226.  
  2227. Multiple instances of this statement can be defined. Each additional statement
  2228. adds to the list of field substitution variable names.
  2229.  
  2230. This allows for the definition of large numbers of substitution variable
  2231. names for a panel.
  2232.  
  2233. It has the following format:
  2234.  
  2235.            )VARS var1 var2 var3 var4
  2236.  
  2237. Example:
  2238.  
  2239.            )VARS sMyField1 sMyVeryLongFieldName s2
  2240.  
  2241.  
  2242.   2.3.5 ")COLORS" Field Attribute Colors Statement                            
  2243.  
  2244.  
  2245. This statement is used to override the colors defined for the three field
  2246. types just for this panel.
  2247.  
  2248. These colors are applied to the fields defined by the panel row definition
  2249. statements that immediately follow this ")COLORS" statement.
  2250.  
  2251. More than one ")COLORS" statement can be specified per panel. The colors of each
  2252. field type are inherited from the base colors of the current instance of the PD
  2253. system, either the default PDS values or the values specified when the
  2254. application initializes an instance of PDS, or from any preceeding ")COLORS"
  2255. statement which specifies a new value for that field type.
  2256.  
  2257. This allows for a single panel to have different colors for different fields of
  2258. the same type.
  2259.  
  2260. The only restriction is that all fields of the same type on the same row will
  2261. have the same color.
  2262.  
  2263. In order to have different colors for like field types on the same row, the
  2264. fields will have to be defined by the use of explicit ")ROW" definition
  2265.  
  2266.                    2.3.3 ")XID" Exit ID Definition Statement           Page  37
  2267.  
  2268.  
  2269.  
  2270.  
  2271.                            Panel Display System (PDS)                           
  2272.  
  2273. statements.  This will allow the intermixing of ")COLORS" and ")ROW" statements
  2274. for the individual fields for the same row.
  2275.  
  2276. It has the following format:
  2277.  
  2278.            )COLORS OUTPUT=ocolor INPUT=icolor TEXT=tcolor BCKG=bcolor
  2279.  
  2280. Example:
  2281.  
  2282.            )COLORS TEXT=WHITEHI INPUT=GREENHI
  2283.  
  2284. The ")COLORS" options "OUTPUT=", "INPUT=", "TEXT=" and "BCKG=" are optional and
  2285. can be declared in any order.
  2286.  
  2287. Refer to APPENDIX B for the list of colors supported by PDS.
  2288.  
  2289.   2.3.5.1 "OUTPUT=" Output Color Option                                       
  2290.  
  2291.  
  2292. The "OUTPUT=" option of the ")COLORS" statement overrides the color
  2293. to be used for 'OUTPUT' fields displayed by this panel.
  2294.  
  2295.  
  2296.   2.3.5.2 "INPUT=" Input Color Option                                         
  2297.  
  2298.  
  2299. The "INPUT=" option of the ")COLORS" statement overrides the color
  2300. to be used for 'INPUT' fields displayed by this panel.
  2301.  
  2302.  
  2303.   2.3.5.3 "TEXT=" Text Color Option                                           
  2304.  
  2305.  
  2306. The "TEXT=" option of the ")COLORS" statement overrides the color
  2307. to be used for 'TEXT' fields displayed by this panel.
  2308.  
  2309.  
  2310.   2.3.5.4 "BCKG=" Background Color Option                                     
  2311.  
  2312.  
  2313. The "BCKG=" option of the ")COLORS" statement overrides the color to be used for
  2314. the background of the fields in the panel being constructed.
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.                 2.3.5 ")COLORS" Field Attribute Colors Statement       Page  38
  2321.  
  2322.  
  2323.  
  2324.  
  2325.                            Panel Display System (PDS)                           
  2326.  
  2327.   2.3.6 ")PROC" Data Verification Procedure Definition Statement              
  2328.  
  2329.  
  2330. The ")PROC" statement denotes the start of an inline Data Verification
  2331. Procedure.
  2332.  
  2333. The REXX statements that compose the 'DVP' follow this PDL statement.
  2334.  
  2335. The 'DVP' is delimited by either the ")PROCEND" or ")END" statements depending
  2336. upon the ordering of the PDL statements.
  2337.  
  2338.  
  2339.   2.3.7 ")PROCEND" Data Verification Procedure Delimiter Statement            
  2340.  
  2341.  
  2342. The ")PROCEND" statement denotes the end of an inline Data Verification
  2343. Procedure.
  2344.  
  2345.  
  2346.   2.3.8 ")END" Panel Delimiter Statement                                      
  2347.  
  2348.  
  2349. The ")END" statement denotes the end of a series of related PDL statements that
  2350. defined a panel.
  2351.  
  2352. It is also used to define a number of optional panel attributes and an optional
  2353. set of fields for the last row of the physical display.
  2354.  
  2355. It has the following format:
  2356.  
  2357.            )END )BLANK )NOWAIT )NODISPLAY FLDS="fields"
  2358.  
  2359. Example:
  2360.  
  2361.            )END )BLANK FLDS="< Press ENTER, F1 or F3 >"
  2362.  
  2363.  
  2364.   2.3.8.1 ")BLANK" Blank the Last Row Option                                  
  2365.  
  2366.  
  2367. The ")BLANK" is actually a keyword operand, not a PDL statement.
  2368.  
  2369. This operand requests that the last physical row of the panel be overwritten
  2370. with blanks when the panel is displayed.
  2371.  
  2372. The default is to leave the last physical row untouched.
  2373.  
  2374.          2.3.6 ")PROC" Data Verification Procedure Definition Statemen Page  39
  2375.  
  2376.  
  2377.  
  2378.  
  2379.                            Panel Display System (PDS)                           
  2380.  
  2381.  
  2382.  
  2383.   2.3.8.2 ")NOWAIT" Defer End User Input Option                               
  2384.  
  2385.  
  2386. This operand requests that a call to the routine that displays a panel does not
  2387. result in the application waiting for the end user to press an 'AID' key.
  2388.  
  2389. The main purpose of this operand is to allow the developer to construct a
  2390. composite display made up of multiple panels containing 'TEXT' and 'OUTPUT'
  2391. fields.
  2392.  
  2393. If a panel with 'INPUT' fields is displayed with this option, the 'INPUT' fields
  2394. are treated simply as 'OUTPUT' fields. Only the last panel with 'INPUT' fields
  2395. and without the ")NOWAIT" option can be used to receive input from the user.
  2396.  
  2397. Another purpose of this option is to be able to create simple character based
  2398. animation sequences where a series of ")NOWAIT" panels are displayed.
  2399.  
  2400.  
  2401.   2.3.8.3 ")NODISPLAY" Suppress Panel Display Option                          
  2402.  
  2403.  
  2404. This operand requests that the video buffer not be written to the display after
  2405. the panel has been constructed.
  2406.  
  2407. The purpose of this operand is to allow the developer to construct a composite
  2408. display made up of multiple panels containing 'TEXT' and 'OUTPUT' fields.
  2409.  
  2410. It is normally used in conjunction with the ")NOWAIT" operand for the purpose of
  2411. constructing a composite display.
  2412.  
  2413. Optionally, the application developer might deem it important for the end user
  2414. to see the composite display being constructed.  Normally however, the
  2415. construction of a composite display is fast enough that the display of a
  2416. sequence of such panels is simply a brief flicker.
  2417.  
  2418. Only a panel without the ")NODISPLAY" will cause the physical display to be
  2419. updated from the logical video buffer.
  2420.  
  2421.  
  2422.   2.3.8.4 "FLDS=" Field Definition Option                                     
  2423.  
  2424.  
  2425. This operand is similar to the "FLDS=" operand that is a part of the ")ROW"
  2426. definition statement.
  2427.  
  2428.                    2.3.8.1 ")BLANK" Blank the Last Row Option          Page  40
  2429.  
  2430.  
  2431.  
  2432.  
  2433.                            Panel Display System (PDS)                           
  2434.  
  2435.  
  2436. Its purpose is to allow the developer to display fields on the last physical row
  2437. of the display.
  2438.  
  2439. Unlike this same operand on the ")ROW" statement, the fields within the "FLDS="
  2440. value are centered on the last physical row.
  2441.  
  2442. The default is no "FLDS=" fields.
  2443.  
  2444. Example:
  2445.  
  2446.   )END FLDS="< Press Enter to Register your vote for the %*         +candidate>"
  2447.  
  2448. In this example, when the panel is displayed, the last row of the physical
  2449. display will be overwritten with the text fields and the data contained in the
  2450. the substitution variable from the ")VARS" statement. The PD system will then
  2451. wait for the end user to press an 'AID' or 'XID' key.
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.                     2.3.8.4 "FLDS=" Field Definition Option            Page  41
  2483.  
  2484.  
  2485.  
  2486.  
  2487.                            Panel Display System (PDS)                           
  2488.  
  2489.   2.4 Panel Row Definition Statements.                                        
  2490.  
  2491.  
  2492. Panel row definition statements are statements that define the fields which make
  2493. up the rows of a panel.
  2494.  
  2495. The rows and columns where fields are positioned are relative to the physical
  2496. display, not to a position within a defined panel.
  2497.  
  2498. In other words, all panels are positioned in the upper left corner of the
  2499. physical display at row # 1, column # 1.
  2500.  
  2501. Fields within the panel are positioned within that coordinate system.
  2502.  
  2503. The number of rows and columns can be set by the application during PDS
  2504. initialization.
  2505.  
  2506.  
  2507.   2.4.1 Current Row Panel Row Definition Records                              
  2508.  
  2509.  
  2510. By default, any record in a PDL library which falls within the "body" of a PDS
  2511. panel that is not a specific PDL statement is considered to be a panel row
  2512. definition record.
  2513.  
  2514. Such a record is, by default, treated as being a row containing a single 'text'
  2515. field of displayable characters and the row is displayed at the 'current row
  2516. position' within the panel.
  2517.  
  2518. The 'current row position' is always set to 1 when the ")PANEL" statement is
  2519. encountered. Each subsequent panel row definition record increments this
  2520. position by 1.
  2521.  
  2522. Row definition records do not have to contain only 'text' fields.
  2523.  
  2524. Each row definition record is processed for any explicit field attribute escape
  2525. characters which denote the beginning of a field of that type.
  2526.  
  2527. The column where these fields are placed within the 'current row position' is
  2528. defined as being the position, within the row definition record, where the field
  2529. attribute escape character was found.
  2530.  
  2531. Example:
  2532.  
  2533.       This row has an output field %iOut+at column 36 called "iOut".
  2534.  
  2535.  
  2536.                       2.4 Panel Row Definition Statements.             Page  42
  2537.  
  2538.  
  2539.  
  2540.  
  2541.                            Panel Display System (PDS)                           
  2542.  
  2543. In the above example, a 'text' field starts at column 1 followed by an 'output'
  2544. field at column 36 and another 'text' field which starts at column 41 and goes
  2545. to the end of the record.
  2546.  
  2547.  
  2548.   2.4.2 ")NULL" Null Row Definition Statement                                 
  2549.  
  2550.  
  2551. The ")NULL" statement is a row definition statement which defines a zero length
  2552. row statement. This has the effect of incrementing the 'current row position'
  2553. without causing any fields to be displayed on the current row.
  2554.  
  2555. Note, because of the way in which the PD system trims all trailing blanks from
  2556. all PDL statements, all PDL statements which do not define any text or fields
  2557. for a row in the panel are by default 'null' PDL statements. The ")NULL" PDL
  2558. statement is included more as a method of documenting that a row is, in fact, a
  2559. null row rather than having to remember that an all blank record is also a null
  2560. row.
  2561.  
  2562.  
  2563.   2.4.3 ")BLANK" Blank Row Definition Statement                               
  2564.  
  2565.  
  2566. The ")BLANK" statement is a row definition statement which defines a row
  2567. statement consisting of all blanks.
  2568.  
  2569. This has the effect of writing a blank row at the current row and subsequently
  2570. incrementing the 'current row position'.
  2571.  
  2572.  
  2573.   2.4.4 ")ROW" Explicit Row Panel Row Definition Statement                    
  2574.  
  2575.  
  2576. The ")ROW" statement is used to explictly change the 'current row position'
  2577. to a value specified by the application developer.
  2578.  
  2579. There are two forms of the ")ROW" statement.
  2580.  
  2581. The first form simply changes the 'current row position' for subsequent row
  2582. definition statements.
  2583.  
  2584. This form has the following format:
  2585.  
  2586.           )ROW rowoption
  2587.  
  2588.     rowoption - Define the value for the 'current row pointer'.
  2589.  
  2590.                  2.4.1 Current Row Panel Row Definition Records        Page  43
  2591.  
  2592.  
  2593.  
  2594.  
  2595.                            Panel Display System (PDS)                           
  2596.  
  2597.  
  2598. The second form changes the 'current row position', defines the target column
  2599. position and the field or list of fields to be displayed at the desired
  2600. row/column. The 'current row position' is subsequently incremented to the next
  2601. row of the panel.
  2602.  
  2603. This form has the following format:
  2604.  
  2605.           )ROW rowoption columnoption FLDS="fielddefoption"
  2606.  
  2607.     rowoption    - Define the value for the 'current row pointer'.
  2608.     columoption  - Define the target column number.
  2609.     fielddefoption - Define the fields for this row/column.
  2610.  
  2611.  
  2612.   2.4.4.1 Target )ROW Row Option                                              
  2613.  
  2614.  
  2615. This option of the ")ROW" statement defines either the next row number of
  2616. subsequent panel row definition records or it defines the explicit row number
  2617. for the fields defined by the "FLDS=" option of the ")ROW" statement.
  2618.  
  2619.  
  2620.   2.4.4.2 Target )ROW Column Option                                           
  2621.  
  2622.  
  2623. This option of the ")ROW" statement defines the target column number for the
  2624. fields defined by the "FLDS=" option of the ")ROW" statement.
  2625.  
  2626.  
  2627.   2.4.4.3 Target )ROW "FLDS=" Field Definition Option                         
  2628.  
  2629.  
  2630. This option is used to define one or more fields to be placed at a specific
  2631. position within the panel.
  2632.  
  2633. The fields are defined identically to those defined by a panel row definition
  2634. statement. In effect, the fields look like a substring of a normal row
  2635. definition statement.
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.             2.4.4 ")ROW" Explicit Row Panel Row Definition Statement   Page  44
  2645.  
  2646.  
  2647.  
  2648.  
  2649.                            Panel Display System (PDS)                           
  2650.  
  2651.                   Figure 6. - Example of the ")ROW" statement                 
  2652.  
  2653.  
  2654. )PANEL NAME=DEMO0003 CLS=Y
  2655. This is ROW # 1
  2656. )ROW 12
  2657. This is ROW # 12
  2658. )ROW 17 15 FLDS="Text at 17/15 and output at 17/49 %sOutVar+"
  2659. This is ROW # 18
  2660. )END
  2661.  
  2662.  
  2663.             Figure 6 - Example of the use of the ")ROW" statement.
  2664.  
  2665.  
  2666. The panel "DEMO0003" in figure 6 defines two ")ROW" statements.
  2667.  
  2668. The first record following the ")PANEL" statement defines a single text field
  2669. with the characters "This is ROW #1" beginning in row 1 column 1 of the panel.
  2670.  
  2671. The first ")ROW" statement resets the 'current row position' to 12. This
  2672. forces the following 'text' record "This is row 12" to be displayed at
  2673. row 12 of the panel.
  2674.  
  2675. The second ")ROW" statement resets the 'current row position' to 17, sets the
  2676. target field column as column 15 and defines 2 'text' fields and one output
  2677. field for row 17, column 15. It subsequently sets the CRP to row 18.
  2678.  
  2679. Assuming that the variable "sOutVar" contained the string "1234567890", the act
  2680. of displaying "DEMO0003" would result in the display shown in figure 7.
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.               2.4.4.3 Target )ROW "FLDS=" Field Definition Option      Page  45
  2699.  
  2700.  
  2701.  
  2702.  
  2703.                            Panel Display System (PDS)                           
  2704.  
  2705.                   Figure 7. - Example of the ")ROW" statement                 
  2706.  
  2707. This is ROW # 1
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718. This is ROW # 12
  2719.  
  2720.  
  2721.  
  2722.  
  2723.               Text at 17/15 and output at 17/49 12345678
  2724. This is ROW # 18
  2725.  
  2726.  
  2727.           Figure 7 - Example of a display using the ")ROW" statement.
  2728.  
  2729.  
  2730.   2.5 Miscellaneous PDL Statements                                            
  2731.  
  2732.  
  2733. There is currently only one PDL statement which does not affect or otherwise
  2734. define a panel attribute or a row attribute.
  2735.  
  2736.  
  2737.   2.5.1 ")REM" Remarks Statement                                              
  2738.  
  2739.  
  2740. The ")REM" PDL statement allows the developer of the panel to add 'remarks' or
  2741. 'comments' to the panel for documentation purposed.
  2742.  
  2743. These statements can be placed anywhere in the PDL Library.
  2744.  
  2745. They are explicitly ignored by the PD system when encountered within a PDL
  2746. Library.
  2747.  
  2748. The ")REM" as the following form:
  2749.  
  2750.         )REM anycommentsortext
  2751.  
  2752.               2.4.4.3 Target )ROW "FLDS=" Field Definition Option      Page  46
  2753.  
  2754.  
  2755.  
  2756.  
  2757.                            Panel Display System (PDS)                           
  2758.  
  2759.  
  2760.  
  2761.   2.6 Defining Panel Rows and Fields                                          
  2762.  
  2763.  
  2764. As has been discussed in other sections, PDS panels are made up of rows of
  2765. fields.
  2766.  
  2767. What determines a panel row in a PDL Library has been shown to be any non-PDL
  2768. statement or the ")NULL", ")BLANK" or ")ROW" PDL statements.
  2769.  
  2770. What determines a field in a panel row is the existance of a field attribute
  2771. escape character.
  2772.  
  2773. The default field escape charaters are:
  2774.  
  2775.            Plus or '+' character - Denotes the start of a 'TEXT' field.
  2776.         Percent or '%' character - Denotes the start of an 'OUTPUT' field.
  2777.      UnderScore or '_' character - Denotes the start of an 'INPUT' field.
  2778.  
  2779. These characters define the beginning of a field of the type denoted by the
  2780. character.
  2781.  
  2782. The source of displayable information for each type of field is either a text
  2783. string explicitly defined in the PDS panel or an indirection thru the use of a
  2784. 'Variable' associated with the field.
  2785.  
  2786. By default, all rows in a panel start with a 'TEXT' field. In other words, any
  2787. text, encountered on a panel row, which does not have an explict field escape
  2788. character is defined to be a static 'TEXT' field.
  2789.  
  2790. The 'TEXT' field escape character ('+') is not normally needed. It is used only
  2791. to mark the end of an 'INPUT' or 'OUTPUT' field previously defined on that panel
  2792. row. Such a 'TEXT' field will first display a blank (' ') character in place of
  2793. the 'TEXT' escape character along with whatever other text characters follow the
  2794. 'TEXT' field attribute. This will continue until the next field attribute
  2795. character is encountered.
  2796.  
  2797. The 'OUTPUT' field escape character defines the start of a dynamically created
  2798. field which can be used to show data defined by the application program. This
  2799. field can be used to display information that might change between each
  2800. execution of the application, such as the current date, or which changes between
  2801. each display of the panel, such as the current time.
  2802.  
  2803. The end if an 'OUTPUT' field is either another field attribute escape character
  2804. or the end of the PDL row definition record. This determines the width of the
  2805.  
  2806.                          2.5.1 ")REM" Remarks Statement                Page  47
  2807.  
  2808.  
  2809.  
  2810.  
  2811.                            Panel Display System (PDS)                           
  2812.  
  2813. 'OUTPUT' field and thereby the maximum amount of data which can be displayed in
  2814. the field.
  2815.  
  2816. Each 'OUTPUT' field also designates, either directly or indirectly, the name of
  2817. a variable created and initialized by the application program.
  2818.  
  2819. The name of the variable normally follows the field escape character in the row
  2820. definition record.
  2821.  
  2822. But, in the case where the variable name is longer that the width of the field,
  2823. a variable name substitution or indirection mechanism is provided whereby the
  2824. name of the variable is predefined by the ")VARS" PDL statement. This
  2825. variable name substitution mechanism is discussed elsewhere in this manual.
  2826.  
  2827. The data that is displayed at the fields position on the panel is retrieved
  2828. from the corresponding variable during the creation of the display that is done
  2829. as the result of a request by the application program to display a panel.
  2830.  
  2831. This means that if the application is building a "COMPOSITE" display from a
  2832. series of panels and if a variable, that was previously retrieved by a panel,
  2833. changes before the video buffer is written to the display, the display will show
  2834. the older variable value.
  2835.  
  2836. An example is shown in figure 8.
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859.  
  2860.                        2.6 Defining Panel Rows and Fields              Page  48
  2861.  
  2862.  
  2863.  
  2864.  
  2865.                            Panel Display System (PDS)                           
  2866.  
  2867.                   Figure 8. - Example of a "COMPOSITE" display                
  2868.  
  2869. )PANEL NAME=DEMO0004 CLS=Y
  2870. This is ROW # 1
  2871.        This is the 1st value of variable sOutVar: %sOutVar+
  2872.  
  2873.  
  2874.  
  2875. )END )NODISPLAY )NOWAIT
  2876.  
  2877. )PANEL NAME=DEMO0005 CLS=N
  2878.  
  2879.  
  2880.  
  2881.        This is the 2nd value of variable sOutVar: %sOutVar+
  2882. This is ROW # 5
  2883. )END
  2884.  
  2885.        /* REXX source to display "DEMO0004" and "DEMO0005" */
  2886.        sOutVar=0123456789
  2887.        rc=rxPDDisplay(bid,"DEMO0004")
  2888.        sOutVar=ABCDEFGHIJ
  2889.        rc=rxPDDisplay(bid,"DEMO0005")
  2890.  
  2891.  
  2892.           Figure 8 - Example of the creation of a composite display.
  2893.  
  2894. If the sample REXX code in figure 8 is executed, the display shown in
  2895. figure 9 will result.
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914.                        2.6 Defining Panel Rows and Fields              Page  49
  2915.  
  2916.  
  2917.  
  2918.  
  2919.                            Panel Display System (PDS)                           
  2920.  
  2921.                   Figure 9. - Example of a "COMPOSITE" display                
  2922.  
  2923.  
  2924. This is ROW # 1
  2925.        This is the 1st value of variable sOutVar: 01234567
  2926.  
  2927.        This is the 2nd value of variable sOutVar: ABCDEFGH
  2928. This is ROW # 5
  2929.  
  2930.  
  2931.                   Figure 9 - Example of a composite display.
  2932.  
  2933.  
  2934. The 'INPUT' field is in fact an 'OUTPUT/INPUT' field.
  2935.  
  2936. This is because the 'INPUT' field is defined with the same type of application
  2937. variable name.
  2938.  
  2939. This variable name is used as the source of any output data and as the target of
  2940. any end user input data.
  2941.  
  2942. The amount of the data displayed or entered is again determined by the width of
  2943. the 'INPUT' field.
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.                        2.6 Defining Panel Rows and Fields              Page  50
  2969.  
  2970.  
  2971.  
  2972.  
  2973.                            Panel Display System (PDS)                           
  2974.  
  2975. ╔══════════════════════════════════════════════════════════════════════════════╗
  2976. ║ 3                 REXX PDS Application Programming Interface                 ║
  2977. ╚══════════════════════════════════════════════════════════════════════════════╝
  2978.  
  2979.  
  2980. The REXX PDS Application Programming Interface, or rxPD, is an OS/2 REXX
  2981. extension.
  2982.  
  2983. This means that the PDS routines provided by rxPD are available to all REXX
  2984. scripts once they have been defined to OS/2.
  2985.  
  2986. The REXX PDS interface is a procedural language interface.
  2987.  
  2988. This means that the application program makes a request of rxPD and interprets
  2989. the results after control is returned to the application.
  2990.  
  2991.  
  2992.   3.1 Defining the REXX PDS, "RXPD", interface to OS/2                        
  2993.  
  2994.  
  2995. OS/2 provides a way to dynamically add REXX extension routines to the REXX
  2996. 'MacroSpace' for the purpose of being able to add functionality to REXX.
  2997.  
  2998. To dynamically define a new routine in the REXX 'MacroSpace', the end user or
  2999. application programmer executes the 'RxFuncAdd' builtin REXX function.
  3000.  
  3001. The format of the call is:
  3002.  
  3003.    CALL RxFuncAdd routinename, dllname, procedurename
  3004.  
  3005.    'routinename' - Name by which all REXX scripts will referrence the routine.
  3006.    'dllname'     - Name of the Dynamic Link Library containing the procedure.
  3007.    'procedurename' - Name of the routine as defined within the DLL.
  3008.  
  3009. Now, this call can be made for each and every one of the rxPD routines, but,
  3010. rxPD provides a simpler method of defining the rxPD routines.
  3011.  
  3012. Instead of defining each routine, just define the rxPDLoadFuncs routine and then
  3013. call it in order to define all of the rest of the routines.
  3014.  
  3015. Example:
  3016.  
  3017.      /* Add the rxPDLoadFuncs routine to the REXX MacroSpace */
  3018.      CALL RxFuncAdd 'rxPDLoadFuncs', 'HSSPD', 'rxPDLoadFuncs'
  3019.      /* Call rxPDLoadFuncs to define the rest of the rxPD system */
  3020.      Call rxPDLoadFuncs
  3021.  
  3022.                   3 REXX PDS Application Programming Interface         Page  51
  3023.  
  3024.  
  3025.  
  3026.  
  3027.                            Panel Display System (PDS)                           
  3028.  
  3029.  
  3030. This series of calls need only to be made once before the first usage of the
  3031. rxPD system. But, since REXX extensions are dynamic extensions, these same calls
  3032. must be made each time OS/2 is rebooted. OS/2 does not remember the existance of
  3033. REXX extensions across OS/2 shutdowns.
  3034.  
  3035. These calls can be made by every rxPD application. Repeated calls to RxFuncAdd
  3036. to define the same routine again do not affect the REXX MacroSpace.
  3037.  
  3038. The 'STARTUP.CMD' is an excellent candidate for defining rxPD to OS/2 without
  3039. having to put this code into each rxPD application. Then again, having each rxPD
  3040. application define rxPD itself does simplify the installation of the rxPD
  3041. application.
  3042.  
  3043. The format for rxPDLoadFuncs is:
  3044.  
  3045.         Call rxPDLoadFuncs
  3046.  
  3047.  
  3048.   3.2 Initializing the RXPD environment with rxPDInit                         
  3049.  
  3050.  
  3051. Each rxPD application must initialize another instance of the rxPD system by
  3052. calling the 'rxPDInit' routine.
  3053.  
  3054. This call initializes an instance of the rxPD system and it also processes a PDL
  3055. Library for subsequent use of the panels contained therein.
  3056.  
  3057. This does NOT mean that a single execution of an rxPD application must
  3058. initialize a single instance of the rxPD system.
  3059.  
  3060. In the case of an rxPD application that requires a large number of PDS panels,
  3061. it might prove preferrable to split up the PDS panels into separate PDL
  3062. Libraries.
  3063.  
  3064. This will allow the application programmer to defer the initialization of a PDL
  3065. Library to a point later in the application. This can mean that a PDL Library
  3066. might not even be initialized during the processing of the application.
  3067.  
  3068. By defering the initialization until needed, the application programmer will
  3069. reduce the amount of initialization required at the start of the rxPD
  3070. application.
  3071.  
  3072. A side benefit of using multiple PDL Libraries is that each instance of the
  3073. initialization returns a handle that referrences only those PDS panels defined
  3074. in that library.
  3075.  
  3076.               3.1 Defining the REXX PDS, "RXPD", interface to OS/2     Page  52
  3077.  
  3078.  
  3079.  
  3080.  
  3081.                            Panel Display System (PDS)                           
  3082.  
  3083.  
  3084. This can result in a minor decrease in the time it takes PDS to find and display
  3085. a panel since in this case the panels are referrenced by different handles and
  3086. the search path will be shorter than if all of the panels had been defined in
  3087. only one PDL Library.
  3088.  
  3089. The use of multiple PDL Libraries is only recommended in those cases where there
  3090. are a large number of panels or where the initialization time is determined to
  3091. be unacceptable for the end user.
  3092.  
  3093. There is a caveat when using multiple instances of rxPD within a single
  3094. application. That caveat is that any variables explicitly defined to the PD
  3095. system with the rxPDVarDefine routine are defined only for a single instance of
  3096. the rxPD interface.
  3097.  
  3098. If a REXX variable must be defined to rxPD and if that variable will be
  3099. processed by PDS panels from different PDL Libraries, then that variable must be
  3100. defined to each instance of rxPD if the PD system is to perform the same data
  3101. tests and manipulations defined for that variable on each panel which
  3102. referrences that variable.
  3103.  
  3104. The format for rxPDInit is:
  3105.  
  3106.     bid = rxPDInit(pdllib,clriput,clroput,clrtext,clrbckg,newrow,newcol)
  3107.  
  3108.     bid    - The base ID or handle to this instance of rxPD.
  3109.     pdllib - The name of the PDL Library to processed by this instance of rxPD.
  3110.              The file name of the Library must NOT include the extension.  By
  3111.              default, PDS always appends the extension ".PNL" to the library
  3112.              name before searching for the file. Except for the ".PNL"
  3113.              extension, the library name can be fully qualified.  The rxPDInit
  3114.              routine will search the current working directory and then the
  3115.              "DPATH" variable for the directory containing the PDL Library.
  3116.     clriput - An optional overriding default to the base input field color for
  3117.               all panels in this library.
  3118.     clroput - An optional overriding default to the base output field color for
  3119.               all panels in this library.
  3120.     clrtext - An optional overriding default to the base text field color for
  3121.               all panels in this library.
  3122.     clrbckg - An optional overriding default to the base background field color
  3123.               for all panels in this library.
  3124.     newrow  - Optionally change the number of rows for this OS/2 session.
  3125.     newcol  - Optionally change the number of columns for this OS/2 session.
  3126.               Note, this parameter is not implemented at this time but has been
  3127.               included for future referrence.)
  3128.  
  3129.  
  3130.               3.2 Initializing the RXPD environment with rxPDInit      Page  53
  3131.  
  3132.  
  3133.  
  3134.  
  3135.                            Panel Display System (PDS)                           
  3136.  
  3137. When executed, rxPDInit does the following:
  3138.  
  3139.     1. Saves an image of the current video display, the video status and the
  3140.        status of the cursor.
  3141.  
  3142.     2. If necessary, rxPDInit changes the video mode to match the rows and
  3143.        columns specified otherwise it defaults to the current video mode.
  3144.  
  3145.     3. Processes the PDL Library.
  3146.  
  3147.     4. If there are no errors in the PDL Library, rxPDInit returns
  3148.        a handle to this instance of the rxPD system.
  3149.  
  3150.  
  3151.   3.3 Terminating the RXPD environment with rxPDTerm                          
  3152.  
  3153.  
  3154. When an rxPD application is finished with an instance of the rxPD system, the
  3155. application should call 'rxPDTerm' to release all resources consumed by the
  3156. instance of rxPD created by 'rxPDInit'
  3157.  
  3158. The format for rxPDTerm is:
  3159.  
  3160.     rc  = rxPDTerm(bid)
  3161.  
  3162.     rc     - Return code should be 0.
  3163.     bid    - The handle to an instance of the rxPD system.
  3164.  
  3165. When executed, rxPDTerm does the following:
  3166.  
  3167.     1. If necessary, rxPDTerm restores the video mode to match the rows and
  3168.        columns at the time of the rxPDInit.
  3169.  
  3170.     2. Restores the cursor and the video state.
  3171.  
  3172.     3. Restores the image of the current video display that was saved by
  3173.        rxPDInit.
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.               3.2 Initializing the RXPD environment with rxPDInit      Page  54
  3185.  
  3186.  
  3187.  
  3188.  
  3189.                            Panel Display System (PDS)                           
  3190.  
  3191.   3.4 Displaying a PDS panel with rxPDDisplay                                 
  3192.  
  3193.  
  3194. To display a panel or to build a composite display from a panel, the rxPD
  3195. application calls the 'rxPDDisplay' routine.
  3196.  
  3197. This routine displays the panel and optionally positions the cursor to a
  3198. specific input field and index within that field.
  3199.  
  3200. The format for rxPDDisplay is:
  3201.  
  3202.     akey = rxPDDisplay(bid,pnlname,fldname,fldndx)
  3203.  
  3204.     akey   - The AID/XID key pressed by the end users.
  3205.     bid    - The handle to an instance of the rxPD system.
  3206.     pnlname - The name of a panel owned by the bid.
  3207.     fldname - Optional name of an input field where the cursor is to be placed.
  3208.     fldndx  - Optional cursor index within the cursor field.
  3209.  
  3210. When executed, rxPDDisplay does the following:
  3211.  
  3212.     1. Searchs for a matching panel owned by the bid.
  3213.  
  3214.     2. Updates the video buffer with all fields defined for the panel.
  3215.  
  3216.     3. Optionally flushes the video buffer to the display.
  3217.  
  3218.     4. Optionally positions the cursor on a specific input field.
  3219.  
  3220.     5. Optionally waits for the end user to press and AID or XID key.
  3221.  
  3222. The rxPDDisplay routine normally returns either an AID key or an XID key.
  3223.  
  3224. This key will have a value, defined by PDS, with the format of:
  3225.  
  3226.     akey = "extendedkey shiftstate asciicode scancode"
  3227.  
  3228. E.G. akey = "00 01 1B 01"
  3229.  
  3230. The above example is the value returned if the end user pressed the 'ESC' key.
  3231.  
  3232. Note, do NOT depend upon the format described above. It is not guarenteed to
  3233. stay the same format. Instead, use the 'rxPDZVarDefine' routine to define the
  3234. 'Z' variables which can be used to test the values returned via the 'akey'
  3235. variable.
  3236.  
  3237.  
  3238.                   3.4 Displaying a PDS panel with rxPDDisplay          Page  55
  3239.  
  3240.  
  3241.  
  3242.  
  3243.                            Panel Display System (PDS)                           
  3244.  
  3245. One variation on the above format is that the 'Data Verification Procedure'
  3246. can return an integer as a return code instead of an AID/XID key.
  3247.  
  3248. This is entirely up to the application programmer who creates the 'DVP' for a
  3249. panel. To test for an integer instead of an AID/XID key, use the builtin
  3250. REXX 'DATATYPE' function to test for a 'NUM' value.
  3251.  
  3252.  
  3253.   3.5 Saving an image of the display with rxPDSaveScreen                      
  3254.  
  3255.  
  3256. To save a copy of the current display image, use the 'rxPDSaveScreen' routine.
  3257.  
  3258. The format for rxPDSaveScreen is:
  3259.  
  3260.     svid = rxPDSaveScreen(bid)
  3261.  
  3262.     svid   - The handle to the saved image.
  3263.     bid    - The handle to an instance of the rxPD system.
  3264.  
  3265.  
  3266.   3.6 Restoring an image of the display with rxPDRestoreScreen                
  3267.  
  3268.  
  3269. To restore a copy of the display image, use the 'rxPDRestoreScreen' routine.
  3270.  
  3271. The format for rxPDSaveScreen is:
  3272.  
  3273.     rc   = rxPDRestoreScreen(bid,svid)
  3274.  
  3275.     rc     - Return code should be 0.
  3276.     bid    - The handle to an instance of the rxPD system.
  3277.     svid   - The handle to the saved image.
  3278.  
  3279.  
  3280.   3.7 Setting an error or informational message with rxPDSetMsgText           
  3281.  
  3282.  
  3283. The PD system allows the application developer to request that a text message be
  3284. displayed regardless of what panel is displayed.
  3285.  
  3286. In the case of a 'DVP' which returns with the ZVERIFY_RC_NORETURN value, this
  3287. same message will also be displayed when control is returned to PDS.
  3288.  
  3289. The message text actually has 3 optional parts and an audible cue which the
  3290. developer can request be displayed.
  3291.  
  3292.                   3.4 Displaying a PDS panel with rxPDDisplay          Page  56
  3293.  
  3294.  
  3295.  
  3296.  
  3297.                            Panel Display System (PDS)                           
  3298.  
  3299.  
  3300. The format for rxPDSetMsgText is:
  3301.  
  3302.     rc   = rxPDSetMsgText(bid,shortmsg,longmsg,popuppanel,alarm)
  3303.  
  3304.     rc     - Return code should be 0.
  3305.     bid    - The handle to an instance of the rxPD system.
  3306.     shortmsg - An optional short message.
  3307.                This short message is displayed in the lower left corner of the
  3308.                physical display.
  3309.     longmsg  - An optional long message.
  3310.                This long message is displayed centered on the bottom row of the
  3311.                physical display.
  3312.     popuppanel - An optional popup panel name.
  3313.                This panel is displayed by PDS via an internal call to
  3314.                rxPDDisplay so any panel may be used.
  3315.     alarm    - The optional audible beep.
  3316.                This audible cue can be either a warning, error or severe level
  3317.                cue.
  3318.  
  3319. The way in which PDS handles the displaying of the 3 optional messages is
  3320. dependent upon what is requested on the call to rxPDSetMsgText.
  3321.  
  3322. When PDS determines that there is a message(s) to be displayed then it displays
  3323. the first non-null option specified by the call.
  3324.  
  3325. Subsequent to the display of the first non-null option, the 'F1' key will
  3326. automatically display the next non-null option in the list. This is repeated
  3327. until all messages are displayed or until either the 'ESC' key or any other key
  3328. is pressed. If any key other than 'F1' or 'ESC' is pressed, then that key is
  3329. processed by PDS as a valid key for any input field currently being displayed.
  3330.  
  3331. An example of this can be seen in figure 10.
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.        3.7 Setting an error or informational message with rxPDSetMsgTe Page  57
  3347.  
  3348.  
  3349.  
  3350.  
  3351.                            Panel Display System (PDS)                           
  3352.  
  3353.                   Figure 10. - Example of setting message text                
  3354.  
  3355.  
  3356. )PANEL NAME=DEMO0006 CLS=Y
  3357. This is ROW # 1
  3358.        Please enter a value for variable sOutVar: _sOutVar+
  3359.  
  3360. )END )NODISPLAY )NOWAIT
  3361.  
  3362. )PANEL NAME=ERROR001 CLS=N XID=(ZESC) AID=(ZNONE)
  3363. )COLORS TEXT=RED OUTPUT=YELLOWHI
  3364. )ROW 10 15 FLDS="The value specified is in error: %sErrVal+"
  3365. )END
  3366.  
  3367.        /* Set the error message text */
  3368.        sErrVal=sOutVar
  3369.        sOutVar="**********"
  3370.        rc=rxPDSetMsgText(bid,"ERR0001E"," <INVALID VALUE> ","ERROR001")
  3371.        rc=rxPDDisplay(bid,"DEMO0006")
  3372.  
  3373.  
  3374.                Figure 10 - Example of setting a message text.
  3375.  
  3376.  
  3377. In figure 10, a popup panel and some REXX code is shown which specifies three of
  3378. the message options. The result of displaying the "DEMO0006" panel is shown in
  3379. figure 11 (assuming a display of only 25 rows).
  3380.  
  3381.  
  3382.  
  3383.  
  3384.  
  3385.  
  3386.  
  3387.  
  3388.  
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.        3.7 Setting an error or informational message with rxPDSetMsgTe Page  58
  3401.  
  3402.  
  3403.  
  3404.  
  3405.                            Panel Display System (PDS)                           
  3406.  
  3407.                     Figure 11. - Example of a short message                   
  3408.  
  3409.  
  3410. This is ROW # 1
  3411.        Please enter a value for variable sOutVar: ********
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.  
  3434. ERR0001E
  3435.  
  3436.  
  3437.                     Figure 11 - Example of a short message.
  3438.  
  3439.  
  3440. As can be seen in figure 11 the short message text "ERR0001E" is displayed
  3441. along with the "DEMO0006" panel.
  3442.  
  3443. If the 'ESC' key were pressed, then this short message would be cleared.
  3444.  
  3445. If the 'F1' key were pressed, then the display would look like that in figure
  3446. 12, otherwise any other key would be processed as normal resulting in the
  3447. dismissal of the message text options.
  3448.  
  3449.  
  3450.  
  3451.  
  3452.  
  3453.  
  3454.        3.7 Setting an error or informational message with rxPDSetMsgTe Page  59
  3455.  
  3456.  
  3457.  
  3458.  
  3459.                            Panel Display System (PDS)                           
  3460.  
  3461.                      Figure 12. - Example of a long message                   
  3462.  
  3463.  
  3464. This is ROW # 1
  3465.        Please enter a value for variable sOutVar: ********
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488. ERR0001E                       <INVALID VALUE>
  3489.  
  3490.  
  3491.                     Figure 12 - Example of a long message.
  3492.  
  3493.  
  3494. As can be seen in figure 12 the long message text " <INVALID VALUE> " is now
  3495. displayed along with the "ERR0001E" message.
  3496.  
  3497. If the 'ESC' key were pressed, then both messages would be cleared.
  3498.  
  3499. If the 'F1' key were pressed, then the display would look like that in figure
  3500. 13, otherwise any other key would be processed as normal resulting in the
  3501. dismissal of the message text options.
  3502.  
  3503.  
  3504.  
  3505.  
  3506.  
  3507.  
  3508.        3.7 Setting an error or informational message with rxPDSetMsgTe Page  60
  3509.  
  3510.  
  3511.  
  3512.  
  3513.                            Panel Display System (PDS)                           
  3514.  
  3515.                     Figure 13. - Example of a "POPUP" panel                   
  3516.  
  3517.  
  3518. This is ROW # 1
  3519.        Please enter a value for variable sOutVar: ********
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.               The value specified is in error: ABCDEFGH
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.  
  3541.  
  3542. ERR0001E                       <INVALID VALUE>
  3543.  
  3544.  
  3545.                     Figure 13 - Example of a popup panel.
  3546.  
  3547. As can be seen in figure 13 the popup panel "ERROR001" is displayed along with
  3548. both the short and long messages.
  3549.  
  3550. Notice that only the 'ESC' key can be pressed for this panel.
  3551.  
  3552. PDS does NOT override the AID/XID keys defined for the popup panel "ERROR001".
  3553. It is up to the application developer to design error popup panels such that
  3554. they will conform in some degree to the standards set for the short and long
  3555. message fields. In this particular case, the 'ESC' is specifically defined as
  3556. the XID for this panel. This will allow the end user to dismiss the popup panel
  3557. without passing this key on to panel "DEMO0006".
  3558.  
  3559. If the developer wanted to allow the end user to type into the sOutVar field,
  3560. then an XID=(ZALL) should have been coded for panel "DEMO0006".
  3561.  
  3562.        3.7 Setting an error or informational message with rxPDSetMsgTe Page  61
  3563.  
  3564.  
  3565.  
  3566.  
  3567.                            Panel Display System (PDS)                           
  3568.  
  3569.  
  3570. This would pass all but the 'ESC' key on to the "DEMO0006" panel.
  3571.  
  3572. Regardless of what is defined for either the "DEMO0006" or "ERROR001" panel's
  3573. AID or XID options, PDS always consumes the 'ESC' key as a request to clear the
  3574. display of all message text fields or panel.
  3575.  
  3576.  
  3577.   3.8 Setting the target field for the cursor with rxPDSetCursorFld           
  3578.  
  3579.  
  3580. By default, the rxPD system always places the cursor over the first byte of the
  3581. first input field on a panel.
  3582.  
  3583. The rxPD application can override this cursor placement either by specifying a
  3584. target cursor field on the call to 'rxPDDisplay' or by using the
  3585. 'rxPDSetCursorFld' routine.
  3586.  
  3587. The format for rxPDSetCursorFld is:
  3588.  
  3589.     rc   = rxPDSetCursorFld(bid,pnlname,fldname,fldndx)
  3590.  
  3591.     rc     - Return code should be 0.
  3592.     bid    - The handle to an instance of the rxPD system.
  3593.     pnlname - The name of a panel.
  3594.     fldname - The name of a field within the panel.
  3595.     fldndx  - Optional index within the field where the cursor is to be
  3596.               positioned.  If not specified or if a value out of range of the
  3597.               width of the field is specified, then the cursor index will be set
  3598.               to the first byte within the field.
  3599.  
  3600. The 'rxPDSetCursorFld' is a deferred action routine whereby the application can
  3601. request that the cursor be placed on a specific input field of a panel prior to
  3602. the displaying of that panel by 'rxPDDisplay' or when a 'Data Verification
  3603. Procedure' returns ZVERIFY_RC_NORETURN to suppress the return of an AID key.
  3604.  
  3605. It is this second reason that makes 'rxPDSetCursorFld' most useful.
  3606.  
  3607. A 'DVP' can be written such that it determines that a field contains invalid
  3608. data, sets an error message and positions the cursor over the data in question.
  3609.  
  3610. An example of this can be seen in figure 14.
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.        3.7 Setting an error or informational message with rxPDSetMsgTe Page  62
  3617.  
  3618.  
  3619.  
  3620.  
  3621.                            Panel Display System (PDS)                           
  3622.  
  3623.                  Figure 14. - Example of setting a cursor field               
  3624.  
  3625.  
  3626. )PANEL NAME=DEMO0007 CLS=Y AID=(ZENTER)
  3627. This is ROW # 1
  3628.        Please enter any value for variable sTxtVar: _sTxtVar+
  3629.        Please enter a numeric value for variable sNumVar: _sNumVar+
  3630.  
  3631. )PROC
  3632.  /* Determine the validity of the variable 'sNumVar' */
  3633.  if DATATYPE(sNumVar) <> 'NUM' then
  3634.   do
  3635.    rc=rxPDSetMsgText(bid,"ERR0002E"," <NON-NUMERIC VALUE> ","ERROR002")
  3636.    rc=rxPDSetCursorFld(bid,"DEMO0007","sNumVar")
  3637.    Call rxPDZVarDefine "ZVERIFY_RC_NORETURN"
  3638.    return ZVERIFY_RC_NORETURN
  3639.   end
  3640.  return ZKey
  3641. )END )NODISPLAY )NOWAIT
  3642.  
  3643. )PANEL NAME=ERROR002 CLS=N XID=(ZESC) AID=(ZNONE)
  3644. )COLORS TEXT=RED OUTPUT=YELLOWHI
  3645. )ROW 10 15 FLDS="The value specified for sNumVar is not numeric."
  3646. )END
  3647.  
  3648.  
  3649.                Figure 14 - Example of setting a cursor field.
  3650.  
  3651.  
  3652. In figure 14, panel "DEMO0007" is designed such that the 'ENTER' key is the only
  3653. AID key for the panel and a 'Data Verification Procedure' will be executed when
  3654. the 'ENTER' key is pressed.
  3655.  
  3656. When the "DEMO0007" panel is displayed, the PD system will display the text
  3657. fields of the panel and the values contained in the variables "sTxtVar" and
  3658. "sNumVar" and it will position the cursor over the first byte in the "sTxtVar"
  3659. field.  The PD system will then wait for the end user to press the 'ENTER' key.
  3660.  
  3661. When the 'ENTER' key is pressed, the following will occur:
  3662.  
  3663. 1. A copy of the variable "sNumVar" is created in the REXX shared variable pool
  3664.    for the 'Data Verification Procedure'.
  3665. 2. The 'DVP' is called.
  3666. 3. The 'DVP' checks the type of data that "sNumVar" contains.
  3667. 3A. If the data is not numeric.
  3668.     3A1. Set a short, long and panel to be displayed.
  3669.  
  3670.        3.8 Setting the target field for the cursor with rxPDSetCursorF Page  63
  3671.  
  3672.  
  3673.  
  3674.  
  3675.                            Panel Display System (PDS)                           
  3676.  
  3677.     3A2. Set the target cursor position to the "sNumVar" field.
  3678.     3A3. Ask rxPD to define the value for the return code that suppresses the
  3679.          return of the AID key to the application.
  3680.     3A4. Return the "NoReturn" code to PDS.
  3681.     3A5. PDS will display the short message text.
  3682.     3A6. PDS will position the cursor over byte 1 of the "sNumVar" field.
  3683.     3A7. PDS will then wait for the end user to press 'ENTER'.
  3684. 3B. If the data is numeric.
  3685.     3B1. Return the AID key to PDS.
  3686.     3B2. PDS will return the AID key to the application.
  3687.  
  3688.  
  3689.   3.9 Defining variable attributes with rxPDVarDefine                         
  3690.  
  3691.  
  3692. As has been discussed in another section, a number of attributes can be defined
  3693. for a variable which will affect how PDS will process that variable.
  3694.  
  3695. The rxPD routine which assigns attributes to variables is the 'rxPDVarDefine'
  3696. routine.
  3697.  
  3698. The format for rxPDVarDefine is:
  3699.  
  3700.     rc   = rxPDVarDefine(bid,varname,varattrib,precision)
  3701.  
  3702.     rc     - Return code should be 0.
  3703.     bid    - The handle to an instance of the rxPD system.
  3704.     varname   - The name of the variable being defined.
  3705.     varattrib - Attribute(s) being assigned to the variable.
  3706.     precision - The optional precision size to be used for a variable being
  3707.                 assigned the floating point or integer attribute.
  3708.  
  3709. The values for the variable attributes are defined as 'Z' variables by the
  3710. 'rxPDZVarDefine' routine.
  3711.  
  3712. The attributes are:
  3713.  
  3714.   ZVTYPE_ZSTRING     - Variable is a text string (default).
  3715.   ZVTYPE_LONG        - Variable is an integer.
  3716.   ZVTYPE_DOUBLE      - Variable is a floating point number.
  3717.   ZVTYPE_RIGHTADJUST - Variable is to be right adjusted on output.
  3718.   ZVTYPE_LZEROFILL   - Variable is to be padded on the left with zeros.
  3719.   ZVTYPE_GLOBAL      - Variable is global in scope for all 'DVP's.
  3720.  
  3721. To assign multiple attributes to a single variable, the above values must be
  3722. added together when the variable is defined.
  3723.  
  3724.        3.8 Setting the target field for the cursor with rxPDSetCursorF Page  64
  3725.  
  3726.  
  3727.  
  3728.  
  3729.                            Panel Display System (PDS)                           
  3730.  
  3731.  
  3732. Example:
  3733.  
  3734.   rc = rxPDVarDefine(bid,"sNumVar", ZVTYPE_LONG+ZVTYPE_RIGHTADJUST, 4)
  3735.  
  3736. The above example will define the variable "sNumVar" as being an integer which
  3737. will always be right adjusted whenever it is processed for output by the PD
  3738. system. The variable will always have at least 4 bytes of precision displayed on
  3739. output.
  3740.  
  3741. Note, the same variable can be defined more than once. But, only the most recent
  3742. definition is used when processing the variable.
  3743.  
  3744.  
  3745.   3.10 Deleting variable attributes with rxPDVarDelete                        
  3746.  
  3747.  
  3748. Just as an rxPD application can define attributes for a variable, the
  3749. application can also delete previously defined attributes.
  3750.  
  3751. This attribute deletion is not a subtraction of a single attribute, but is
  3752. instead a deletion of the variable name from the PD system's list of 'VDefined'
  3753. variables.
  3754.  
  3755. When used in concert with multiple calls to 'rxPDVarDefine' for a single
  3756. variable, 'rxPDVarDelete' allows the application developer to 'PUSH' a new
  3757. attribute for a variable with 'rxPDVarDefine' and to 'POP' the new attribute
  3758. with 'rxPDVarDelete'.
  3759.  
  3760. The format for rxPDVarDelete is:
  3761.  
  3762.     rc   = rxPDVarDelete(bid,varname)
  3763.  
  3764.     rc     - Return code should be 0.
  3765.     bid    - The handle to an instance of the rxPD system.
  3766.     varname   - The name of the variable being deleted.
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.  
  3774.  
  3775.  
  3776.  
  3777.  
  3778.               3.9 Defining variable attributes with rxPDVarDefine      Page  65
  3779.  
  3780.  
  3781.  
  3782.  
  3783.                            Panel Display System (PDS)                           
  3784.  
  3785.   3.11 Querying a panel's field 'MDT' state with rxPDQueryMDT                 
  3786.  
  3787.  
  3788. In order to simplify the processing of input fields by an rxPD application, a
  3789. couple of rxPD routines are provided which help determine the state of the input
  3790. fields for a panel.
  3791.  
  3792. The first of these routines is the 'rxPDQueryMDT' routine.
  3793.  
  3794. The acronym 'MDT' is an arcane term known as "Modified Data Tag" which will be
  3795. familiar to some mainframe programmers.
  3796.  
  3797. What it refers to is a 'Changed' state for an input field.
  3798.  
  3799. Whenever an end user modifieds an input field for a panel in any way, PDS turns
  3800. on the 'MDT' state for that input field.
  3801.  
  3802. The application can query this state for any or all fields on the panel just
  3803. displayed or any panel which has been previously displayed.
  3804.  
  3805. In other words, PDS clears all 'MDT's for all input fields for a panel being
  3806. displayed. It then sets the 'MDT' for any field the user modifies. It retains
  3807. this state for each field until the panel is again displayed by the application.
  3808.  
  3809. This 'MDT' state latency can be used by the application programmer to remember
  3810. the path an end user took to get where they are in the execution of the
  3811. application.
  3812.  
  3813. It is used mainly to determine whether or not the end user modified the data in
  3814. a field without having to make copies of a variable prior to displaying a panel
  3815. containing the variable.
  3816.  
  3817. Use of this routine greatly reduces the amount of application code required to
  3818. process a panel with a large number of input fields.
  3819.  
  3820. The format for rxPDQueryMDT is:
  3821.  
  3822.     cnt  = rxPDQueryMDT(bid,pnlname,fldname)
  3823.  
  3824.     cnt    - Either the 'MDT' state of the variable or the count of all modified
  3825.              fields on the panel.
  3826.     bid    - The handle to an instance of the rxPD system.
  3827.     pnlname   - The name of the panel being queried.
  3828.     fldname   - The optional name of the field being queried.
  3829.  
  3830. The 'rxPDQueryMDT' returns a number possible values depending upon whether or
  3831.  
  3832.           3.11 Querying a panel's field 'MDT' state with rxPDQueryMDT  Page  66
  3833.  
  3834.  
  3835.  
  3836.  
  3837.                            Panel Display System (PDS)                           
  3838.  
  3839. not a field name was specified.
  3840.  
  3841. If a 'fldname' is specified when 'rxPDQueryMDT' is called, then either a 0
  3842. (FALSE) or a 1 (TRUE) is returned depending upon both the existance of the field
  3843. in the panel and the 'MDT' state of the field.
  3844.  
  3845. Example:
  3846.  
  3847.     mdtstate = rxPDQueryMDT(bid,"DEMO0007","sNumVar")
  3848.  
  3849. In the above example, the variable 'mdtstate' will contain either a 0,
  3850. indicating the field "sNumVar" was not modified, or a 1, indicating that
  3851. "sNumVar" was modified.
  3852.  
  3853. If a 'fldname' is NOT specified when 'rxPDQueryMDT' is called, then either a 0
  3854. (NONE) or a value greater than 0 (COUNT) is returned.
  3855.  
  3856. Example:
  3857.  
  3858.     mdtcount = rxPDQueryMDT(bid,"DEMO0007")
  3859.  
  3860. In the above example, the variable 'mdtcount' will contain either a 0,
  3861. indicating that no fields were modified, or in the case of our "DEMO0007" panel
  3862. a value from 1 to 2 depending upon which fields, "sTxtVar" and/or "sNumVar",
  3863. were modified.
  3864.  
  3865.  
  3866.   3.12 Querying a panel's modified field names with rxPDQueryMDTFld           
  3867.  
  3868.  
  3869. Another rxPD routine which helps an rxPD application process the input fields
  3870. for a panel is the 'rxPDQueryMDTFld' routine.
  3871.  
  3872. The purpose of this routine is to retrieve the name of a field which has the
  3873. 'MDT' state set on.
  3874.  
  3875. Instead of querying the 'MDT' state of each input field on a panel, the rxPD
  3876. application can ask for the name of a modified field on the panel.
  3877.  
  3878. This is done by calling 'rxPDQueryMDTFld' with an index representing the which
  3879. modified field name to return.
  3880.  
  3881. The format for rxPDQueryMDTFld is:
  3882.  
  3883.     fld = rxPDQueryMDTFld(bid,pnlname,fldindx)
  3884.  
  3885.  
  3886.           3.11 Querying a panel's field 'MDT' state with rxPDQueryMDT  Page  67
  3887.  
  3888.  
  3889.  
  3890.  
  3891.                            Panel Display System (PDS)                           
  3892.  
  3893.     fld    - Either the field name of a modified field or a null string
  3894.              representing no such field.
  3895.     bid    - The handle to an instance of the rxPD system.
  3896.     pnlname   - The name of the panel being queried.
  3897.     fldindx   - The index number of a possible modified field.
  3898.  
  3899. The 'fldindx' value is not the number of a field on the panel, but the number of
  3900. a modified field on the panel.
  3901.  
  3902. In other words, a panel might contain 6 fields, but only 3 of the fields might
  3903. have been modified by the user. The highest 'fldindx' value for this panel would
  3904. be an index of 3.
  3905.  
  3906. While this might seem unusual, it removes the requirement that an application
  3907. know what field is in what order on a panel.
  3908.  
  3909. Instead, an application need only know what field names are on the panel and the
  3910. count of the modified fields on the panel.
  3911.  
  3912. Since the count of modified fields can be queried by the 'rxPDQueryMDT' routine,
  3913. the use of both routines can greatly decrease the perceived response time of an
  3914. rxPD application.
  3915.  
  3916. Example:
  3917.  
  3918.   mdtcount = rxPDQueryMDT(bid,"DEMO0007") /* Retrieve the count */
  3919.   do i = 1 to mdtcount
  3920.    fld = rxPDQueryMDTFld(bid,"DEMO0007",i) /* Retrieve a 'MDT' field name */
  3921.    select
  3922.     when fld = 'sTxtVar' then
  3923.      do
  3924.       Call rProcessText sTxtVar
  3925.      end
  3926.     when fld = 'sNumVar' then
  3927.      do
  3928.       Call rProcessNumber sNumVar
  3929.      end
  3930.     otherwise
  3931.      do
  3932.       SIGNAL UNKNOWNFIELD
  3933.      end
  3934.    end /*select*/
  3935.   end /*do i = 1 to mdtcount*/
  3936.  
  3937. The above example shows how to skip thru the possible modified fields of the
  3938. panel "DEMO0007".
  3939.  
  3940.        3.12 Querying a panel's modified field names with rxPDQueryMDTF Page  68
  3941.  
  3942.  
  3943.  
  3944.  
  3945.                            Panel Display System (PDS)                           
  3946.  
  3947.  
  3948. If in fact only the "sNumVar" field was modified, then only that field will be
  3949. processed. The same is true of the "sTxtVar" field. If both fields were
  3950. modified, then both fields would be processed.
  3951.  
  3952. Now, in the above example, only two fields are possible and in that situation it
  3953. would probably be faster to test each field separately with the 'rxPDQueryMDT'
  3954. routine. But, the example code is still valid in this case.
  3955.  
  3956. It is best to note here that the order in which the names of the modified fields
  3957. are retrieved from the PD system's list of modified fields is dependent upon the
  3958. order the fields were defined for the panel within the PDL Library.
  3959.  
  3960.  
  3961.   3.13 Retrieving predefined variable values with rxPDVDefVarRetrieve         
  3962.  
  3963.  
  3964. By design, 'Data Verification Procedure's are executed as REXX procedures.
  3965.  
  3966. This means that they can not see any variables outside the scope of their
  3967. execution.
  3968.  
  3969. By design, the PD system automatically creates certain 'Z' variables in the
  3970. shared variable pool of the 'DVP' along with a copy of each input field on the
  3971. panel that defined the 'DVP'.
  3972.  
  3973. Only these variables are immediately accessable by the 'DVP'.
  3974.  
  3975. However, there may be times that a 'Data Verification Procedure' may need to to
  3976. be able to test a panel's field value against a variable that is not within the
  3977. 'DVP's variable pool.
  3978.  
  3979. A way has been provided by which a 'DVP' can retrieve variables from the rxPD
  3980. application which are not available from the panel.
  3981.  
  3982. This is done by a combination of 'Defined' variables and the
  3983. 'rxPDVDefVarRetrieve' routine.
  3984.  
  3985. Variables which have been defined to PDS with the ZVTYPE_GLOBAL attribute are
  3986. available to the 'DVP' if it needs access to such a variable.
  3987.  
  3988. In order to keep the performance of a 'DVP' as responsive as possible, none of
  3989. these variables are automatically defined in the 'DVP's variable pool.
  3990.  
  3991. Instead, these variables must be explicitly retrieved by the 'DVP' with the
  3992. 'rxPDVDefVarRetrieve' routine.
  3993.  
  3994.        3.12 Querying a panel's modified field names with rxPDQueryMDTF Page  69
  3995.  
  3996.  
  3997.  
  3998.  
  3999.                            Panel Display System (PDS)                           
  4000.  
  4001.  
  4002. The format for rxPDVDefVarRetrieve is:
  4003.  
  4004.     fld = rxPDVDefVarRetrieve(bid,pid,fldname)
  4005.  
  4006.     fld    - The field to recieve the data contained in the 'VDefined'
  4007.              ZVTYPE_GLOBAL variable.
  4008.     bid    - The handle to an instance of the rxPD system.
  4009.     pid    - The handle of the panel which owns the 'DVP'.
  4010.     fldname - The name of a variable defined as ZVTYPE_GLOBAL.
  4011.  
  4012. The bid is the base handle to this instance of the PD system and is passed to
  4013. the 'DVP' in the variable 'ZBid'.
  4014.  
  4015. The pid is the handle to the panel which owns the currently executing 'DVP'.
  4016. This handle was passed to the 'DVP' in the variable 'ZPid'. This handle must be
  4017. used instead of the panel name. This insures that only 'DVP's can call the
  4018. 'rxPDVDefVarRetrieve' routine.
  4019.  
  4020. See figure 15 for an example of 'rxPDVDefVarRetrieve'.
  4021.  
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.  
  4034.  
  4035.  
  4036.  
  4037.  
  4038.  
  4039.  
  4040.  
  4041.  
  4042.  
  4043.  
  4044.  
  4045.  
  4046.  
  4047.  
  4048.       3.13 Retrieving predefined variable values with rxPDVDefVarRetri Page  70
  4049.  
  4050.  
  4051.  
  4052.  
  4053.                            Panel Display System (PDS)                           
  4054.  
  4055.                   Figure 15. - Example of retrieving variables                
  4056.  
  4057.  
  4058. )PANEL NAME=DEMO0008 CLS=Y AID=(ZENTER)
  4059. This is ROW # 1
  4060.        Please change the value for variable sTxtVar: _sTxtVar+
  4061. )PROC
  4062.  /* Retrieve original value for variable 'sTxtVar' into a different variable */
  4063.  sOldTxtVar = rxPDVDefVarRetrieve(ZBid,ZPid,"sTxtVar")
  4064.  /* Test to insure that 'sTxtVar' has been changed as required. */
  4065.  if sOldTxtVar = sTxtVar then
  4066.   do
  4067.    rc=rxPDSetMsgText(bid,"ERR0003E"," <INVALID VALUE> ")
  4068.    rc=rxPDSetCursorFld(bid,"DEMO0008","sTxtVar")
  4069.    Call rxPDZVarDefine "ZVERIFY_RC_NORETURN"
  4070.    return ZVERIFY_RC_NORETURN
  4071.   end
  4072.  return ZKey
  4073. )END )NODISPLAY )NOWAIT
  4074.  
  4075.       /* First define sTxtVar to the PD system */
  4076.       Call rxPDVarDefine bid, "sTxtVar", ZVTYPE_GLOBAL
  4077.       /* Now set sTxtVar to the current value */
  4078.       sTxtVar = "CurValue"
  4079.       akey = rxPDDisplay(bid,"DEMO0008")
  4080.  
  4081.  
  4082.                Figure 15 - Example of retrieving variables
  4083.  
  4084.  
  4085. In figure 15, panel "DEMO0008" is designed such that when the 'ENTER'
  4086. key is pressed, the 'Data Verification Procedure' will be executed.
  4087.  
  4088. This 'DVP' will retrieve the value of 'sTxtVar' as it was when the 'DVP' was
  4089. called and compare it to the value of 'sTxtVar' as it is on the panel
  4090. "DEMO0008". If they are still the same, then that is considered to be an error
  4091. situation.
  4092.  
  4093. Note that the variable 'sTxtVar' was defined to PDS as a 'Global' variable
  4094. before the variable was defined and initialized. This is acceptable as the PD
  4095. system doesn't search the REXX variable pool for 'Global' variables until it
  4096. becomes necessary to call the 'DVP'.
  4097.  
  4098.  
  4099.   3.14 Dynamically setting Field colors with rxPDSetFldColors                 
  4100.  
  4101.  
  4102.       3.13 Retrieving predefined variable values with rxPDVDefVarRetri Page  71
  4103.  
  4104.  
  4105.  
  4106.  
  4107.                            Panel Display System (PDS)                           
  4108.  
  4109.  
  4110. An rxPD application can dynamically set the foreground and background colors for
  4111. any specific Input or Output field on a specific panel.
  4112.  
  4113. This allows a PDS application to draw attention to a specific field by altering
  4114. the foreground and/or background colors in order to emphasize the data in the
  4115. field.
  4116.  
  4117. The colors which can be specified are the same as those which can be defined
  4118. within the PDL library and specified on the rxPDInit call.
  4119.  
  4120. The format for rxPDSetFldColors is:
  4121.  
  4122.     rc   = rxPDSetFldColors(bid,pnlname,fldname,fcolor,bcolor)
  4123.  
  4124.     rc     - Return code should be 0.
  4125.     bid    - The handle to an instance of the rxPD system.
  4126.     pnlname - The name of a panel.
  4127.     fldname - The name of a field within the panel.
  4128.     fcolor - The optional new foreground color for the field.
  4129.     bcolor - The optional new background color for the field.
  4130.  
  4131. If neither the foreground nor the background color is specified, PDS will swap
  4132. the field's current foreground and background colors resulting in an inverse
  4133. video effect.
  4134.  
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.  
  4155.  
  4156.           3.14 Dynamically setting Field colors with rxPDSetFldColors  Page  72
  4157.  
  4158.  
  4159.  
  4160.  
  4161.                            Panel Display System (PDS)                           
  4162.  
  4163.   3.15 Dynamically setting Panel colors with rxPDSetPnlColors                 
  4164.  
  4165.  
  4166. A PDSAPI application can dynamically set the foreground and background colors
  4167. for all Input, Output or Text fields on a specific panel.
  4168.  
  4169. This allows a PDS application to highlight the fields, of a specific type, on a
  4170. panel by modifying the foreground and/or background colors of that type of
  4171. field(s).
  4172.  
  4173. The colors which can be specified are the same as those which can be defined
  4174. within the PDL library and specified on the rxPDInit call.
  4175.  
  4176. The format for rxPDSetPnlColors is:
  4177.  
  4178.     rc   = rxPDSetPnlColors(bid,pnlname,icolor,ocolor,tcolor,bcolor)
  4179.  
  4180.     rc     - Return code should be 0.
  4181.     bid    - The handle to an instance of the rxPD system.
  4182.     pnlname - The name of a panel.
  4183.     icolor - The optional new foreground color for all 'INPUT' fields.
  4184.     ocolor - The optional new foreground color for all 'OUTPUT' fields.
  4185.     tcolor - The optional new foreground color for all 'TEXT' fields.
  4186.     bcolor - The optional new background color for all matching fields.
  4187.  
  4188. One or more of the field types can be specified on one call to rxPDSetPnlColors.
  4189.  
  4190. The background color field applies to all field types specified on the call.
  4191.  
  4192. Example:
  4193.  
  4194.     rc = rxPDSetPnlColors(bid, "PANEL001", NULL, "WHITE", "WHITE", "BLACK");
  4195.  
  4196. In the above example all 'OUTPUT' and 'TEXT' fields would be changed to 'WHITE'
  4197. on 'BLACK'. Neither the foreground nor the background colors for any 'INPUT'
  4198. fields would be changed.
  4199.  
  4200. Example:
  4201.  
  4202.     rc = rxPDSetPnlColors(bid, "PANEL001", "REDHI", NULL, "REDHI", NULL);
  4203.  
  4204. In the above example all 'INPUT' and 'TEXT' fields would have their foreground
  4205. colors changed to 'REDHI'. Their background colors would not change.
  4206.  
  4207.  
  4208.  
  4209.  
  4210.           3.15 Dynamically setting Panel colors with rxPDSetPnlColors  Page  73
  4211.  
  4212.  
  4213.  
  4214.  
  4215.                            Panel Display System (PDS)                           
  4216.  
  4217. ╔══════════════════════════════════════════════════════════════════════════════╗
  4218. ║ APPENDIX A - REXX AID/XID Keys and other 'Z' Values                          ║
  4219. ╚══════════════════════════════════════════════════════════════════════════════╝
  4220.  
  4221. This appendix lists the "Z" values used by rxPD routines and the
  4222. panels' REXX Data Verification Procedures.
  4223.  
  4224. It is not recommended that the following REXX statements be used by
  4225. any REXX script, instead a REXX procedure should use the rxPDZVarDefine
  4226. routine to define selected values as variables in the REXX variable
  4227. pool as needed.
  4228.  
  4229. /* The following define the REXX AID/XID keys. */
  4230.  
  4231.          ZBACKSPC             =    "00 00 08 0E"
  4232.          ZBACKSPC_S           =    "00 01 08 0E"
  4233.          ZBACKSPC_A           =    "01 02 00 0E"
  4234.          ZBACKSPC_C           =    "00 04 7F 0E"
  4235.          ZESC                 =    "00 00 1B 01"
  4236.          ZESC_S               =    "00 01 1B 01"
  4237.          ZESC_A               =    "00 00 00 00"
  4238.          ZESC_C               =    "00 00 00 00"
  4239.          ZENTER               =    "00 00 0D 1C"
  4240.          ZENTER_S             =    "00 01 0D 1C"
  4241.          ZENTER_A             =    "01 02 00 1C"
  4242.          ZENTER_C             =    "00 04 0A 1C"
  4243.          ZENTER_KPAD          =    "00 00 0D E0"
  4244.          ZENTER_KPAD_S        =    "00 01 0D E0"
  4245.          ZENTER_KPAD_A        =    "01 02 00 A6"
  4246.          ZENTER_KPAD_C        =    "00 04 0A E0"
  4247.          ZTAB                 =    "00 00 09 0F"
  4248.          ZTAB_S               =    "01 01 00 0F"
  4249.          ZTAB_A               =    "01 02 00 A5"
  4250.          ZTAB_C               =    "01 04 00 94"
  4251.          ZHOME                =    "01 00 E0 47"
  4252.          ZHOME_S              =    "01 01 E0 47"
  4253.          ZHOME_A              =    "00 00 00 00"
  4254.          ZHOME_C              =    "01 04 E0 77"
  4255.          ZHOME_KPAD           =    "01 00 00 47"
  4256.          ZHOME_KPAD_S         =    "00 01 37 47"
  4257.          ZHOME_KPAD_A         =    "00 00 07 00"
  4258.          ZHOME_KPAD_C         =    "01 04 00 77"
  4259.          ZEND                 =    "01 00 E0 4F"
  4260.          ZEND_S               =    "01 01 E0 4F"
  4261.          ZEND_A               =    "01 02 00 9F"
  4262.          ZEND_C               =    "01 04 E0 75"
  4263.  
  4264.               APPENDIX A - REXX AID/XID Keys and other 'Z' Values      Page  74
  4265.  
  4266.  
  4267.  
  4268.  
  4269.                            Panel Display System (PDS)                           
  4270.  
  4271.          ZEND_KPAD            =    "01 00 00 4F"
  4272.          ZEND_KPAD_S          =    "00 01 31 4F"
  4273.          ZEND_KPAD_A          =    "00 00 01 00"
  4274.          ZEND_KPAD_C          =    "01 04 00 75"
  4275.          ZINSERT              =    "01 00 E0 52"
  4276.          ZINSERT_S            =    "01 01 E0 52"
  4277.          ZINSERT_A            =    "01 02 00 A2"
  4278.          ZINSERT_C            =    "01 04 E0 92"
  4279.          ZINSERT_KPAD         =    "01 00 00 52"
  4280.          ZINSERT_KPAD_S       =    "00 01 30 52"
  4281.          ZINSERT_KPAD_A       =    "00 00 00 00"
  4282.          ZINSERT_KPAD_C       =    "01 04 00 92"
  4283.          ZDELETE              =    "01 00 E0 53"
  4284.          ZDELETE_S            =    "01 01 E0 53"
  4285.          ZDELETE_A            =    "01 02 00 A3"
  4286.          ZDELETE_C            =    "01 04 E0 93"
  4287.          ZDELETE_KPAD         =    "01 00 00 53"
  4288.          ZDELETE_KPAD_S       =    "00 01 2E 53"
  4289.          ZDELETE_KPAD_A       =    "00 00 00 00"
  4290.          ZDELETE_KPAD_C       =    "01 04 00 93"
  4291.          ZF1                  =    "01 00 00 3B"
  4292.          ZF1_S                =    "01 01 00 54"
  4293.          ZF1_A                =    "01 02 00 68"
  4294.          ZF1_C                =    "01 04 00 5E"
  4295.          ZF2                  =    "01 00 00 3C"
  4296.          ZF2_S                =    "01 01 00 55"
  4297.          ZF2_A                =    "01 02 00 69"
  4298.          ZF2_C                =    "01 04 00 5F"
  4299.          ZF3                  =    "01 00 00 3D"
  4300.          ZF3_S                =    "01 01 00 56"
  4301.          ZF3_A                =    "01 02 00 6A"
  4302.          ZF3_C                =    "01 04 00 60"
  4303.          ZF4                  =    "01 00 00 3E"
  4304.          ZF4_S                =    "01 01 00 57"
  4305.          ZF4_A                =    "01 02 00 6B"
  4306.          ZF4_C                =    "01 04 00 61"
  4307.          ZF5                  =    "01 00 00 3F"
  4308.          ZF5_S                =    "01 01 00 58"
  4309.          ZF5_A                =    "01 02 00 6C"
  4310.          ZF5_C                =    "01 04 00 62"
  4311.          ZF6                  =    "01 00 00 40"
  4312.          ZF6_S                =    "01 01 00 59"
  4313.          ZF6_A                =    "01 02 00 6D"
  4314.          ZF6_C                =    "01 04 00 63"
  4315.          ZF7                  =    "01 00 00 41"
  4316.          ZF7_S                =    "01 01 00 5A"
  4317.  
  4318.               APPENDIX A - REXX AID/XID Keys and other 'Z' Values      Page  75
  4319.  
  4320.  
  4321.  
  4322.  
  4323.                            Panel Display System (PDS)                           
  4324.  
  4325.          ZF7_A                =    "01 02 00 6E"
  4326.          ZF7_C                =    "01 04 00 64"
  4327.          ZF8                  =    "01 00 00 42"
  4328.          ZF8_S                =    "01 01 00 5B"
  4329.          ZF8_A                =    "01 02 00 6F"
  4330.          ZF8_C                =    "01 04 00 65"
  4331.          ZF9                  =    "01 00 00 43"
  4332.          ZF9_S                =    "01 01 00 5C"
  4333.          ZF9_A                =    "01 02 00 70"
  4334.          ZF9_C                =    "01 04 00 66"
  4335.          ZF10                 =    "01 00 00 44"
  4336.          ZF10_S               =    "01 01 00 5D"
  4337.          ZF10_A               =    "01 02 00 71"
  4338.          ZF10_C               =    "01 04 00 67"
  4339.          ZF11                 =    "01 00 00 85"
  4340.          ZF11_S               =    "01 01 00 87"
  4341.          ZF11_A               =    "01 02 00 8B"
  4342.          ZF11_C               =    "01 04 00 89"
  4343.          ZF12                 =    "01 00 00 86"
  4344.          ZF12_S               =    "01 01 00 88"
  4345.          ZF12_A               =    "01 02 00 8C"
  4346.          ZF12_C               =    "01 04 00 8A"
  4347.          ZPGUP                =    "01 00 E0 49"
  4348.          ZPGUP_S              =    "01 01 E0 49"
  4349.          ZPGUP_A              =    "01 02 00 99"
  4350.          ZPGUP_C              =    "01 04 E0 84"
  4351.          ZPGUP_KPAD           =    "01 00 00 49"
  4352.          ZPGUP_KPAD_S         =    "00 01 39 49"
  4353.          ZPGUP_KPAD_A         =    "00 00 09 00"
  4354.          ZPGUP_KPAD_C         =    "01 04 00 84"
  4355.          ZPGDW                =    "01 00 E0 51"
  4356.          ZPGDW_S              =    "01 01 E0 51"
  4357.          ZPGDW_A              =    "01 02 00 A1"
  4358.          ZPGDW_C              =    "01 04 E0 76"
  4359.          ZPGDW_KPAD           =    "01 00 00 51"
  4360.          ZPGDW_KPAD_S         =    "00 01 33 51"
  4361.          ZPGDW_KPAD_A         =    "00 00 03 00"
  4362.          ZPGDW_KPAD_C         =    "01 04 00 76"
  4363.          ZARRWUP              =    "01 00 E0 48"
  4364.          ZARRWUP_S            =    "01 01 E0 48"
  4365.          ZARRWUP_A            =    "01 02 00 98"
  4366.          ZARRWUP_C            =    "01 04 E0 8D"
  4367.          ZARRWUP_KPAD         =    "01 00 00 48"
  4368.          ZARRWUP_KPAD_S       =    "00 01 38 48"
  4369.          ZARRWUP_KPAD_A       =    "00 00 08 00"
  4370.          ZARRWUP_KPAD_C       =    "01 04 00 8D"
  4371.  
  4372.               APPENDIX A - REXX AID/XID Keys and other 'Z' Values      Page  76
  4373.  
  4374.  
  4375.  
  4376.  
  4377.                            Panel Display System (PDS)                           
  4378.  
  4379.          ZARRWLEFT            =    "01 00 E0 4B"
  4380.          ZARRWLEFT_S          =    "01 01 E0 4B"
  4381.          ZARRWLEFT_A          =    "01 02 00 9B"
  4382.          ZARRWLEFT_C          =    "01 04 E0 73"
  4383.          ZARRWLEFT_KPAD       =    "01 00 00 4B"
  4384.          ZARRWLEFT_KPAD_S     =    "00 01 34 4B"
  4385.          ZARRWLEFT_KPAD_A     =    "00 00 04 00"
  4386.          ZARRWLEFT_KPAD_C     =    "01 04 00 73"
  4387.          ZARRWRIGHT           =    "01 00 E0 4D"
  4388.          ZARRWRIGHT_S         =    "01 01 E0 4D"
  4389.          ZARRWRIGHT_A         =    "01 02 00 9D"
  4390.          ZARRWRIGHT_C         =    "01 04 E0 74"
  4391.          ZARRWRIGHT_KPAD      =    "01 00 00 4D"
  4392.          ZARRWRIGHT_KPAD_S    =    "00 01 36 4D"
  4393.          ZARRWRIGHT_KPAD_A    =    "00 00 06 00"
  4394.          ZARRWRIGHT_KPAD_C    =    "01 04 00 74"
  4395.          ZARRWDOWN            =    "01 00 E0 50"
  4396.          ZARRWDOWN_S          =    "01 01 E0 50"
  4397.          ZARRWDOWN_A          =    "01 02 00 A0"
  4398.          ZARRWDOWN_C          =    "01 04 E0 91"
  4399.          ZARRWDOWN_KPAD       =    "01 00 00 50"
  4400.          ZARRWDOWN_KPAD_S     =    "00 01 32 50"
  4401.          ZARRWDOWN_KPAD_A     =    "00 00 02 00"
  4402.          ZARRWDOWN_KPAD_C     =    "01 04 00 91"
  4403.          Z_A                  =    "00 00 61 1E"
  4404.          Z_A_S                =    "00 01 41 1E"
  4405.          Z_A_A                =    "01 02 00 1E"
  4406.          Z_A_C                =    "00 04 01 1E"
  4407.          Z_B                  =    "00 00 62 30"
  4408.          Z_B_S                =    "00 01 42 30"
  4409.          Z_B_A                =    "01 02 00 30"
  4410.          Z_B_C                =    "00 04 02 30"
  4411.          Z_C                  =    "00 00 63 2E"
  4412.          Z_C_S                =    "00 01 43 2E"
  4413.          Z_C_A                =    "01 02 00 2E"
  4414.          Z_C_C                =    "00 00 00 00"
  4415.          Z_D                  =    "00 00 64 20"
  4416.          Z_D_S                =    "00 01 44 20"
  4417.          Z_D_A                =    "01 02 00 20"
  4418.          Z_D_C                =    "00 04 04 20"
  4419.          Z_E                  =    "00 00 65 12"
  4420.          Z_E_S                =    "00 01 45 12"
  4421.          Z_E_A                =    "01 02 00 12"
  4422.          Z_E_C                =    "00 04 05 12"
  4423.          Z_F                  =    "00 00 66 21"
  4424.          Z_F_S                =    "00 01 46 21"
  4425.  
  4426.               APPENDIX A - REXX AID/XID Keys and other 'Z' Values      Page  77
  4427.  
  4428.  
  4429.  
  4430.  
  4431.                            Panel Display System (PDS)                           
  4432.  
  4433.          Z_F_A                =    "01 02 00 21"
  4434.          Z_F_C                =    "00 04 06 21"
  4435.          Z_G                  =    "00 00 67 22"
  4436.          Z_G_S                =    "00 01 47 22"
  4437.          Z_G_A                =    "01 02 00 22"
  4438.          Z_G_C                =    "00 04 07 22"
  4439.          Z_H                  =    "00 00 68 23"
  4440.          Z_H_S                =    "00 01 48 23"
  4441.          Z_H_A                =    "01 02 00 23"
  4442.          Z_H_C                =    "00 04 08 23"
  4443.          Z_I                  =    "00 00 69 17"
  4444.          Z_I_S                =    "00 01 49 17"
  4445.          Z_I_A                =    "01 02 00 17"
  4446.          Z_I_C                =    "00 04 09 17"
  4447.          Z_J                  =    "00 00 6A 24"
  4448.          Z_J_S                =    "00 01 4A 24"
  4449.          Z_J_A                =    "01 02 00 24"
  4450.          Z_J_C                =    "00 04 0A 24"
  4451.          Z_K                  =    "00 00 6B 25"
  4452.          Z_K_S                =    "00 01 4B 25"
  4453.          Z_K_A                =    "01 02 00 25"
  4454.          Z_K_C                =    "00 04 0B 25"
  4455.          Z_L                  =    "00 00 6C 26"
  4456.          Z_L_S                =    "00 01 4C 26"
  4457.          Z_L_A                =    "01 02 00 26"
  4458.          Z_L_C                =    "00 04 0C 26"
  4459.          Z_M                  =    "00 00 6D 32"
  4460.          Z_M_S                =    "00 01 4D 32"
  4461.          Z_M_A                =    "01 02 00 32"
  4462.          Z_M_C                =    "00 04 0D 32"
  4463.          Z_N                  =    "00 00 6E 31"
  4464.          Z_N_S                =    "00 01 4E 31"
  4465.          Z_N_A                =    "01 02 00 31"
  4466.          Z_N_C                =    "00 04 0E 31"
  4467.          Z_O                  =    "00 00 6F 18"
  4468.          Z_O_S                =    "00 01 4F 18"
  4469.          Z_O_A                =    "01 02 00 18"
  4470.          Z_O_C                =    "00 04 0F 18"
  4471.          Z_P                  =    "00 00 70 19"
  4472.          Z_P_S                =    "00 01 50 19"
  4473.          Z_P_A                =    "01 02 00 19"
  4474.          Z_P_C                =    "00 00 00 00"
  4475.          Z_Q                  =    "00 00 71 10"
  4476.          Z_Q_S                =    "00 01 51 10"
  4477.          Z_Q_A                =    "01 02 00 10"
  4478.          Z_Q_C                =    "00 04 11 10"
  4479.  
  4480.               APPENDIX A - REXX AID/XID Keys and other 'Z' Values      Page  78
  4481.  
  4482.  
  4483.  
  4484.  
  4485.                            Panel Display System (PDS)                           
  4486.  
  4487.          Z_R                  =    "00 00 72 13"
  4488.          Z_R_S                =    "00 01 52 13"
  4489.          Z_R_A                =    "01 02 00 13"
  4490.          Z_R_C                =    "00 04 12 13"
  4491.          Z_S                  =    "00 00 73 1F"
  4492.          Z_S_S                =    "00 01 53 1F"
  4493.          Z_S_A                =    "01 02 00 1F"
  4494.          Z_S_C                =    "00 00 00 00"
  4495.          Z_T                  =    "00 00 74 14"
  4496.          Z_T_S                =    "00 01 54 14"
  4497.          Z_T_A                =    "01 02 00 14"
  4498.          Z_T_C                =    "00 04 14 14"
  4499.          Z_U                  =    "00 00 75 16"
  4500.          Z_U_S                =    "00 01 55 16"
  4501.          Z_U_A                =    "01 02 00 16"
  4502.          Z_U_C                =    "00 04 15 16"
  4503.          Z_V                  =    "00 00 76 2F"
  4504.          Z_V_S                =    "00 01 56 2F"
  4505.          Z_V_A                =    "01 02 00 2F"
  4506.          Z_V_C                =    "00 04 16 2F"
  4507.          Z_W                  =    "00 00 77 11"
  4508.          Z_W_S                =    "00 01 57 11"
  4509.          Z_W_A                =    "01 02 00 11"
  4510.          Z_W_C                =    "00 04 17 11"
  4511.          Z_X                  =    "00 00 78 2D"
  4512.          Z_X_S                =    "00 01 58 2D"
  4513.          Z_X_A                =    "01 02 00 2D"
  4514.          Z_X_C                =    "00 04 18 2D"
  4515.          Z_Y                  =    "00 00 79 15"
  4516.          Z_Y_S                =    "00 01 59 15"
  4517.          Z_Y_A                =    "01 02 00 15"
  4518.          Z_Y_C                =    "00 04 19 15"
  4519.          Z_Z                  =    "00 00 7A 2C"
  4520.          Z_Z_S                =    "00 01 5A 2C"
  4521.          Z_Z_A                =    "01 02 00 2C"
  4522.          Z_Z_C                =    "00 04 1A 2C"
  4523.          Z_1                  =    "00 00 31 02"
  4524.          Z_1_S                =    "00 01 21 02"
  4525.          Z_1_A                =    "01 02 00 78"
  4526.          Z_1_C                =    "00 00 00 00"
  4527.          Z_2                  =    "00 00 32 03"
  4528.          Z_2_S                =    "00 01 40 03"
  4529.          Z_2_A                =    "01 02 00 79"
  4530.          Z_2_C                =    "01 04 00 03"
  4531.          Z_3                  =    "00 00 33 04"
  4532.          Z_3_S                =    "00 01 23 04"
  4533.  
  4534.               APPENDIX A - REXX AID/XID Keys and other 'Z' Values      Page  79
  4535.  
  4536.  
  4537.  
  4538.  
  4539.                            Panel Display System (PDS)                           
  4540.  
  4541.          Z_3_A                =    "01 02 00 7A"
  4542.          Z_3_C                =    "00 00 00 00"
  4543.          Z_4                  =    "00 00 34 05"
  4544.          Z_4_S                =    "00 01 24 05"
  4545.          Z_4_A                =    "01 02 00 7B"
  4546.          Z_4_C                =    "00 00 00 00"
  4547.          Z_5                  =    "00 00 35 06"
  4548.          Z_5_S                =    "00 01 25 06"
  4549.          Z_5_A                =    "01 02 00 7C"
  4550.          Z_5_C                =    "00 00 00 00"
  4551.          Z_6                  =    "00 00 36 07"
  4552.          Z_6_S                =    "00 01 5E 07"
  4553.          Z_6_A                =    "01 02 00 7D"
  4554.          Z_6_C                =    "00 04 1E 07"
  4555.          Z_7                  =    "00 00 37 08"
  4556.          Z_7_S                =    "00 01 26 08"
  4557.          Z_7_A                =    "01 02 00 7E"
  4558.          Z_7_C                =    "00 00 00 00"
  4559.          Z_8                  =    "00 00 38 09"
  4560.          Z_8_S                =    "00 01 2A 09"
  4561.          Z_8_A                =    "01 02 00 7F"
  4562.          Z_8_C                =    "00 00 00 00"
  4563.          Z_9                  =    "00 00 39 0A"
  4564.          Z_9_S                =    "00 01 28 0A"
  4565.          Z_9_A                =    "01 02 00 80"
  4566.          Z_9_C                =    "00 00 00 00"
  4567.          Z_0                  =    "00 00 30 0B"
  4568.          Z_0_S                =    "00 01 29 0B"
  4569.          Z_0_A                =    "01 02 00 81"
  4570.          Z_0_C                =    "00 00 00 00"
  4571.          ZSPACE               =    "00 00 20 39"
  4572.          ZSPACE_S             =    "00 01 20 39"
  4573.          ZSPACE_A             =    "00 02 20 39"
  4574.          ZSPACE_C             =    "00 04 20 39"
  4575.  
  4576. /* The following define the expected non-AID/XID key return codes that */
  4577. /* can be returned by a panel's REXX Data Verification Procedure. Any */
  4578. /* AID or XID key or other integer is returned to the routine which */
  4579. /* is displaying the panel. */
  4580.  
  4581.         ZVERIFYPROC_RC_RETURN   = 0 /* Return the current AID key */
  4582.         ZVERIFYPROC_RC_NORETURN = 4 /* Don't return to panel displayer */
  4583.  
  4584. /* The following define the REXX variable types for rxPDVarDefine. */
  4585.                               =
  4586.         ZVTYPE_ZSTRING        =    1
  4587.  
  4588.               APPENDIX A - REXX AID/XID Keys and other 'Z' Values      Page  80
  4589.  
  4590.  
  4591.  
  4592.  
  4593.                            Panel Display System (PDS)                           
  4594.  
  4595.         ZVTYPE_LONG           =    2
  4596.         ZVTYPE_DOUBLE         =    4
  4597.         ZVTYPE_RIGHTADJUST    =    256
  4598.         ZVTYPE_LZEROFILL      =    512
  4599.         ZVTYPE_GLOBAL         =    1024
  4600.         ZVTYPE_STATIC         =    2048
  4601.  
  4602. /* The following define the alarm types for rxPDSetMsgText */
  4603.  
  4604.         ZALARM_NOERROR        =    0
  4605.         ZALARM_WARNING        =    1
  4606.         ZALARM_ERROR          =    2
  4607.         ZALARM_SEVERE         =    3
  4608.  
  4609. /* The following define the boolean tests for rxPDQueryMDT */
  4610.  
  4611.         ZFALSE                =    0
  4612.         ZTRUE                 =    1
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.  
  4627.  
  4628.  
  4629.  
  4630.  
  4631.  
  4632.  
  4633.  
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639.  
  4640.  
  4641.  
  4642.               APPENDIX A - REXX AID/XID Keys and other 'Z' Values      Page  81
  4643.  
  4644.  
  4645.  
  4646.  
  4647.                            Panel Display System (PDS)                           
  4648.  
  4649. ╔══════════════════════════════════════════════════════════════════════════════╗
  4650. ║ APPENDIX B - Color values for PDS fields and background                      ║
  4651. ╚══════════════════════════════════════════════════════════════════════════════╝
  4652.  
  4653.  
  4654. The following is a list of the 16 colors supported by PDS and the names required
  4655. by the PDL ")COLORS" statement and the rxPD "rxPDInit" routine:
  4656.  
  4657.    Color                 - Name
  4658.  
  4659.    Black                 - BLACK
  4660.    Dark Blue             - BLUE
  4661.    Dark Green            - GREEN
  4662.    Light Blue            - LBLUE
  4663.    Dark Red              - RED
  4664.    Purple                - PURPLE
  4665.    Yellow                - YELLOW
  4666.    White                 - WHITE
  4667.  
  4668.    Grey                  - GRAY
  4669.    High Intensity Blue   - BLUEHI
  4670.    High Intensity Green  - GREENHI
  4671.    High Intensity Blue   - LBLUEHI
  4672.    High Intensity Red    - REDHI
  4673.    High Intensity Purple - PURPLEHI
  4674.    High Intensity Yellow - YELLOWHI
  4675.    High Intensity White  - WHITEHI
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.  
  4694.  
  4695.  
  4696.             APPENDIX B - Color values for PDS fields and background    Page  82
  4697.  
  4698.  
  4699.  
  4700.  
  4701.                            Panel Display System (PDS)                           
  4702.  
  4703. ╔══════════════════════════════════════════════════════════════════════════════╗
  4704. ║                                    Index                                     ║
  4705. ╚══════════════════════════════════════════════════════════════════════════════╝
  4706. )AID -  14 , 17 , 18 , 23 , 24 , 25 , 36 
  4707. )BLANK -  3 , 18 , 23 , 24 , 25 , 26 , 28 , 39 , 43 , 47 
  4708. )COLORS -  5 , 6 , 23 , 24 , 25 , 30 , 37 , 38 , 58 , 63 , 82 
  4709. )END -  3 , 4 , 18 , 23 , 24 , 26 , 28 , 30 , 39 , 41 , 45 , 49 , 58 , 63 , 71 
  4710. )NODISPLAY -  39 , 40 , 49 , 58 , 63 , 71 
  4711. )NOWAIT -  39 , 40 , 49 , 58 , 63 , 71 
  4712. )NULL -  23 , 24 , 25 , 27 , 43 , 47 
  4713. )PANEL -  3 , 14 , 17 , 21 , 23 , 25 , 28 , 30 , 33 , 36 , 42 , 45 , 49 , 58 ,
  4714.           63 , 71 
  4715. )PROC -  17 , 18 , 23 , 24 , 25 , 28 , 30 , 39 , 63 , 71 
  4716. )PROCEND -  18 , 23 , 24 , 26 , 39 
  4717. )REM -  17 , 18 , 23 , 24 , 25 , 26 , 46 
  4718. )ROW -  23 , 24 , 25 , 27 , 28 , 37 , 38 , 40 , 41 , 43 , 44 , 45 , 46 , 47 ,
  4719.         58 , 63 
  4720. )VARS -  8 , 23 , 24 , 25 , 28 , 30 , 37 , 41 , 48 
  4721. )XID -  21 , 23 , 24 , 25 , 36 
  4722. AID= -  14 , 33 , 34 , 36 
  4723. ATTR= -  34 
  4724. BCKG= -  38 
  4725. CLS= -  33 
  4726. COLUMN -  22 , 23 , 25 , 26 , 27 , 42 , 43 , 44 , 45 
  4727. DVP -  11 , 14 , 15 , 16 , 18 , 19 , 20 , 24 , 39 , 56 , 62 , 63 , 64 , 69 ,
  4728.        70 , 71 
  4729. FLDS= -  3 , 4 , 18 , 25 , 26 , 28 , 30 , 39 , 40 , 41 , 44 , 45 , 46 , 58 , 63 
  4730. INPUT= -  6 , 38 
  4731. NAME= -  33 
  4732. OUTPUT= -  6 , 38 
  4733. ROW -  3 , 5 , 6 , 22 , 23 , 24 , 25 , 26 , 27 , 29 , 37 , 39 , 41 , 42 , 43 ,
  4734.        44 , 45 , 46 , 47 , 48 , 49 , 50 , 57 , 58 , 59 , 60 , 61 , 63 , 71 
  4735. TEXT= -  5 , 38 
  4736. XID= -  21 , 34 , 36 
  4737. ZALARM_ERROR -  17 , 26 , 28 , 30 , 81 
  4738. ZALARM_NOERROR -  81 
  4739. ZALARM_SEVERE -  18 , 81 
  4740. ZALARM_WARNING -  81 
  4741. ZBid -  16 , 70 
  4742. ZFname -  16 
  4743. ZFndx -  16 
  4744. ZKey -  16 , 17 , 18 , 20 , 63 , 71 
  4745. ZPid -  16 , 70 
  4746. ZPname -  16 
  4747. ZVERIFYPROC_RC_NORETURN -  17 , 19 , 26 , 28 , 30 , 80 
  4748. ZVERIFYPROC_RC_RETURN -  17 , 19 , 20 , 26 , 28 , 30 , 80 
  4749.  
  4750.                                      Index                             Page  83
  4751.  
  4752.  
  4753.  
  4754.  
  4755.                            Panel Display System (PDS)                           
  4756.  
  4757. ZVTYPE_DOUBLE -  11 , 64 , 81 
  4758. ZVTYPE_GLOBAL -  12 , 64 , 69 , 70 , 71 , 81 
  4759. ZVTYPE_LONG -  11 , 64 , 81 
  4760. ZVTYPE_LZEROFILL -  10 , 12 , 64 , 81 
  4761. ZVTYPE_RIGHTADJUST -  12 , 64 , 81 
  4762. ZVTYPE_STATIC -  13 , 81 
  4763. ZVTYPE_ZSTRING -  10 , 64 , 80 
  4764. aid -  9 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 25 , 28 , 30 , 32 , 33 , 34 ,
  4765.        36 , 40 , 41 , 55 , 62 , 63 , 64 , 80 
  4766. bid -  53 , 54 , 55 , 56 , 57 , 62 , 64 , 65 , 66 , 68 , 70 , 72 , 73 
  4767. field -  4 , 5 , 6 , 7 , 8 , 9 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 19 , 21 ,
  4768.          23 , 24 , 25 , 26 , 27 , 29 , 34 , 35 , 37 , 40 , 42 , 43 , 44 , 45 ,
  4769.          46 , 47 , 48 , 50 , 53 , 55 , 57 , 62 , 63 , 66 , 67 , 68 , 69 , 70 ,
  4770.          71 , 72 , 73 
  4771. panel -  1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 11 , 13 , 14 , 15 , 16 , 18 , 19 ,
  4772.          20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 31 , 32 , 33 , 34 ,
  4773.          37 , 38 , 39 , 40 , 41 , 42 , 43 , 44 , 45 , 46 , 47 , 48 , 49 , 50 ,
  4774.          53 , 55 , 56 , 57 , 58 , 61 , 62 , 63 , 66 , 67 , 68 , 69 , 70 , 71 ,
  4775.          73 , 80 
  4776. pid -  70 
  4777. procedure -  9 , 11 , 14 , 15 , 17 , 18 , 23 , 24 , 25 , 26 , 39 , 56 , 62 ,
  4778.              63 , 69 , 71 , 74 
  4779. routine -  9 , 14 , 16 , 40 , 51 , 52 , 53 , 55 , 62 , 64 , 66 , 67 , 74 , 80 
  4780. rxPDDisplay -  16 , 55 , 57 , 62 
  4781. rxPDInit -  52 , 53 , 54 , 72 , 73 , 82 
  4782. rxPDLoadFuncs -  51 , 52 
  4783. rxPDQueryMDT -  66 , 67 , 68 , 69 , 81 
  4784. rxPDRestoreScreen -  16 , 56 
  4785. rxPDSaveScreen -  56 
  4786. rxPDSetCursorFld -  17 , 26 , 28 , 30 , 62 , 63 
  4787. rxPDSetFldColors -  71 , 72 
  4788. rxPDSetMsgText -  56 , 57 , 58 , 59 , 60 , 61 , 81 
  4789. rxPDSetPnlColors -  73 
  4790. rxPDTerm -  54 
  4791. rxPDVDefVarRetrieve -  12 , 69 , 70 , 71 
  4792. rxPDVarDefine -  10 , 53 , 64 , 65 , 71 
  4793. rxPDVarDelete -  65 
  4794. rxPDZVarDefine -  9 , 17 , 18 , 26 , 28 , 30 , 55 , 63 , 64 , 71 , 74 
  4795. svid -  17 , 18 , 56 
  4796. verification -  11 , 12 , 14 , 15 , 17 , 18 , 19 , 21 , 23 , 24 , 25 , 26 , 39 ,
  4797.                 56 , 62 , 63 , 69 , 71 , 74 , 80 
  4798. xid -  9 , 15 , 21 , 25 , 32 , 34 , 36 , 41 , 55 , 61 , 62 , 80 
  4799.  
  4800.  
  4801.  
  4802.  
  4803.  
  4804.                                      Index                             Page  84
  4805.  
  4806.  
  4807.