Previous Topic: Output Padding and Justification

Next Topic: Variable Level Justification

Field Level Justification

This is performed on an entire field as delimited by defined field characters. Field justification analyzes the entire field, strips trailing blanks, and pads and justifies the remaining data. The #FLD operands controlling field level justification are JUST and PAD.

The various ways data can be manipulated are best described by a series of examples. These examples show a mix of fields each defined with a different field character and each showing a different display format. Study the #FLD statements and observe the results achieved.

#NOTE This sample panel definition gives examples of the
#NOTE use of field level justification and padding.
#FLD#
#FLD$         JUST=RIGHT
#FLD@         JUST=LEFT PAD=<
#FLD?         JUST=RIGHT PAD=>
#FLD/         JUST=CENTER PAD=.
#&VAR01          +
$&VAR02          +
@&VAR03          +
?&VAR04          +
/&VAR05          +

Assume the following variable assignment statements are executed by the NCL procedure before displaying the sample panel:

&VAR01 = &STR Left justified null padding
&VAR02 = &STR Right justified null padding
&VAR03 = &STR Left justified with padding
&VAR04 = &STR Right justified with padding
&VAR05 = &STR Center justified with padding

The default values are JUST=LEFT and PAD=NULL, as shown by the first line in the following example, where field character # is used with no attributes other than the defaults. The sample panel is displayed as follows:

Left justified null padding
                              Right justified null padding
Left justified with padding<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Right justified with padding
..............Center justified with padding...............