Copies a parameter from the active input buffer to the active output buffer.
A{char}
A{char}param
A{char}(start)
A{char}(,count)
A{char}(start,count)
char Specifies a character to surround the string being copied.
The char specification can be any non-numeric character except a left parenthesis (.
The surround character
option is especially useful for
If the destination is the secondary output buffer, the character char is ignored.
If char is a backslash (\), the value is concatenated with the previous parameter in the primary output buffer.
param An integer that specifies the parameter to be copied. Must be greater than 0.
start specifies the starting column in the primary input buffer where you want the copy to begin. The copy continues to the end of the parameter or until the number of characters specified by the count parameter have been copied.
count specifies the number of characters to be copied starting at the current position of the primary input buffer pointer or the position specified by start.
The copy terminates if an attribute mark or end of buffer is encountered before count characters have been copied.
The A command used by itself copies the parameter pointed to by the buffer pointer in the active input buffer to the active output buffer.
The A command that includes a parenthetical specification (that is, (start), (,count), or (start,count)) causes the primary input buffer to be selected.
If the stack is "off" (that is, the primary output buffer is active), the A command places the data in the output buffer as a separate parameter.
If the stack is "on" (that is, the secondary output buffer is active), the A command concatenates the value to the previous parameter in the output buffer. The move continues until an attribute mark is found.
The buffer pointers are positioned at the attribute mark terminating the copied parameter in the primary output buffer (stack "off") or at the end of the secondary output buffer (stack "on"). Subsequent A commands move the next parameters in order.
If the buffer pointer in the active input buffer is at the end of the buffer, the A command has no effect.
PIB Before the A Command | PIB After the A Command |
---|---|
DISPLAY^ADDRESS^3 ↑ |
DISPLAY^ADDRESS^3
↑ |
Note the position of the buffer pointer after you issue the A command.
Command | PIB Before | PIB After |
---|---|---|
A'2 |
EXHIB^1793^PRC ↑ |
EXHIB^1793^PRC ↑ |
POB Before | POB After | |
---|---|---|
LIST^ ↑ |
LIST '1793'^ ↑ |
Command | PIB Before | PIB After |
---|---|---|
A(8,6) |
ABC^DEFGHI^JKL ↑ |
ABC^DEFGHI^JKL ↑ |
SOB Before | SOB After | |
---|---|---|
G3<R/ABC/ ↑ |
G3<R/ABC/GHI ↑ |
The secondary output buffer is active (stack is "on" by a previous STON command). The characters in the 8th to the 10th position in the primary input buffer are copied to the secondary output buffer. The full 6 characters are not copied because the copy terminates at the attribute mark.
Command | PIB Before | PIB After |
---|---|---|
A\ |
ABC^DEF^GHI ↑ |
ABC^DEF^GHI ↑ |
POB Before | POB After | |
---|---|---|
XXX^ ↑ |
XXXABC^ ↑ |
001 PQN 002 MV %1 "LIST","MD","ERRMSG","SORT" 003 MV %5 "WITH *A1 =","Q","DDBL-SPCX" 004 S1 005 A 006 IF A # MD X%2 WAS NOT MD 007 A 008 A'4 009 A'3 010 S5 011 A 012 A"6 013 A(35,7) 014 P
In this example:
The primary input buffer after line 3 contains:
LIST^MD^ERRMSG^SORT^WITH *A1 =^Q^DDBL-SPCX^
This Proc produces the following command:
LIST MD 'SORT' 'ERRMSG' WITH *A1 = "Q" DBL-SPC
The contents of the input and output buffers are given below:
Primary Input Buffer:
%1 | %2 | %3 | %4 | %5 | %6 | %7 |
LIST | MD | ERRMSG | SORT | WITH *A1 = | Q | DDBL-SPCX |
12345 |
678 |
9012345 |
6890 |
12345678901 |
23 |
456789012 |
Currently Active Output Buffer:
%1 | %2 | %3 | %4 | %5 | %6 | %7 |
LIST | MD | 'SORT' | 'ERRMSG' | WITH *A1 = | "Q" | DBL-SPC |