The Question is:
We are writing a simple DCL menu interface and would like the ability to
display the total number of users logged into the system.
Apart from using a "show users" or "show lic/usage" commands, is there a way of
obtaining the total number of intercative users logged into a system?
I thought that there maybe a argument in the F$GETSYI lexical function but I
can't find it. I know that we can write some simple DCL code to extract this
information from a "show users" command but normally OpenVMS would provide
some lexical function to
obtain this type of information.
The Answer is :
There is no supported means, save for a privileged process scan.
Parsing the output of a DCL command is not supported and not
recommended. Parsing the output can fail when the format of
the command output changes.
You could, of course, create a small image that performs this task
and then calls lib$set_symbol to set a DCL symbol containing the
information, and then install the image (with WORLD privilege).