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.

DETACH (DET, DTH)<br />

DETACH (DET, DTH)<br />

The DETACH; command moves text from an alphanumeric (EDIT; A, EDIT; K or EDIT; W)<br />

data item into a second data item of the same edit type.<br />

Following execution of the DETACH; command, the System Data item GLB.LENGTH<br />

contains the length of the text selected from the first data item.<br />

Position and Delimiter<br />

The text to be moved is defined by a starting position, and by the occurrence of a delimiter.<br />

Starting Position<br />

If the starting position is invalid, no move will take place and the second data item will<br />

contain spaces. The default starting position is the first character.<br />

If a data item is used to specify a starting position, it will be updated to the position of the<br />

first non-delimiter character (following the delimiter) in the first data item value.<br />

Delimiter<br />

The default delimiter is a space. Multiple consecutive occurrences of the delimiter are<br />

treated as a single occurrence. The delimiter is not included in the move.<br />

If the specified delimiter is not found, the contents of the first data item starting from the<br />

specified starting position are moved to the second data item The contents are truncated if<br />

the second data item is too small.<br />

Truncation of Data<br />

The maximum length moved by a DETACH; command is 2000 characters. This is<br />

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

The text selected by the DETACH; command may be truncated if the second data item is<br />

too small.<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 />

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

v 1-83

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

Saved successfully!

Ooh no, something went wrong!