S
Positions the active input buffer pointer to a specified parameter, or sets the buffer pointer to a specified column in the primary input buffer and selects that buffer as active.
Syntax
SparamNum
S(colNum)
Syntax Elements
paramNum The number of the parameter to where the buffer pointer is to be set.
paramNum can be a direct or indirect reference to a buffer or select register that contains the number of the parameter.
(colNum) Specifies the number of the column where the buffer pointer is to be set.
Operation
The S command positions the buffer pointer to a specified parameter or column.
Setting to a Parameter
SparamNum sets the buffer pointer in the active input buffer to the attribute mark prior to the parameter number specified by paramNum.
If the specified parameter number is past the current last parameter, the buffer pointer is positioned at the end of the buffer. To create parameters past the current end of the buffer, use the MV command.
Note
This behaviour can be changed with the PQN.ABS.S environment option.
If the specified parameter number is less than 2, the buffer pointer is placed at the beginning of the active input buffer.
Setting to a Column
S(colNum) sets the buffer pointer in the primary input buffer to column colNum (columns are numbered starting at 1).
Setting the buffer pointer to a particular column position selects the primary input buffer as the active buffer. The secondary input buffer is unchanged, but is accessible only with the MS command.
If the specified column number is past the current last parameter, the buffer pointer is positioned at the end of the primary input buffer.
If the specified column number is less than 2, the buffer pointer is placed at the beginning of the primary input buffer.
Example 1
Command |
PIB Before |
PIB After |
---|---|---|
|
|
|
Example 2
Command |
PIB Before |
PIB After |
---|---|---|
|
|
|
Example 3
File Buffer 3 contains:
000 123-A
001 JOHN DOE
002 13
003 2
Command |
PIB Before |
PIB After |
---|---|---|
|
|
|
Use the fourth PIB value (3), as a reference to an attribute in file buffer 3. Since attribute 3 contains the value 2, the pointer is set to the start of PIB attribute 2.