IH
Places a text string in the active input buffer, to "null" an existing parameter, or to create new null parameters.
Syntax
IHtext
IHtext-reference;input-conversion;
IHtext-reference:output-conversion:
IH\
IH \
Syntax Elements
text is one or more characters to be placed in the active input buffer. A SYSTEM function can replace this parameter.
Do not use value marks or subvalue marks in text. Use of these can cause unpredictable results.
You can use a direct or indirect reference to a buffer or select register that contains the text you want to place in the active input buffer.
text-reference is a direct or indirect reference to a buffer or select register that contains the text you want to place in the active input buffer.
input-conversion is an English input conversion to be applied to text before placing it in the active input buffer.
output-conversion
is an English output conversion to be applied to
text before placing it in the active input buffer (see
Conversion Codes).
\ is a backslash. If the backslash immediately follows IH, the current parameter in the active input buffer is nulled.
If the backslash is preceded by one space, a new null parameter is created at the position pointed to by the buffer pointer.
If the backslash is in any other position following IH, it is treated as text and placed in the active input buffer along with any other text.
Operation
If a buffer reference is used instead of text, the reference must immediately follow the letters IH. Otherwise, it is loaded as text.
Leading and trailing blanks within text are ignored. Multiple blanks are treated as one blank.
Blanks are replaced with single attribute marks, thereby creating new, separate parameters to replace the current single parameter.
Use the IBH command if you want to insert text into the active input buffer as a single parameter with all blanks intact.
The IH command leaves the position of the buffer pointer unchanged.
Depending on the position of the buffer pointer, IH either replaces an existing parameter or adds a new parameter at the end of the buffer.
If the buffer pointer is at the beginning of an existing parameter, IH replaces the current parameter with text.
If the buffer pointer is in the middle of a parameter, IH concatenates the new parameter (without a leading attribute mark) to the part of the original parameter before the location of the buffer pointer, truncating that parameter from the pointer location onwards.
If the buffer pointer is at the end of the input buffer, IH creates one or more new parameters at the end of the input buffer. The buffer pointer remains in the same position and now points to the attribute mark preceding the first new parameter.
Creating Null Parameters
IH\ causes the current parameter to be "nulled" (that is, the characters between the attribute marks are deleted).
If the buffer pointer is in the middle of a parameter, IH\ removes the remaining characters, from that point to the end of the parameter.
If the buffer pointer is at the end of the buffer, IH\ creates a new null parameter.
IH \ creates a new null parameter at the position pointed to by the input buffer pointer. The backslash must immediately follow one space after the IH to create the new null parameter.
Example 1
Command |
PIB Before |
PIB After |
---|---|---|
|
|
|
Example 2
Command |
PIB Before |
PIB After |
---|---|---|
|
|
|
Example 3
File buffer 4 contains:
000 123-A
001 SMITH
002 7492
Command |
PIB Before |
PIB After |
---|---|---|
|
|
|
Example 4
Command |
PIB Before |
PIB After |
---|---|---|
|
|
|
Example 5
Command |
PIB Before |
PIB After |
---|---|---|
|
|
|
Example 6
Command |
PIB Before |
PIB After |
---|---|---|
IH\
|
ABCDE^FGHIJK^LMN
![]() |
ABCDE^FGH^LMN
![]() |
Example 7
Command | PIB Before | PIB After |
---|---|---|
IH \
|
ABCDE^FGHIJK^LMN
![]() |
ABCDE^FGH^^IJK^LMN
![]() |
Example 8
Command | PIB Before | PIB After |
---|---|---|
|
|
|
The last example copies the 3rd parameter back into the same location, replacing the blank with an attribute mark. In effect, this command accomplished a field extract on a parameter containing a blank separating the fields.