Fields to which the PAD and JUST operands of the #FLD statement are applied can be defined as input fields. If an input field is primed with data during the display process, the alignment of data within that field when displayed is similar to output padding and justification, except that JUST=CENTER is treated as JUST=LEFT.
When Panel Services processes input from the screen, input fields defined using the PAD and JUST operands are specially processed using the following rules:
#NOTE This sample panel definition gives examples of the #NOTE use of input padding and justification. #FLD # TYPE=INPUT #FLD $ TYPE=INPUT JUST=RIGHT #FLD @ TYPE=INPUT PAD=< JUST=LEFT #FLD ? TYPE=INPUT PAD=> JUST=RIGHT #FLD / TYPE=INPUT PAD=0 JUST=LEFT #FLD } TYPE=INPUT PAD=1 JUST=RIGHT #VAR01 + $VAR02 + @VAR03 + ?VAR04 + /VAR05 + }VAR06 +
Assume the following variable assignment statements are executed by the NCL procedure before displaying the sample panel:
&VAR01 = Walt &VAR02 = Tom &VAR03 = Dick &VAR04 = Harry &VAR05 = John &VAR06 = Vicky
The sample panel is displayed as:
WALT TOM DICK<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>HARRY JOHN000000000000000000000000000000000000 11111111111111111111111111111111111VICKY
If control is passed back to the NCL procedure without any data entered into the input fields, the variables are set to the following values:
&VAR01 = WALT &VAR02 = TOM &VAR03 = DICK &VAR04 = HARRY &VAR05 = JOHN &VAR06 = VICKY
Note: If the line JOHN000... is modified, it is padded to the right with zeros. The variable values are translated to uppercase because the default for input fields is CAPS=YES.
| Copyright © 2008 CA. All rights reserved. |
|