18.08.2013 Views

LINC Programming Reference Manual - Public Support Login - Unisys

LINC Programming Reference Manual - Public Support Login - Unisys

LINC Programming Reference Manual - Public Support Login - Unisys

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ATTACH (ATT) and ATTACH&SPACE (ATS)<br />

ATTACH (ATT) and ATTACH&SPACE (ATS)<br />

The ATTACH; command appends the first data item to the second data item after the last<br />

non-space character, and then stores the result in the second data item. Embedded blanks<br />

in either data item are retained.<br />

When the ATTACH&SPACE; command is used, a space is inserted between the two data<br />

values when they are joined. However, if the second item has the same value as<br />

GLB.SPACES, the result is the first data item (with no leading spaces, unless the first data<br />

item contained leading spaces).<br />

Truncation of Data<br />

With the ATTACH; and ATTACH&SPACE; commands, the System Data item GLB.LENGTH<br />

is set to the untruncated length of the result, ignoring trailing spaces.<br />

The second data item must have a length that is large enough to contain the resulting data,<br />

otherwise truncation will occur. If truncation occurs, the truncated data is returned in the<br />

destination data item, GLB.LENGTH is set to the untruncated length, and no error message<br />

is given.<br />

For UNIX and MCP based <strong>LINC</strong> Systems, the maximum length of an item created with the<br />

ATTACH; and ATTACH&SPACE; commands is 2000 characters. (This is equivalent to 1000<br />

Kanji (EDIT; K) characters.)<br />

On OS 2200 based <strong>LINC</strong> Systems, the maximum length of the item you are joining (the first<br />

data item) is 2000 characters. If you attempt to join a longer item, its value is truncated to<br />

2000 characters before being joined. The second data item and the result may be any length.<br />

If you move a mixed alphanumeric and Hankaku-Katakana value into an EDIT; W data<br />

item, the value is moved character by character, and is truncated to the length of the<br />

data item. However, if you move a mixed alphanumeric and Hankaku-Katakana value into<br />

an EDIT; A data item, the value is moved byte by byte and is truncated to the length of the<br />

data item. If the truncation occurs after the first byte of a double-byte Hankaku-Katakana<br />

character, this will result in an invalid character.<br />

Notes:<br />

$ EDIT; W data items are not implemented in LDA.<br />

$ For an MCP based <strong>LINC</strong> System, when numeric data items containing separators<br />

are used with ATTACH; or ATTACH&SPACE; commands, the effective length of the<br />

data item will include separators. For example, a numeric data item with attributes<br />

LE; 5 SP; (,) will have an effective length of 6, with an included leading zero.<br />

For LDA there is no upper limit on the size of the item created.<br />

v 1-19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!