Language Reference Guide : 4. System Classes : CompSource Class : ExportComp Method
 
Share this page                  
ExportComp Method
The ExportComp method exports a single procedure or frame to an export file.
This method has the following syntax:
integer = CompSource.ExportComp(filename = varchar(256)
          [, format = integer]
          [, metadata = integer])
This method has the following variable and parameters:
CompSource
Specifies the frame, procedure, or user class that you want to export to the file
filename
(Required) Specifies the name of the file in which you want to place the exported procedure or frame
format
Specifies the format of the export file. Valid format values are:
XF_EXP
Specifies the current export file format
XF_XML
Specifies the XML-based export file format (UTF-8-encoded)
Default: XF_EXP
Descriptions of system constant values and their numeric equivalents are listed in Export Format Settings for AppSource and CompSource.
metadata
Specifies that metadata attributes for the component should be included in the output. Metadata attributes are AlterDate, AlterBy, CreateDate, and Creator. Specifying this parameter is relevant only if format=XF_XML.
You can load the export file into another database by using the ImportApp utility with the -c flag.
The method returns ER_OK if successful, or a non-zero value if there is an error. (Descriptions of system constant values and their numeric equivalents are listed in Error Codes.) This method creates a file in the same way as the ExportApp utility with the -c flag.
For more information about the ImportApp and ExportApp utilities and exporting components to XML, see the Workbench User Guide.