The Relational Data Framework, System State Manager, and all other SQL-related components of CA OPS/MVS use the standard CA OPS/MVS security exit and AOF security rules. The following variables are available in security rules:
A single-character code that represents the environment where the SQL request originated
Data Type: Character, read-only
Source: The environment from which the SQL request originated
Possible Values:
Sample Value: A
The complete text of the SQL statement. The maximum size of an SQL statement in CA OPS/MVS is currently 2048 characters.
Data Type: Character, read-only
Source: The SQL statement
Sample Value: SELECT * FROM STCTBL WHERE NAME=‘VTAM’
The function code returned by the OPSQL command processor. The function code should always be S for SQL.
Data Type: Character, read-only
The count of host variable references that occur within the SQL statement. This variable can be used as a loop count limit for reading host variable names and values using the SEC.AUSQHVIX facility for obtaining a specific host variable name and value.
Data Type: Integer, read-only
Source: The SQL statement control block created by the SQL syntax compiler.
Sample Value: 3
The host variable reference sequence number for obtaining a host variable name or value using the SEC.AUSQHVNA and SEC.AUSQHVVL variables. The maximum usable value is the value of SEC.AUSQHVCN.
The initial value is 0.
Data Type: Integer, read/write
Source: Set by user for host variable name and value retrieval
Sample Value: 2
The host variable name of the host variable pointed to by the SEC.AUSQHVIX index number. The SQL syntax compiler creates a table of host variable names in the order they occur in the statement. The index number points to the name entry to retrieve.
Data Type: Character, read-only
Source: The SQL statement control block created by the SQL syntax compiler.
Sample Value: VNAME
The host variable value of the host variable pointed to by the SEC.AUSQHVIX index number. Values for host variables are provided for host variable names in the SQL statement in a separate table at the time that the SQL statement is executed. In an SQL cursor statement, the values are supplied when the OPEN cursor statement is executed. The DECLARE cursor statement has no values for the host variables in the SQL statement.
Data Type: Character/Numeric, read-only
Source: The SQL host variable input value table (VIL) provided at SQL statement execution.
Sample Value: CICSAOR
The SQL request type.
Data Type: Character, read-only.
Source: The SQL verb of the SQL statement.
Possible Values:
Sample Value: A
The SQL statement type.
Data Type: Character, read-only.
Source: The SQL verb of the SQL statement.
Possible Values:
Sample Value: SE
The first 128 characters of an SQL statement
Data Type: Character, read-only
Source: The SQL statement
Sample Value: DROP TABLE TABLE
The list of system names to which the request is being sent. If the request is being sent to the local system, it may be empty or it may contain the words ALL or EXT.
Data Type: Character, read-only
Source: The system keyword on the SQL request
Sample Value: SYSA
A word delimited list of table names referenced in the SQL statement. Host variable table names are resolved to their values. Most simple SQL statements have only one table reference that is usually a literal value. More complex SQL statements such as joins and sub-select clauses will reference more than one table.
Data Type: Character, read-only
Source: The SQL statement control block created by the SQL syntax compiler and the host variable value table.
Sample Value: STCTBL DB2TBL
Example: Read Host Variable Names and Values into Stem Variable Array
The following sample code shows how all the host variable names and values in a SQL statement can be read into a stem variable array for use in:
The host variable names can also be created as simple REXX variables with the correct values.
hvnam.0=SEC.AUSQHVCN /* Count of host variables */ Do ix=1 To hvnam.0 /* Find all the host variables */ SEC.AUSQHVIX=ix /* Set the host variable index */ hvnam.ix=SEC.AUSQHVNA /* Get the host variable name */ hvval.ix=SEC.AUSQHVVL /* Get the host variable value */ vrc=VALUE(hvnam.ix,hvval.ix) /* Create the Rexx variable */ End
|
Copyright © 2011 CA.
All rights reserved.
|
|