Using XRef Evaluation

This section covers the following topics:


Before You Start

XRef Evaluation is an optional plug-in unit for Natural Studio. Therefore, before any action can be taken, XRef Evaluation must be activated in your Plug-In Manager and the generation of cross-reference data must be enabled.

The following topics are covered below:

Enabling the Usage of Plug-ins

So that you can use the XRef Evaluation plug-in, you must first enable the usage of plug-ins in the Options dialog. Once enabled, the Plug-in Manager is automatically active each time you start Natural.

Start of instruction setTo enable the usage of plug-ins

  1. From the Tools menu, choose Options.

    The Options dialog box appears.

  2. Make sure that the Workspace tab is shown.

    Note:
    If you have previously disabled success and delete messages, the corresponding check boxes are not selected.

  3. Make sure that the Enable plug-ins check box is selected.

  4. Choose the OK.

    The Tools -> Configuration Tools -> Plug-in Manager menu command and the corresponding toolbar button are now available. When the usage of plug-ins is not enabled, this menu command and toolbar button are not shown.

Activating the XRef Evaluation Plug-in

The XRef Evaluation plug-in is not active by default.

When the Plug-in Manager has been enabled, you can activate the XRef Evaluation plug-in. Two types of activation mode are available:

  • Automatic
    XRef Evaluation is automatically activated each time Natural is started.

  • Manual
    XRef Evaluation must be activated manually on demand (default).

Start of instruction setTo activate the XRef Evaluation plug-in

  1. From the Tools menu, choose Configuration Tools -> Plug-in Manager.

    Or:
    Click the corresponding toolbar button.

    The Plug-in Manager window appears.

  2. Select the XRef Evaluation entry.

  3. Click the right mouse button and from the resulting context menu, choose Activation mode -> Automatic.

    This does not automatically activate XRef Evaluation for the current session. To activate it, you can either restart Natural or proceed as described with the next step.

  4. Click the right mouse button while XRef Evaluation is still selected and from the resulting context menu, choose Activate. When activated, the XRef Evaluation toolbar is automatically provided.

    For details, see the section Invoking XRef Evaluation Commands.

    Note:
    If you want to deactivate the XRef Evaluation toolbar, choose Customize from the Tools menu.

For detailed information, see the section Plug-In Manager in the Natural documentation.

Activating the Generation of Cross-Reference Data

Whether the generation of cross-reference data is activated by default depends on the settings of the Natural parameter module and the environment you are currently connected to.

Start of instruction setTo activate the generation of cross-reference data

  1. From the Tools menu, choose Configuration Tools -> XRef Generation.

    The XREF - XRef Generation dialog box appears.

  2. Make sure that the On option is selected.

  3. Choose theOK button.

    A message appears indicating that XRef mode is now set to "On".

  4. Choose theOK button.

    Cross-reference data will from now on be generated when you catalog an object.

Resulting Interface Changes

Once XRef Evaluation has been activated, your Natural Studio interface will be changed in the following way:

  • the Tools menu will display the relevant XRef Evaluation commands,

  • a toolbar will be available for the commands most frequently used in cross-reference analysis,

  • context menu commands for cross-reference analysis will be available,

  • the XRef Evaluation tab will be available in the Options dialog (Tools -> Options).

The command availability depends on your working context.

General Information

This section covers the following topics:

XRef Evaluation Options

Choose the menu command Tools -> Options to display the Options dialog. In the dialog window which will be displayed, choose the XRef Evaluation tab and choose the settings you prefer. The following options can be specified:

Language

You can specify which language setting will be used for your cross-reference analysis:

  • Runtime language setting for your remote environment, or

  • Natural Studio language setting

Note:
You can change the Natural Studio language setting using the profile parameter ULANG.

Filter

In order to always use filters during your cross-reference analysis, this option must be set to On. You can also switch the option on and off using the Filter button in the XRef Evaluation toolbar. For details about filtering, see the section Using Filters.

Expansion of Recursive Nodes

You can specify how recursive nodes in your XRef Evaluation output will be treated.

If you choose Expandable, all levels of recursion can be displayed when manually expanding a node.

If you choose Not expandable, only the first level below a recursive node can be displayed. Selecting and choosing the node will not expand it.

Note:
The automatic Expand All function is deliberately not available for recursive nodes.

Refresh

If Refresh is enabled, your XRef Evaluation output will be refreshed if changes were made to objects in the same environment. Enabling Refresh may result in a reduction of performance.

If Refresh is disabled, your XRef Evaluation output will remain static, not reflecting changes that may have been made in the meantime.

Suppress Warnings

This option enables or disables the display of XRef Evaluation warnings in message boxes and the result view.

By default the checkbox is empty, since typically users should be informed about all potentially harmful situations. However, if for some data a large amount of uniform warnings is issued, users may desire to suppress their display by checking the box Suppress Warnings.

All other XRef Evaluation messages except warnings are still displayed if this option is activated.

Show Documentation Name

This option enables or disables the display of Predict documentation names.

If this option is enabled and a Predict documentation name has been assigned to a referenced or referencing object, then the Predict documentation name will be visible in the tree or list view when the object is displayed.

Analysis Result Output

If you execute an XRef Evaluation command, the results will be displayed in a cross-reference view. A cross-reference view is an output window, either in the form of a tree or a list.

A "tree view" displays cross-reference information in hierarchical form. You can easily navigate between the objects and references of interest by collapsing or expanding the relevant nodes. At the top of each tree, a Cross-reference Analysis Configuration node is displayed, listing important parameters relevant for this analysis.

A "list view" displays additional information in non-hierarchical form. In list views, you can select more than one object for further processing.

For information on how to print the information displayed in a tree view or list view, refer to the section Printing Views in the Natural for Windows documentation.

The evaluation result displayed in a cross-reference view depends on the parameters you specified, for example the logon library, steplib settings and language code that are active when the analysis is started. For that reason, the results of the same XRef data retrieval can vary due to different environmental or user-specific settings.

For example, if you switch to a different logon library while XRef Evaluation processes an analysis, the presented result will always refer to the library that was active when you started your evaluation. This may lead to different results if you start the same analysis on the same object, but with a different logon library.

Using Filters

Using filters, you can influence the scope of your cross-reference analysis. It may be useful to specify filter options, if you want to focus the result output on a particular range of interest.

If filtering is switched on and the filter functionality is available, whenever you perform the XRef Evaluation command Active Cross-references or Passive Cross-references, a dialog will be displayed before the command is executed. In this dialog, you can specify a variety of filtering conditions for the cross-reference analysis you want to perform.

If you select a particular object or set of objects as source object(s) for your cross-reference evaluation, the Filter dialog will offer only the choices for the target object.

If you select a library as source object for your cross-reference evaluation, the dialog will offer choices for both the source and the target object. The source object side of a Filter dialog might look as follows:

Start of instruction setTo specify filtering attributes

  1. Place the cursor in the desired attribute line to select the attribute.

    The Value selection box above the table will be highlighted.

  2. In the Value selection box, enter or select the value you want to use for filtering.

    Your entry will be displayed in the Value field in the attribute line.

  3. Repeat this for as many attributes you want to specify, for both source object and target object.

  4. On the target side select the All Levels check box, if you want to apply the filter criteria for more than one level in your analysis output.

  5. Choose OK.

If an attribute was chosen which does not belong to the selected object type, the selection has no effect.

Invoking XRef Evaluation Commands

Start of instruction setTo invoke XRef Evaluation commands from the main menu

  1. Select an application, a library or an object within a library.

  2. From the main menu, choose Tools -> Development Tools -> XRef Evaluation.

The available commands are described in detail in the section XRef Evaluation Functions.

Start of instruction setTo invoke XRef Evaluation commands using toolbar buttons

  • You can also use one of the following buttons:

    graphics/xrefbuta.gif

    to display active cross-references for selected objects.

    graphics/xrefbutp.gif

    to display passive cross-references for selected objects.

    graphics/filter_but.gif

    to enable or disable filtering.

    graphics/str_but.gif

    to specify a library structure.

Start of instruction setTo invoke XRef Evaluation commands using context menus

  1. Select an application, a library or one or more objects within a library.

  2. Right click on your selection to display the context menu.

  3. Select the command you want to execute.

The context menus vary depending on the object of interest.

XRef Evaluation Functions

The following XRef Evaluation commands are available:

Active Cross-References

If you select active cross-references of an object, XRef Evaluation generates a tree view with the referencing ("using") object (for example a program) below the configuration node in the tree view. Below this object, all objects which are referenced ("used") by the top level object are shown (for example other programs, subprograms or subroutines).

This command is available for selected objects in the Tools menu, in a context menu and using the relevant toolbar button.

Passive Cross-References

If you select passive cross-references of an object, XRef Evaluation generates a tree view with the referenced ("used") object below the configuration node in the tree view. Below this object, all objects which reference ("use") the top level object are shown.

This command is available for selected objects in the Tools menu, in a context menu and using the relevant toolbar button.

Note:
XRef Evaluation for DDMs in Windows or UNIX environments is only available, if the Natural parameter FDDM is specified.

Unresolved Cross-References

This command is available for the selected library in the Tools menu and in a context menu.

When you execute Unresolved Cross-References, a passive cross-reference tree view displays the node Unresolved references. Expanding this node and all levels further down, you can display all objects in the current logon library which have unresolved references including their passive cross-references.

Error Numbers Without Text

This command is available for the selected object(s) in the Tools menu and in a context menu.

The menu item Not referenced offers the following cascading menu options:

Objects Not Referenced

When you execute Objects not referenced, a list view will display all objects in the current logon library which are not referenced by any other object in this library.

Variables Not Referenced

When you execute Variables not referenced, a list view will display all variables specified in Data Areas in the current logon library which are not referenced by any object in this library.

Error Numbers Not Referenced

When you execute Error numbers not referenced, a list view will display all error messages in the current logon library which are not referenced by any object in this library.

Referenced, but not linked

This command is available for your selected object of type Application in the Tools menu and in a context menu.

When you execute Referenced, but not linked, a list view will display all objects which are referenced by the application for which you started the analysis, but not linked to the application. If you selected more than one application for the analysis, a separate list view is opened for each selected application.

Linked but not referenced

This command is available for your selected Application in the Tools menu and in a context menu.

When you execute Linked, but not referenced, a list view will display all objects which are linked to the current application, but are not referenced by any objects linked to this application.

Link to Application

This command is available in the Tools menu or in a context menu for objects selected in a cross-reference view. It is available only for objects in an application context, which are referenced by the object(s) for which you started the analysis, but not linked to the currently active application

When you execute Link to Application, all objects which are referenced by the object(s) for which you started the analysis, but not linked to the currently active application will automatically be linked to the application.

For example, if you execute the command Referenced, but not linked, the result will be displayed in a cross-reference view. Using the command Link Application for one or more objects listed in this view, you can easily link all objects to the application that are required for cataloging or runtime processing.

List Children

This command is available in a context menu for nodes selected in a cross-reference view.

The result of the List Children command is a list view of the children of the selected node.

In contrast to the tree view, you can select more than just one object within the list view and perform an action such as Catalog or Stow. This is very helpful when performing mass updates is necessary.

Select Library Structure

This command is available in the Tools menu and as a toolbar button.

The function Select Library Structure allows you to specify a library structure for your cross-reference analysis. In the Select Library Structure dialog you can select the name of the structure, then all libraries defined in the steplib structure will be displayed with their name, database ID and file number.