CognosPackageMake

The CognosPackageMake verb creates a package or report data source definition in the model. If one already exists, it is updated. If one does not exist, it is added. 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 which has columns based on items that are selected from the package or report.
Note: 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:

CognosPackageMake objDataSource [cognospackage_opts]

Argument

Description

CognosPackageMake 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.

CognosPackageMake 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 data base GSR_rpt_1 to the model.

CognosPackageMake 115 "GSR_rpt_1" SourceType Report SourcePath
"/content/package[@name='GO Sales and Retailers']/report[@name='GSR_rpt_1']" 
PackageTimeStamp 
"/content/package[@name='GOSales and Retailers']/report[@name='GSR_rpt_1']"