csession can be called with a variety of arguments:
For example I can call:
csession cache "##class(%SYSTEM.OBJ).ShowFlags()"
And that's the output I get because ShowFlags method writes to the current device:
b - Include sub classes. c - Compile. Compile the class definition(s) after loading. d - Display. This flag is set by default. e - Delete extent. h - Generate help. i - Validate XML export format against schema on Load. k - Keep source. When this flag is set, source code of generated routines will be kept. l - Lock classes while compiling. This flag is set by default. p - Percent. Include classes with names of the form %*. r - Recursive. Compile all the classes that are dependency predecessors. s - Process system messages or application messages. u - Update only. Skip compilation of classes that are already up-to-date. y - Include classes that are related to the current class in the way that they either reference to or are referenced by the current class in SQL usage.
The problem I have is when the method does not write to the current device, but rather returns a value. If I call it nothing is returned:
csession cache "##class(%SYSTEM.Version).GetVersion()"
Is there a way to call these methods and get their result written to the device?