Previous Topic: Variable Level Justification

Next Topic: Process with Light Pens/Cursor Select

Input Padding and Justification

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 as described in the previous section on 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 processed using the following rules:

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... had been modified, it would have been padded to the right with zeros.

The variable values are translated to uppercase because the default for input fields is CAPS=YES.