MSIR.0732 Invalid context for (type): Difference between revisions
Jump to navigation
Jump to search
(Automatically generated page update) |
(Automatically generated page update) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
An object or structure variable was used in an invalid context. One of the most common cases where this error occurs is in an attempt to print the value of an object variable, especially an enumeration, or to use an object variable as a string (again, most common with object variables) | An object or structure variable was used in an invalid context. One of the most common cases where this error occurs is in an attempt to print the value of an object variable, especially an enumeration, or to use an object variable as a string (again, most common with object variables). | ||
[[Category: | For enumerations, the <var>ToString</var> method should be added to the variable to print it or use it as a string: | ||
<p class="code">%truth is enumeration boolean | |||
... | |||
print %truth:toString</p> | |||
For other objects, one presumably really intends to use an object member in the context or perhaps the result of a method like <var>ToString</var> that converts the object contents to a simple datatype. | |||
{{Template:MSIR.0732 footer}} | |||
[[Category:MSIR.0600 - MSIR.0799]] |
Latest revision as of 23:34, 3 March 2017
An object or structure variable was used in an invalid context. One of the most common cases where this error occurs is in an attempt to print the value of an object variable, especially an enumeration, or to use an object variable as a string (again, most common with object variables).
For enumerations, the ToString method should be added to the variable to print it or use it as a string:
%truth is enumeration boolean ... print %truth:toString
For other objects, one presumably really intends to use an object member in the context or perhaps the result of a method like ToString that converts the object contents to a simple datatype.
Message attributes:
RETCODEO=0 | Sets online return code |
---|---|
RETCODEB=4 | Sets batch (single user) return code |
CLASS=E | Error class; the message can be suppressed with the X'04' bit setting of the MSGCTL parameter |
AUDITER | Writes the message with line type ER to the audit trail |
COUNT | Increments the error count (ERCNT) parameter |
ECHO | Displays the line that caused the error |