F$CONTEXT and F$PID
Use F$CONTEXT to set up selection
$ TMP = F$CONTEXT( “PROCESS”, -
CTX, “MODE”, “INTERACTIVE”, “EQL” )
$ TMP = F$CONTEXT( “PROCESS”, -
CTX, “NODE”, “*”, “EQL” )
Selection criteria are cumulative.
Notes:
Use the F$CONTEXT function to set up your selection criteria. This allows a programmatic way of locating processes by name, by mode, by UIC, etc. without the need to use intermediate files or parse the output of a DCL command such as SHOW SYSTEM.
Multiple selection criteria can be specified by issuing multiple invocations of F$CONTEXT. The context constructed this way can be used with the F$PID function to return the PIDs of all processes matching the selection criteria specified.