OpenPY

The OpenPY verb opens the specified .py? file. Execution of the remaining MDL script continues after the file is opened.

The question mark in the extension .py? is replaced by the character that is used in your release of Cognos® Transformer, such as .pyj.

You can only open one model at a time. Any model that was open before the OpenPY command is issued will be closed without being saved.

To save an open model, you must use the SaveMDL or SavePY command before the OpenMPY command.

The user interface equivalent is the Open dialog box, where you can select Model files (*.py? and *.mdl).

The syntax is as follows:

OpenPY filename

Argument

Description

OpenPY filename

Specifies the file name, including path if desired, for the current model. The file name should have the extension .py?, where ? is dependent on your version of Cognos Transformer.

Example

This example opens Model.pyj in the root directory of the c: drive and saves it as an .mdl file.

OpenPY "C:\Model.pyj" SaveMDL "C:\Model.mdl"