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