XREF
Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Revelation Technologies | 14 NOV 1989 | 2.X | EXPERT | XREF |
XREF parses a string into a multivalued field based on the delimiters specified.
Arguments
field
The string to be parsed into a multivalued field
delims
A string of characters to use as delimiters. XREF converts any delimiters specified to @VM in field.
stops
A dynamic array of words not to be indexed. This defaults to the value of @DEFAULT.STOPS (see Appendix 1, System Variables). The words must be delimited by | or @VM.
stops.mode
An integer from 1 to 3 which determines the value of stops (defaults to 1):
Value | Stops value |
---|---|
1 | @DEFAULT.STOPS |
2 | @DEFAULT.STOPS:@VM:stops |
3 | stops |
Values returned
XREF returns the new multivalued field in @ANS.
Examples
*Initialization and defaults for each example DECLARE SUBROUTINE XREF,MSG STOPS = '' STOPS.MODE = '' *Display a new multivalued field FIELD = 'file*record*field' DELIMS = '*' @@ANS = '' XREF(FIELD,DELIMS,STOPS,STOPS.MODE) MSG('The new multivalued field is:|':@ANS','','','') *Display the new multivalued field and supply additions to *the default stop list FIELD = 'file#record*field*number#record*field*number' DELIMS = '* #' STOPS = 'number' STOPS.MODE = 2 @@ANS = '' XREF(FIELD,DELIMS,STOPS,STOPS.MODE) MSG('The new multivalued field is:|':@ANS,'','','')