12 Software Source Codes
This is a public interface for Source Code-related operations including creating, modifying, and removing Source Code objects.
Parent topic: Object APIs
Create and Modify Source Code
This section contains the following topics:
- Create a Source Code Object
- Get a Source Code CLOB
- Modify Source Code
- Set the Primary Flag to Yes
- Update a Shareable Flag
- Remove a Source Code Object
Parent topic: Software Source Codes
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
Get a Source Code CLOB
Use this API to get the source code CLOB.
Name
CDR_PUB_DF_SOURCECODE.GetSourceCode
Signature
FUNCTION GETSOURCECODE( 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, COMPANYID IN CDR_NAMINGS.COMPANY_ID%TYPE, OBJID IN CDR_NAMINGS.OBJ_ID%TYPE, OBJVER IN CDR_NAMING_VERSIONS.OBJ_VER%TYPE, NSOBJID IN CDR_NAMINGS.OBJ_ID%TYPE, NSOBJVER IN CDR_NAMING_VERSIONS.OBJ_VER%TYPE ) RETURN CLOB;
Return
Type CLOB
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- COMPANYID (Mandatory) Enter your company ID.
- OBJID (Mandatory) Enter the object ID of the Source Code definition.
- OBJVER (Mandatory) Enter the object version (OBJ_VER) of the Source Code definition.
- NSOBJID (Mandatory) Enter the object ID of the Program definition that contains the Source Code definition.
- NSOBJVER (Mandatory) Enter the object version (OBJ_VER) of the Program definition that contains the Source Code definition.
Parent topic: Create and Modify Source Code
Modify Source Code
Use this API to modify a Source Code definition or instance. You can modify the name and description. If you are modifying a Source Code instance, you can also change the 3 REF attribute values to select a different source definition.
Name
CDR_PUB_DF_SOURCECODE.ModifySourceCodeDetails
Signature
PROCEDURE MODIFYSOURCECODEDETAILS( 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_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_VERSION_OBJ_TYPE. Enter values to identify the Source Code definition or
instance and enter new values for the attributes you want to modify.
You can change the name or description for either the definition or instance. For an instance you can also change to a different underlying source definition by entering values for the new definition in the three REF attributes.
Note:
Neither Source Code definitions nor instances can have a validation status or a version label. All attributes are required. - PI_CDRSCOBJTYPE (Mandatory) This is a parameter of table type
CDR_SRCCODE_OBJ_TYPE that contains object attributes specific to Source Code definitions.
If you are modifying a Source Code definition, enter values to identify the definition and enter new values for the attributes you want to modify.
You can modify SHAREABLE_FLAG_RC, ORACLE_PACKAGE_NAME, and ORACLE_PROCEDURE_NAME. All attributes are required.
- PIO_CDRSCREFOBJTYPE (Mandatory) This is a parameter of table type
CDR_SRCCODE_REF_OBJ_TYPE that contains object attributes specific to Source Code
instances.
If you are modifying a Source Code instance, enter values to identify the instance and enter new values for the attributes you want to modify. You can modify PRIMARY_FLAG_RC and FILEREF. All attributes are required.
- 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 in your source code 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. Enter CLOB if the source code file is a character large object.
Parent topic: Create and Modify Source Code
Set the Primary Flag to Yes
Use this API to set the Primary Flag attribute of a specified Source Code instance to Yes. If any other Source Code instance in the parent Program is currently set to Yes, the API resets its flag to No.
Name
CDR_PUB_DF_SOURCECODE.SetPrimaryFlagRC
Signature
PROCEDURE SETPRIMARYFLAGRC( 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_CDRSCREFBASEOBJTYPE IN CDR_BASE_OBJ_TYPE );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
PI_CDRSCREFBASEOBJTYPE (Mandatory) This is a parameter of table type CDR_BASE_OBJ_TYPE. Enter values to identify the Source Code instance whose PRIMARY_FLAG_RC you want to set to $YESNO$YES.
The following attributes are required: COMPANY_ID,OBJ_ID,OBJ_VER,OBJECT_VERSION_NUMBER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.
Parent topic: Create and Modify Source Code
Update a Shareable Flag
Use this API to set the Shearable attribute for a Source Code definition.
Name
CDR_PUB_DF_SOURCECODE.UpdateShareableFlagRC
Signature
PROCEDURE UPDATESHAREABLEFLAGRC( 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_CDRSCBASEOBJTYPE IN OUT CDR_BASE_OBJ_TYPE, PI_CHANGESTATUSTO IN VARCHAR2 );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PI_CDRSCBASEOBJTYPE (Mandatory) This is a parameter of table type
CDR_BASE_OBJ_TYPE. Enter values to identify the Source Code definition that you want to
make sharable or not sharable.
The following attributes are required: COMPANY_ID,OBJ_ID,OBJ_VER,OBJECT_VERSION_NUMBER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.
- PI_CHANGESTATUSTO (Mandatory) Enter SET to set the SHAREABLE_FLAG_RC to $YESNO$YES or RESET to set the SHAREABLE_FLAG_RC to '$YESNO$NO'.
Parent topic: Create and Modify Source Code
Remove a Source Code Object
Use this API to remove one or more Source Code definitions or instances.
Name
CDR_PUB_DF_SOURCECODE.RemoveSourceCode
Signature
PROCEDURE REMOVESOURCECODE( 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_CDRBASEOBJCOLL IN OUT CDR_BASE_OBJ_COLL );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
PIO_CDRBASEOBJCOLL (Mandatory) This is a collection of CDR_BASE_OBJ_TYPEs.
For each Source Code that you want to remove, initialize a CDR_BASE_OBJ_TYPE and then extend the collection. The following attributes are required: COMPANY_ID,OBJ_ID,OBJ_VER,OBJECT_VERSION_NUMBER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.
Parent topic: Create and Modify Source Code