Create a Source Code Object
Use this API to create a new instance of an existing Source Code definition or a new Source Code definition and an instance of it.
Note:
Source Code definitions and instances are always contained in Program definitions. You cannot create a Source Code definition without also creating an instance of it in the same Program definition.Name
CDR_PUB_DF_SOURCECODE.CreateSourceCode
Signature
PROCEDURE CREATESOURCECODE( 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_SCREF_SOURCECDRNAMING IN OUT CDR_NAMING_VERSION_OBJ_TYPE, PI_CDRSCOBJTYPE IN OUT CDR_SRCCODE_OBJ_TYPE, PIO_CDRSCREFOBJTYPE IN OUT CDR_SRCCODE_REF_OBJ_TYPE, PI_CREATEOBJECT IN VARCHAR2, PI_DEFINITON_SUBTYPE_ID IN CDR_NAMINGS.OBJECT_SUBTYPE_ID%TYPE, PI_VLOBMODE IN VARCHAR2 := NULL, PIO_CDRSCBLOB IN OUT CDR_SRCCODE_BLOB_OBJ_TYPE, PIO_CDRSCCLOB IN OUT CDR_SRCCODE_CLOB_OBJ_TYPE );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PIO_SCREF_SOURCECDRNAMING (Mandatory) This is a parameter of table type
CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes.
Enter values for the Source Code instance you are creating. For OBJECT_TYPE_RC enter $OBJTYPES$SRCCDEREF.
- PI_CDRSCOBJTYPE (Optional) This is a parameter of table type
CDR_SRCCODE_OBJ_TYPE that contains object attributes specific to Source Code definitions.
If you are creating a new definition, enter values for the new Source Code definition. The following attributes are required: TECH_TYPE_ID,SRCCODE_TYPE_RC,SHAREABLE_FLAG_RC,ORACLE_PACKAGE_NAME.
If you are creating an instance of an existing Source Code definition, do not enter any values here.
- PIO_CDRSCREFOBJTYPE (Optional) This is a parameter of table type
CDR_SRCCODE_REF_OBJ_TYPE that contains object attributes specific to Source Code
instances.
If you are creating a new instance, enter values for it.
If you are creating a new Source Code definition only, do not enter any values here.
-
PI_CREATEOBJECT (Mandatory) Enter INST to create a instance of an existing definition or BOTH to create a new definition and an instance of it.
- PI_DEFINITON_SUBTYPE_ID (Optional) Enter a subtype for the Source Code
definition.
If you do not enter a value, the API creates the definition with the default subtype.
- PI_VLOBMODE Enter 'DIRECT' if your source code is already contained in a
BLOB or CLOB file. You enter information about it in one of the next two parameters and
the API uploads it immediately.
If you enter anything other than 'DIRECT' the API creates a new, empty BLOB and CLOB in the next parameters. It prompts you to paste your source code in and then uploads the BLOB or CLOB.
- PIO_CDRSCBLOB This is a compound object of type CDR_SRCCODE_BLOB_OBJ_TYPE.
If the source code is binary, enter its name for the FILE_NAME attribute value and the BLOB itself for the FILE_BLOB attribute value.
- PIO_CDRSCCLOB This is a compound object of type CDR_SRCCODE_CLOB_OBJ_TYPE.
If the source code is text-based, enter its name for the FILE_NAME attribute value and the CLOB itself for the FILE_CLOB attribute value.
Parent topic: Create and Modify Source Code