CognosPackageAdd
CognosPackageAdd
verb creates
a package or report data source definition in the model. The package
or report definition is a reference to a package or report that is
defined in IBM® Cognos®. You can then create a data source
definition that has columns based on items that are selected from
the package or report.
If you include a data source ID for the new package or report in the syntax, and the object already exists, you will receive an error message.
To insert a dimension from a package (the Insert Dimension From Package command on the Edit menu), you must first add the package and data source and then add a dimension from the data source. For more information about adding a dimension from a data source, see DimAdd.
The syntax for a query based on an IBM Cognos package or report is as follows:
CognosPackageAdd objDataSource [cognospackage_opts]
Argument |
Description |
---|---|
CognosPackageAdd objDataSource |
Creates the data source objDataSource. objDataSource must be the object name and can include the object identifier. |
cognospackage_opts |
Optional parameters that can describe the package or report in greater detail. For the complete list of options, see cognospackageopts. |
Example
This example adds the IBM Cognos package data source Go Sales and Retailers to the model.
CognosPackageAdd 103 "GO Sales and Retailers" SourceType Package
SourcePath "/content/package[@name='GO Sales and Retailers']"
PackageTimeStamp "/content/package[@name='GO Sales and Retailers']
/model[@name='model']"
This example adds the IBM Cognos report database GSR_rpt_1 to the model.
CognosPackageAdd 115 "GSR_rpt_1" SourceType Report SourcePath "
/content/package[@name='GO Sales and Retailers']/report[@name='GSR_rpt_1']
"PackageTimeStamp"/content/package[@name='GO Sales and Retailers']
/report[@name='GSR_rpt_1']"