15 Variables
This is a public interface for Variable-related operations including creating, modifying, and removing Variables. It also includes functions for checking in and checking out Variables.
This chapter contains the following section:
Parent topic: Object APIs
Create and Modify Variables
This section contains the following topics:
Parent topic: Variables
Create a Variable
Use this API to create a new Variable instance.
Name
CDR_PUB_DF_VARIABLE.CreateVariable
Signature
PROCEDURE CREATEVARIABLE( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PIO_NAMING IN OUT CDR_NAMING_VERSION_OBJ_TYPE, PIO_VARIABLE IN OUT CDR_VAR_OBJ_TYPE, PI_DEFCLASSIFICATIONCOLL IN CDR_CLASSIFICATIONS_COLL );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PIO_NAMING (Mandatory) This is a parameter of table type
CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes.
For OBJECT_TYPE_RC enter $OBJTYPES$CDRVAR.
- PIO_VARIABLE (Mandatory) This is a parameter of table type CDR_VAR_OBJ_TYPE
that contains attributes specific to Variables.
The required attributes are: ORACLE_NAME, ORACLE_DATATYPE_RC, LENGTH, PRECISION, SAS_V8_NAME,SAS_LABEL, SAS_FORMAT, NULLABLE_FLAG_RC,DEFAULT_VALUE.
Possible values for ORACLE_DATATYPE_RC are: $ORADATATYPES$DATE, $ORADATATYPES$NUMBER, and $ORADATATYPES$VARCHAR2.
Possible values for NULLABLE_FLAG_RC are: $YESNO$NO, $YESNO$YES.
- PI_DEFCLASSIFICATIONCOLL By default, the variable is classified according to
the subtype you assigned it in the CDR_NAMING_VERSION_OBJ_TYPE.
If you want to override the default classifications for one or more classification levels, use this parameter. This is a collection of CDR_CLA_OBJ_TYPEs, which have 5 attributes, including CLA_LEVEL_ID and CLASSIFICATION_ID.
If you want the definition to inherit its classifications for a particular level from its parent, enter the classification level ID and, for the CLASSIFICATION_ID, enter 0 (zero).
If you want to explicitly assign one or more terms for a particular level, initialize a CDR_CLA_OBJ_TYPE for each term, entering the classification level ID and, for the CLASSIFICATION_ID, the term ID. The PAR_ attributes are not relevant to Variables. Do not enter any values for them.
If you are not creating a new definition, do not enter values here.
Parent topic: Create and Modify Variables
Check Out a Variable
Use this API to check out a Variable definition or instance.
Name
CDR_PUB_DF_VARIABLE.CheckOut
Signature
PROCEDURE CHECKOUT( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PIO_BASEOBJECT IN OUT CDR_BASE_OBJ_TYPE, PI_COMMENT IN VARCHAR2, PI_ISINSTONLY IN VARCHAR2 );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PIO_BASEOBJECT (Mandatory) This is a parameter of table type
CDR_BASE_OBJ_TYPE. Enter values to identify the Variable definition that you want to check
out.
The following attributes are required: COMPANY_ID,OBJ_ID,OBJ_VER,OBJECT_VERSION_NUMBER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.
- PI_COMMENT (Optional) Enter the reason you are checking out the Variable.
- PI_ISINSTONLY (Mandatory) Enter $YESNO$NO.
Parent topic: Create and Modify Variables
Modify a Variable
Use this API to modify a Variable definition or instance.
Note:
To modify a Variable definition, you must first check it out.Name
CDR_PUB_DF_VARIABLE.ModifyVariable
Signature
PROCEDURE MODIFYVARIABLE( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PI_NAMING IN OUT CDR_NAMING_VERSION_OBJ_TYPE, PI_VARIABLE IN OUT CDR_VAR_OBJ_TYPE );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PI_NAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes. Initialize the attributes COMPANY_ID, OBJECT_ID, and OBJECT_VER.
- PI_VARIABLE (Mandatory) This is a parameter of table type CDR_VARS_OBJ_TYPE. Provide values for the attributes you want to modify.
Parent topic: Create and Modify Variables
Check In a Variable
Use this API to check in a Variable definition or instance.
Name
CDR_PUB_DF_VARIABLE.CheckIn
Signature
PROCEDURE CHECKIN( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PIO_BASEOBJECT IN OUT CDR_BASE_OBJ_TYPE, PI_COMMENT IN VARCHAR2 );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PIO_BASEOBJECT (Mandatory) This is a parameter of table type
CDR_BASE_OBJ_TYPE. Enter values to identify the Variable definition that you want to check
in.
The following attributes are required: COMPANY_ID,OBJ_ID,OBJ_VER,OBJECT_VERSION_NUMBER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.
- PI_COMMENT (Optional) Enter the reason you are checking in the Variable.
Parent topic: Create and Modify Variables
Remove a Variable
Use this API to remove an existing variable object.
Name
CDR_PUB_DF_VARIABLE.RemoveVariable
Signature
PROCEDURE REMOVEVARIABLE( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PI_NAMING IN OUT CDR_NAMING_VERSION_OBJ_TYPE );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameter:
PI_NAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes. Initialize the attributes COMPANY_ID, OBJECT_ID, and OBJECT_VER.
Parent topic: Create and Modify Variables