$CLASSMETHOD(classname, methodname, arg1, arg2, arg3, ... )
Optional An expression that evaluates to a string. The content of the string must match exactly the name of an existing, accessible, previously compiled class. In the case of references to InterSystems IRIS classes, the name may be either in its canonical form (%Library.String), or its abbreviated form (%String).
|methodname||An expression which evaluates to a string. The value of the string must match the name of an existing class method in the class identified by classname.|
|arg1, arg2, arg3, ...||Optional A series of expressions to be substituted sequentially for the arguments to the designated method. The values of the expressions can be of any type. It is the responsibility of the implementor to make sure that the type of the supplied expressions match what the method expects, and have values within the bounds declared. (If the specified method expects no arguments then no arguments beyond the methodname need be given in the function invocation. If the method requires arguments, the rules that govern what must be supplied are those of the target method.)|
SET classname = "%Dictionary.ClassDefinition" SET classmethodname = "NormalizeClassname" SET singleargument = "%String" WRITE $CLASSMETHOD(classname,classmethodname,singleargument),!
WRITE $CLASSMETHOD("%Library.Persistent","%PackageName"),! WRITE $CLASSMETHOD("%Library.Persistent","%ClassName")
SET q1="SELECT Age,Name FROM Sample.Person " SET q2="WHERE Age > ? AND Age < ? " SET q3="ORDER by Age" SET myquery=q1_q2_q3 SET rset=$CLASSMETHOD("%SQL.Statement","%ExecDirect",,myquery,12,20) DO rset.%Display() WRITE !,"Teenagers in Sample.Person"