Library /sys$common/syshlp/helplib.hlb  —  CLI Routines, CLI$PRESENT  Description
    The CLI$PRESENT routine examines the parsed command string to
    determine whether the entity referred to by the entity_desc
    argument is present.

    When CLI$PRESENT tests whether a qualifier is present, the
    condition value indicates whether the qualifier is used globally
    or locally. You can use a global qualifier anywhere in the
    command line; you use a local qualifier only after a parameter.
    A global qualifier is defined in the command definition file
    with PLACEMENT=GLOBAL; a local qualifier is defined with
    PLACEMENT=LOCAL.

    When you test for the presence of a global qualifier, CLI$PRESENT
    determines if the qualifier is present anywhere in the command
    string. If the qualifier is present in its positive form,
    CLI$PRESENT returns CLI$_PRESENT; if the qualifier is present
    in its negative form, CLI$PRESENT returns CLI$_NEGATED.

    You can test for the presence of a local qualifier when you are
    parsing parameters that can be followed by qualifiers. After you
    call CLI$GET_VALUE to fetch the parameter value, call CLI$PRESENT
    to determine whether the local qualifier is present. If the local
    qualifier is present in its positive form, CLI$PRESENT returns
    CLI$_LOCPRES; if the local qualifier is present in its negative
    form, CLI$PRESENT returns CLI$_LOCNEG.

    A positional qualifier affects the entire command line if
    it appears after the verb but before the first parameter. A
    positional qualifier affects a single parameter if it appears
    after a parameter. A positional qualifier is defined in the
    command definition file with the PLACEMENT=POSITIONAL clause.

    To determine whether a positional qualifier is used globally,
    call CLI$PRESENT to test for the qualifier before you call
    CLI$GET_VALUE to fetch any parameter values. If the positional
    qualifier is used globally, CLI$PRESENT returns either CLI$_
    PRESENT or CLI$_NEGATED.

    To determine whether a positional qualifier is used locally,
    call CLI$PRESENT immediately after a parameter value has been
    fetched by CLI$GET_VALUE. The most recent CLI$GET_VALUE call to
    fetch a parameter defines the context for a qualifier search.
    Therefore, CLI$PRESENT tests whether a positional qualifier was
    specified after the parameter that was fetched by the most recent
    CLI$GET_VALUE call. If the positional qualifier is used locally,
    CLI$PRESENT returns either CLI$_LOCPRES or CLI$_LOCNEG.
Close Help