The REMOVE statement removes substrings, separated by system delimiters, from a dynamic array.
Format
REMOVE substring FROM dyn.array AT locn SETTING delim.no |
The above statement assigns the value of each successive substring in dyn.array to substring, using locn to maintain its position within dyn.array. locn must initially be set to 0, and after each removal is left pointing to the delimiter which terminated the substring. The user must not change locn.
The statement returns a code for the type of delimiter encountered removing the substring in delim.no, using this table:
Delimiter Type |
Comments |
0 |
End of string |
2 |
Attribute mark ASCII CHAR(254) |
3 |
Value mark CHAR(253) |
4 |
Subvalue mark CHAR(252) |
5 |
CHAR(251) |
6 |
CHAR(250) |
NOTE |
This instruction provides a very efficient method of handling certain repetitive substring operations. It does not have to scan the string each time to regain its position. In order for REMOVE to work correctly, the user must not change the locn variable. |
See Also