Command Reference 5-65
PAD
Purpose Pads data in a field.
Syntax PAD
direction
,
pad-field
,
pad-character
,
max-length
Process The PAD command pads data in
pad-field
, in the direction specified by
direction
,
with
pad-character
.
Max-length
indicates the field's length. For example, if the
data is seven characters and the length is ten, three characters are added to the
field.
Direction
can be one of the following:
Direction
Description
L Pad left
R Pad right
Pad-field
,
pad-character
, and
max-length
can be one of the following:
Pad-field, Pad-character,
and
Max-length
Description
INPUT Input Buffer
Logical Field Name
(TEMP1)
Temporary Buffer
Field
Logical Field Name (LU1) Lookup Buffer Field
Logical Field Name (PR1) Printer Buffer Field
Pad-field
only:
Logical Field Name
(Field1) [Index]
Array Buffer Field
Pad-character
and
max-
length
only:
Number
Number prefixed by a
number sign (#)
Pad-character
only:
String
ASCII string delimited
by double quotes.
Must be one
character long
Rule: If
max-length
is a buffer field, it must be numeric.
Example 1
This example inserts asterisks (*) to the left of the data in PRICEFIELD.
PAD L,PRICEFIELD,"*",LPRICE
Example 2
This example inserts blanks to the right of the data.
PAD R,LDESC," ",#2