Rational Programming Patterns

Design Explorer view

With the Design Explorer view, you can view and modify the design of your applications. You can work on the instances which constitute these applications: create, modify, import, or export instances, search for references, generate instances, and so on.

Here is what the Design Explorer view looks like, if you select Folders (entities) as the top-level elements in the tree.
Figure 1. Design Explorer view displaying the entities as the top-level elements
Design Explorer view
The Design Explorer view contains trees.

Creating locations or instances

If you right-click an open location, any entity or instance, you can:
  • Create a location (New > Location).
  • Create instances (New > Data Element, or New > Program... for example, or any other entity available).
    From the creation wizard, you can also create a derived instance of a Program, Screen, Data Structure, or Dialog instance by selecting Derive. This instance, which points to a reference instance, does not contain any design. According to the selected derivation type, you can:
    • Generate the reference instance from another Library without duplicating its design.
    • Generate the complete source code (the generated code and the specific code) of the reference instance. The complete source of the reference instance then becomes the generated code in the derived instance and this generated code is reconciled with the specific code of the derived instance.

Viewing and modifying the design build path of the location

This path is the hierarchy of the projects which is explored in an upward direction in order to resolve the dynamic links and references between the instances contained in the various projects of the current location.

To view and modify this path, right-click an open location and select Properties.

Importing and exporting, copying, and pasting instances

If you right-click an open location, any entity, or instance, you can:
  • Import/export a set of instances, grouped in a file.
  • Copy and paste instances, or delete instances.

Sharing selected elements

You can populate the Design Explorer view with the content of a Rational Team Concert server. To limit the number of the loaded artifacts, you can load only the artifacts required by one or more artifacts that you select.

However the folder structure loaded in this way does not have a "shared" status. If you create or generate instances in projects loaded in this way, you must share them explicitly here.

To do so, select the instances or the COBOL files to be shared, right-click, and select Team > Share selected elements. The newly created files are ready to be uploaded to the Rational Team Concert server.

For explanations, see Loading the local workspace.

Rebuilding your workspace

If you right-click an open location, any entity, or instance, you can:
  • Rebuild your workspace, to make sure that it is consistent. All the files and projects contained in your workspace are opened. If the files contain instances, they are parsed and repaired. The existence of the instances, their references, links to keywords... are checked and updated if necessary.
  • Rebuild the mapping between the designs and the generated files.

Opening, renaming, moving, comparing an instance

If you right-click an instance (whatever the entity), you can:
  • Open it. The instance is then displayed in its dedicated PDP editor.
  • Open it with various editors.
    • The first editor is the design editor dedicated to the entity. It is the default editor.
    • Three other editors are also available by default: text editor, system editor, and in-place editor. You can also add other editors in your preferences, accessed from the Window menu, Preferences > General > Editors > File Associations.
  • Refactor the instance. You can:
    • Rename the instance. The new name is automatically propagated to all the instance links (references, keywords, instance calls, lists for example). Renaming an instance this way avoids consistency errors.
    • Move one or more selected instances to another existing project while keeping all their links (references, keywords, and instance calls for example).
You can also open the comparison editor on PDP instances by selecting Compare in the contextual menu. You can compare:
  • Two or three instances with each other
  • Two or three versions of the same instance. These versions can be selected from the local history or from a version stored in the remote repository.
Note: A three-way comparison is possible only if you declare one of the instances or versions as the common ancestor.
In the compare editor which is displayed in the editor area, you can browse through the differences. To activate the buttons with which you can copy these differences, double-click the differences in the comparison editor.

Searching for instances or for their references

You can search for:
  • Instances by clicking Search in the toolbar, selecting the Search menu, and opening the Design search tab.
  • The instance references by right-clicking the instance (whatever the entity) and selecting this choice. You can search for its super references (the instances in which it is called), or its subreferences (the instances it calls). Selecting one of these choices makes you switch to the References view, where the search results are displayed.

    You can also search for the subreferences of a COBOL generated file (.cbl file nested under a Program, Screen, or Server) or of a map description file for a Screen (.map, .bms or .mfs). The instances involved in the file generation will be automatically displayed in the References view.

  • The Program, Screen, or Server instances that call a Macro. To do so, right-click a Macro and select . References > Macro cross-references. All the instances that call the Macro in the local project are then displayed in the Macro cross-references view, with the list of the parameters and their values, in a read-only mode.

Possible generation types

You can generate the following elements:
  • The design of a selected Program, Screen, or Server by right-clicking an instance and selecting Generate > Program (Screen or Server) generation. This generation produces a .cbl file, nested under the instance in the Design Explorer view. Right-click it and select Open with > PDP COBOL editor to access the COBOL editor and views. You can then work on the code and the design of the instance.
  • The design of a selected Database Block. To do so, right-click a Database Block and select Generate > Database Block generation. You can then indicate where the generation result file (a .txt file) is to be located.
  • The error messages of your applications. You generate the:
    • Batch error messages if you select Generate > Error messages generation from a Data Structure (entity or instance level)
    • Online error messages if you select Generate > Generation of associated error messages from a selected Dialog or Screen
    This generation produces a .txt file which you must integrate into the error messages file used by the applications
  • The COBOL descriptions of Data Structures in a file (Copybook) if you select Generate > Copybook generation from a Data Structure (entity or instance level).

    This file is then available for a subsequent insertion, through the use of the COPY statement.

    A single Data Structure can be used to generate several descriptions, each one adapted to a particular need. (in the FILE SECTION or the WORKING-STORAGE SECTION, taking the internal and input formats into account).

    This generation produces a .cpy file. To see its content, right-click this file and select Open with > COBOL editor.

  • The files which are to contain the code lines of one or more Macros if you select Generate > cblmsp generation from a location, or on a Macro (entity or instance level). You must select this choice if you want to perform one of the following actions:
    • Enter the code lines of a Macro and if they do not exist yet.
    • Overwrite the existing code lines of a Macro. These code lines were either entered in Pacbase and imported with the dispatch function, or directly entered in Rational Programming Patterns. If the code lines of the Macro exist, a message warns you that the content of the .cblmsp file is to be reinitialized.
    This generation produces .cblmsp files. To open one of these files, right-click it and select Open with and the appropriate model. You access the .cblmsp editor and the Macro tags tree view, in which you can enter the Macro code lines.
Note: For the instances imported from Pacbase, the skeleton language of the local generation is identical to the Pacbase skeleton language. This piece of information is retrieved from the extraction of the Pacbase models and from the import. It is stored on the Library and applies to all the generatable entities of the Library (Program, Dialog, Screen, Server Dialog, Server, Database Block, Data Structure).

Dispatching Macros

The dispatch Macro choice is accessed by right-clicking anywhere in a location.

You select it if Macros exist in Pacbase and if the file produced by the Macro migration batch procedure contains the code of more than one Macro.

When Macros are dispatched, one .cblmsp file is automatically created for each Macro included in the Pacbase generated file.

You can right-click one of these cblmsp files and select Open with > PDP Macro editor. Then you access the Macro tags tree and the Macro editor, in which you can view and modify the Macro code.

If errors occurred during the dispatch, you can consult the error file .pacdispatchmacro.log in the .metadata folder of your workspace.

Using the migration help

The migration help choice is available from the Program, Screen, or Server instance level.

This function is useful when you migrate the code generated in Pacbase to Rational Programming Patterns. It sets warnings on the lines which are generated from the design wherever it detects differences between the code generated in Pacbase and the locally generated code.

Locking an instance

The Lock choice is accessed by right-clicking a generated COBOL instance (.cbl file), and selecting Team > Lock. This choice is available only if the instance is on the connected server.

The toolbar

The Design Explorer view has its own toolbar, from which you can perform the following actions:
  • Collapse All (Collapse all icon). This command collapses all the tree nodes in the Design Explorer view
  • Refresh (Refresh icon). This command refreshes the workspace after updates.
  • Link with Editor (Link with editor icon). This command links the active editor to its corresponding design instance or COBOL file in the tree of the Design Explorer view. If this option is selected, changing the active editor updates the selection in the tree to the design instance or to the COBOL file being edited. Changing the selection in the tree also automatically selects the corresponding design or COBOL editor, if it is active.
  • Change the sort and display of instances in the Design Explorer view. Click the white upside-down triangle icon (View menu) and select:
    • Top-level elements to indicate which element type is to constitute the top of the hierarchy in each location tree: folders (default value, represented by the entity types), projects, or packages (irrelevant for the maintenance of a Pacbase application).
    • Sort to specify a new sort criterion.
    • Display to display additional information for each instance line in the tree: To remove some of the selected information from the line, select it again in the menu.
    • Filters to reduce the amount of data displayed in the view. If you select this choice, the Design Filters wizard opens up where you can specify your parameters.
      The active filter is displayed in the menu, above the Filters choice, and it can be disabled without changing its definition.
    This new setting is then automatically saved and associated with the Design Explorer view, until you change it again.

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)