20.3 – Description
The SCA$QUERY_GET_OCCURRENCE routine successively returns every
occurrence in a query result. It provides one pass through all of
the occurrences.
This routine will become obsolete in a future version of SCA. The
SCA$GET_OCCURRENCE routine supersedes this routine.
21 – SCA$QUERY_INITIALIZE
Initializes an SCA query context.
Format
SCA$QUERY_INITIALIZE command_context,
query_context
21.1 – Arguments
command_context
type: $SCA_COMMAND_CONTEXT
access: read/write
mechanism: by reference
An SCA command context.
query_context
type: $SCA_QUERY_CONTEXT
access: write only
mechanism: by reference
An SCA query context to be initialized. This value is passed as an
argument to other SCA query routines (SCA$QUERY_xxx).
21.2 – Condition Value Returned
SCA$_NORMAL The query context has been successfully
initialized.
21.3 – Description
The SCA$QUERY_INITIALIZE routine initializes an SCA query context.
This routine must be called before any other SCA$QUERY_ routines.
This routine will become obsolete in a future version of SCA.
22 – SCA$QUERY_PARSE
Parses a query expression command string and sets up a query
context if the command is syntactically correct.
Format
SCA$QUERY_PARSE query_context, query_expression_string
[,query_expression_length]
22.1 – Arguments
query_context
type: $SCA_QUERY_CONTEXT
access: read/write
mechanism: by reference
An SCA query context that is to describe the indicated query
expression.
query_expression_string
type: character string
access: read only
mechanism: by descriptor
A query expression string.
query_expression_length
type: longword
access: write only
mechanism: by reference
Optional. Length of the query expression, returned from the
parser.
22.2 – Condition Values Returned
SCA$_NORMAL The query expression string has been
successfully parsed.
SCA$_MORETEXT Warning. The query expression string has
been successfully parsed, but the text
following the query expression is not a
legal part of the query expression. This
condition is returned only if the query_
expression_length parameter is specified. If
the query_expression_length parmeter is not
specified, then this routine insists that
the whole query_expression_string argument
be a legal query expression; in this case
all errors are signaled.
22.3 – Description
The SCA$QUERY_PARSE routine parses a query expression string and
sets up a query context if the command is syntactically correct.
This routine will become obsolete in a future version of SCA.
23 – SCA$QUERY_SELECT_OCCURRENCE
Creates a query expression that matches a specific entity.
Format
SCA$QUERY_SELECT_OCCURRENCE query_context,
entity_handle
23.1 – Arguments
query_context
type: $SCA_QUERY_CONTEXT
access: read/write
mechanism: by reference
An SCA query context that is to describe a specific entity.
entity_handle
type: $SCA_HANDLE
access: read/write
mechanism: by reference
An SCA entity handle that describes the entity that the newly
defined query context is to match.
23.2 – Condition Value Returned
SCA$_NORMAL A query expression has been successfully
defined.
23.3 – Description
The SCA$QUERY_SELECT_OCCURRENCE routine creates a query expression
that matches a specific entity.
You use this routine to specify queries based on the results
of previous queries. The entity_handle parameter is obtained by
traversing the results of a previous query evaluation.
Typically, the query context of the entity_handle parameter is
not the same as the query_context parameter. However, they can be
the same. If they are the same query context, then that previous
query is replaced with the query defined by this routine and, as a
result, entity_handle becomes invalid.
This routine will become obsolete in a future version of SCA. The
SCA$SELECT_OCCURRENCE routine supersedes this routine.
24 – SCA$SELECT_OCCURRENCE
Creates a query that matches a specific occurrence.
Format
SCA$SELECT_OCCURRENCE occurrence,
query_name
24.1 – Arguments
occurrence
type: $SCA_HANDLE
access: read only
mechanism: by reference
An SCA occurrence handle which describes the occurrence that the
newly created query is to match.
query_name
type: character string
access: write only
mechanism: by descriptor
The name of the newly created query. This query is created in the
context of the same command context as that in which the input
occurrence handle is defined.
24.2 – Condition Values Returned
SCA$_NORMAL A query expression has been successfully
defined.
24.3 – Description
You use this routine to create new queries based on the results of
previous queries. The occurrence handle parameter is obtained by
traversing the results of a previous query evaluation.
25 – SCA$UNLOCK_LIBRARY
Unlocks all the physical libraries in the current virtual library
list so that they can be modified.
Format
SCA$UNLOCK_LIBRARY command_context
25.1 – Argument
command_context
type: $SCA_COMMAND_CONTEXT
access: read/write
mechanism: by reference
An SCA command context.
25.2 – Condition Value Returned
SCA$_NORMAL The libraries have been successfully
unlocked.
25.3 – Description
The SCA$UNLOCK_LIBRARY routine unlocks all the physical libraries
in the current virtual library list so that they can be modified.