12. Report-Writer Statements : Column and Block Statements : .Position Statement—Set Position and Width of Column Output
 
Share this page                  
.Position Statement—Set Position and Width of Column Output
The .position statement sets a default output position and optional width associated with a column.
This statement has the following format:
.position | .pos columnname {, columnname} (position [,width])
    {, columnname{, columnname} (position [, width])}
The parameters for the .position statement are as follows:
columnname
Name of a column in the report. You can specify the column name as a delimited identifier by enclosing it in double quotes ("), if you have previously specified the .delimid statement.
position
Numeric location on the output line where the default column position should be. This value must be less than the maximum line size (as set by the .pagewidth statement in the report specification or by the ‑l flag on the report command line) and greater than or equal to zero (0).
width
The default width which is the total number of characters in the column to be used when calculating the positioning for .center and .right statements. If not specified, Report-Writer determines this numeric by looking at the default format for the column.
The columnname, position, and width can be expressed as variables. The comma (,) and parentheses ( ) must be explicitly stated and cannot be part of the columnname, position, or width variable.
$columnvariable
Variable whose value is the name for a column in the report. Precede the variable with a dollar sign ($).
$positionvariable
Variable whose value is the numeric location on the output line where the default column position should be. This variable must evaluate to a position less than the maximum line size (as set by the .pagewidth statement in the report specification or by the ‑l flag on the report command line) and greater than or equal to zero (0).
$widthvariable
Variable whose value is the default width, which is the total number of characters in the column to be used when calculating the positioning for .center and .right statements. If not specified or evaluated, Report-Writer determines this value by looking at the default format for this column.