Z-VARSYM

This document covers the following topics:


Description

Return a list of all variables appearing in a document text. You can only access Txt and Cnf documents.

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 is returned in the new 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.

Parameters

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.
Variable-character A1 O   The character which precedes a variable in the document text. Default: &.
Document-name A32 R*   The name of the document which contains the variables. Either Document-name or ISN, not both.
ISN P8 R*   The ISN of the document which contains the variables. Either ISN or Document-name, not both.
Start-value A32 O   The name of a variable. If specified, this subprogram returns variables starting with the first occurrence of the Start-value. If a start value is not specified, this subprogram starts at the beginning of the document text.
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.

Return Codes

00 Success
02 Invalid cabinet name
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

Subprograms

Z-120
Z-122
Z-123
Z-210
Z-1200&0