SFORMAT
ANSI
The SFORMAT instruction adjusts the physical length of a character string variable. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
dest
Required. A previously defined Character String Variable whose Physical Length is modified.
sep
Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.
size
Required. A previously defined Numeric Variable, Expression, or decimal constant indicating the {dest} variable’s new Physical Length.
Flags Affected: OVER
Note the following:
{dest} is the character string variable adjusted.
The second operand specifies the new Physical Length of the adjusted variable.
{dest} is blank filled and set to a Null String.
If the specified length is zero, negative or greater than the originally compiled Physical Length of the variable, the OVER Condition Flag is set and the variable remains unchanged.
Enhanced ARRAY processing is supported for the SFORMAT instruction.
See Also: Example Code, NFORMAT, Character String Instructions
![]() |