Library /sys$common/syshlp/helplib.hlb  —  Lexicals  F$CONTEXT  Arguments
 context-type

    Specifies the type of context to be built.

    At present, the only context type available is PROCESS, which is
    used in constructing selection criteria for F$PID. Privileges
    are not required to see processes for the same UIC. To see
    processes for another UIC in the same UIC group, you need the
    GROUP privilege, and to see processes systemwide, you need the
    WORLD privilege.

 context-symbol

    Specifies a symbol that DCL uses to refer to the context memory
    being constructed by the F$CONTEXT function. The function F$PID
    uses this context symbol to process the appropriate list of
    process identification (PID) numbers.

    Specify the context symbol by using a symbol. The first time you
    use the F$CONTEXT function in a command procedure, use a symbol
    that is either undefined or equated to the null string. The
    symbol created will be a local symbol of type "PROCESS_CONTEXT".
    When the context is no longer valid-that is, when all PIDs have
    been retrieved by calls to the F$PID function or an error occurs
    during one of these calls-the symbol no longer has a type of
    "PROCESS_CONTEXT". Then you can use the F$TYPE function in the
    command procedure to find out if it is necessary to cancel the
    context.

    After setting up the selection criteria, use this context symbol
    when calling F$PID.

 selection-item

    Specifies a keyword that tells F$CONTEXT which selection
    criterion to use. Use only one selection-item keyword per call
    to F$CONTEXT.

                                   NOTE

       Do not use the NEQ selection value on a list of items
       because it causes the condition to always be true.

       For example:

       $ EXAMPLE=f$context("PROCESS",CTX,"USERNAME","A*,B*","NEQ")

       This equation is parsed as "if the user name is not equal
       to A* or the user name is not equal to B*, then return the
       process of the users that meet the criteria." Because the
       operand is a logical or, the conditions will always be true
       (any name will be found to be not equal to A* or B*; ALFRED
       will not be equal to B*; BOB will not be equal to A*).

    The following table shows valid selection-item keywords for the
    PROCESS context type:

    Selection  Selection Value
    Item       Value    Qualifiers Comments

    ACCOUNT    String   EQL, NEQ   Valid account name or list of
                                   names. The asterisk (*) and
                                   the percent sign (%) wildcard
                                   characters are allowed.

    AUTHPRI    Integer  GEQ,       On Alpha, valid authorized base
                        GTR,       priority (0-63).
                        LEQ,
                        LSS,
                        EQL, NEQ

    CANCEL                         Cancels the selection criteria for
                                   this context.

    CURPRIV    Keyword  ALL,       Valid privilege name keyword
                        ANY,       or list of keywords. For more
                        EQL, NEQ   information, see the HP OpenVMS
                                   Guide to System Security.

    GRP        Integer  GEQ,       UIC group number.
                        GTR,
                        LEQ,
                        LSS,
                        EQL, NEQ

    HW_MODEL   Integer  EQL, NEQ   Valid hardware model number.

    HW_NAME    String   EQL, NEQ   Valid hardware name or a list of
                                   keywords. The asterisk (*)  and
                                   the percent sign (%)  wildcard
                                   characters are allowed.

    JOBPRCCNT  Integer  GEQ,       Subprocess count for entire job.
                        GTR,
                        LEQ,
                        LSS,
                        EQL, NEQ

    JOBTYPE    Keyword  EQL, NEQ   Valid job-type keyword. Valid
                                   keywords are DETACHED, NETWORK,
                                   BATCH, LOCAL, DIALUP, and REMOTE.
                                   For more information, see the
                                   OpenVMS User's Manual.

    MASTER_    String   EQL, NEQ   PID of master process.
    PID

    MEM        Integer  GEQ,       UIC member number.
                        GTR,
                        LEQ,
                        LSS,
                        EQL, NEQ

    MODE       Keyword  EQL, NEQ   Valid process mode keyword. Valid
                                   keywords are OTHER, NETWORK,
                                   BATCH, and INTERACTIVE. For more
                                   information, see the OpenVMS
                                   User's Manual.

    NODE_      Integer  EQL, NEQ   Node's cluster ID number.
    CSID

    NODENAME   String   EQL, NEQ   Node name or list of node names.
                                   The asterisk (*)  and the percent
                                   sign (%)  wildcard characters are
                                   allowed. The default is your local
                                   node. To request all nodes, use
                                   the value "*".

    OWNER      String   EQL, NEQ   PID of immediate parent process.

    PRCCNT     Integer  GEQ,       Subprocess count of process.
                        GTR,
                        LEQ,
                        LSS,
                        EQL, NEQ

    PRCNAM     String   EQL, NEQ   Process name or list of process
                                   names. The asterisk (*)  and
                                   the percent sign (%)  wildcard
                                   characters are allowed.

    PRI        Integer  GEQ,       Process priority level number
                        GTR,       (0-63, on Alpha).
                        LEQ,
                        LSS,
                        EQL, NEQ

    PRIB       Integer  GEQ,       Base process priority level number
                        GTR,       (0-63, on Alpha).
                        LEQ,
                        LSS,
                        EQL, NEQ

    STATE      Keyword  EQL, NEQ   Valid process state keyword.
                                   For more information, see the
                                   description of the $GETJPI service
                                   in the HP OpenVMS System Services
                                   Reference Manual.

    STS        Keyword  EQL, NEQ   Valid process status keyword.
                                   For more information, see the
                                   description of the $GETJPI service
                                   in the HP OpenVMS System Services
                                   Reference Manual.

    TERMINAL   String   EQL, NEQ   Terminal name or list of names.
                                   The asterisk (*)  and the percent
                                   sign (%)  wildcard characters are
                                   allowed.

    UIC        String   EQL, NEQ   User identification code (UIC)
                                   identifier (that is, of the form
                                   "[group,member]").

    USERNAME   String   EQL, NEQ   User name or list of user names.
                                   The asterisk (*) and the percent
                                   sign (%) wildcard characters are
                                   allowed.

 selection-value

    Specifies the value of the selection criteria. For example, to
    process all the processes running on node MYVAX, specify "MYVAX"
    with the "NODENAME" keyword. For example:

    $ X = F$CONTEXT("PROCESS", ctx, "NODENAME", "MYVAX", "EQL")

    Values that are lists are valid with some selection items. If you
    specify more than one item, separate them with commas (,).  The
    following example specifies a list of the nodes MYVAX, HERVAX,
    and HISVAX:

    $ X=F$CONTEXT("PROCESS",ctx,"NODENAME","MYVAX,HERVAX,HISVAX","EQL")

    You can use the asterisk (*) and the percent sign (%) wildcard
    characters for some values. Using wildcard characters for
    selection items is similar to using wildcard characters for file
    names.

 value-qualifier

    Specifies qualifiers for selection values. You must qualify
    selection values.

    You can qualify a number, for example, by requesting that the
    selection be based on one of the following process values:

    o  LSS - less than the value specified in the call to F$PID

    o  LEQ - less than or equal to the value specified in the call to
       F$PID

    o  GTR - greater than the value specified in the call to F$PID

    o  GEQ - greater than or equal to the value specified in the call
       to F$PID

    o  EQL - equal to the value specified in the call to F$PID

    o  NEQ - not equal to the value specified in the call to F$PID

    You can qualify some lists with the ALL, ANY, EQL, or NEQ
    keywords. Such lists are usually masks such as the process
    privilege mask, which consists of the set of enabled privileges.

    o  ALL - requires that all items in the list be true for a
       process

    o  ANY - requests that any item in the list be part of the
       attributes of a process

    o  EQL - requires the values to match exactly (that is, values
       not specified must not be true of the process)

    o  NEQ - requires that the value must not match

    When using multiple selection values with a particular selection
    qualifier, a match on any one of the selection criteria is
    considered valid (as if an OR operand was in place); the
    selection values are not cumulative criteria (as if an AND
    operand was in place).

    The difference between ALL and EQL is that the values specified
    with ALL must exist, but other unspecified values can exist
    also. EQL requires that all values specified must exist, and
    all others may not. For example, to request those processes whose
    current privileges include TMPMBX (temporary mailbox) and OPER
    (operator), but may include other privileges, specify the ALL
    keyword. To request those processes whose current privileges are
    TMPMBX and OPER exclusively, specify the EQL keyword.
Close Help