This document covers the following topics:
Return a list of all variables appearing in a document text. You can only access Txt and Cnf documents.
This subprogram can be called iteratively. The Work-parameter contains the position in the text at which this subprogram has stopped the last time it has been called.
The Duplicate-suppression parameter determines the following (the value must be alphanumeric):
When you do not specify a value, or when you specify any value other than 1 or 2: After each iterative call, this subprogram checks the whole text so that no duplicate variables will be returned at all. The sequence of the variables returned may deviate from their sequence within the text. If the text is too large and if there are too many duplicate variables, this can cause too many Adabas calls.
When you specify the value 1: Variables returned in the Variable-table are not duplicated with each call. For example, if the part of the text which is currently being processed contains &HELLO twice, only one HELLO is returned. However, when this subprogram is called iteratively, and if &HELLO appears again in the text, it will be returned in the new Variable-table.
When you specify the value 2: This subprogram does not check the text. Each variable will be returned. Thus, &HELLO may appear several times within the same Variable-table.
Con-form system variables are not returned.
Note:
In the document text, the characters after the variable character
(default: &) must be alphanumeric (the underscore character (_) can also be
used), otherwise the variable is not returned in the Variable-table. Thus,
Con-form system variables (e.g. &$PN) are not returned.
Parameter | Format | In | Out | Remarks |
---|---|---|---|---|
Return-code | N2 | O | X | Input -1: no ET. |
Cabinet | A8 | R | The cabinet in which the document is stored. | |
Password | A8 | R | The password of the above cabinet. | |
Document-name | A32 | R* | The name of the document which contains the variables. Either Document-name or ISN, not both. | |
ISN | P10 | R* | The ISN of the document which contains the variables. Either ISN or Document-name, not both. | |
Variable-character | A1 | O | The character which precedes a variable in the document text. Default: &. | |
No-system-variables | L | O | If set to true, Con-nect system variables are not returned. Default: false. | |
Duplicate-suppression | A1 | O | See description above. | |
Number | N2 | O | The maximum number of elements that are returned with each call. When you do not specify a value, or when you specify a value greater than 20, the default value 20 is used. | |
Variable-table | A32/1:20 | X | The variable list. | |
Work-parameter | A18 | For internal use. See The Work Parameter. |
00 | Success |
02 | Invalid cabinet name or - in batch mode only - locked cabinet |
03 | Password incorrect |
04 | ISN was not found |
08 | Supply either ISN or name, not both |
09 | ISN does not point to correct object |
51 | Invalid name |
53 | Requested object does not exist |
77 | End of document |
78 | This is not a text document |
Z-120
Z-122
Z-123
Z-143
Z-1200&0