Look at the documentation
| csession instname "[label[+offset]]^routine" |
Specifies the name of a COS program to run in user mode. In addition to the specified formats, you can pass parameter lists consisting of string and/or numeric literals, as well as omitted (void) parameters, as follows: where, for example, parameter-list is specified in the form "string literal",,-+-000123.45600E+07, and omitted parameters are passed to the target as $Data(parameter)=0. Whitespace and shell meta characters must be quoted in an operating-system dependent form. |
So, you can just call your code in routine or class with csession.
If you need another way, you can create any text file, with a list of commands, like if you would use them in csession manually. Where the last command should be HALT. While it is a code for csession, you can't use any multi line blocks and spaces at the beginning of the line. And run it:
csession CACHE -UUSER < somecode.txt
If you need authorization in csession before executing code, just put login and password as a plain text in first two rows.
- Log in to post comments

