Guardian Procedure Calls Reference Manual
info-word.<13> is set if this attribute was involved in an inconsistency at the last check. (For
a list of DEFINE consistency check numbers, see the description of the checknum parameter
for DEFINEADD Procedure (page 259).)
Returned Value
INT
Outcome of the call:
Success.0
A syntax error occurred in name.2049
DEFINE not found.2051
An error occurred when placing PFS in use.2052
Bounds error on parameter.2054
Attribute not supported.2055
No more attributes (see Considerations (page 279)).2061
Missing parameter.2066
For other error values associated with DEFINEs, see the Guardian Procedure Errors and Messages
Manual.
Considerations
• This procedure can be used to obtain the value of any attribute in the DEFINE working set,
including the CLASS attribute.
• If an error occurs, the contents of the data array are undefined.
• Both attribute-name and cursor can be present. If cursor is present, it is used to
"name" the attribute whose value is to be returned, and attribute-name returns the name
of the attribute.
• When the cursor parameter is used, info-word is returned even though the attribute can
be absent from the DEFINE working set.
• To use the cursor mode, initialize cursor to 0 and repeatedly call this procedure without
changing cursor to sequentially read attributes. The caller should not, for example, set
cursor to 7 and then call this procedure.
• To implement a command similar to the TACL SHOW DEFINE command, a process should
typically call DEFINEREADATTR with define-name omitted and with read-mode equal to
1; to implement the SHOW DEFINE * command, it should call DEFINEREADATTR with
define-name omitted and with read-mode equal to 2.
• To implement the detailed version of the INFO DEFINE command, command interpreters should
call DEFINEREADATTR, passing it the define-name and with read-mode of 0.
• When the cursor option is being used and the last attribute is read, then cursor returns the
next attribute number consistent with the read-mode parameter. When this attribute is read,
2061 (no more attributes) is returned instead of 0. The 2061 code should be interpreted as
success; however, if a process (such as a command interpreter) is calling DEFINEREADATTR
in a loop using the cursor option, then code 2061 should be used to terminate the loop.
• attribute-name should not be declared as a P-relative array. In general, a reference
parameter should not be declared as a P-relative array.
DEFINEREADATTR Procedure 279