Introduction

The Natural Construct component for NaturalONE provides access from Eclipse to Natural Construct on the server. This access includes the modeling functionality in the SYSCST library, as well as Eclipse wizards corresponding to a subset of the most common Natural Construct models in your server installation. The Eclipse wizards collect the model specifications and pass this information to the Natural server to generate the code, which is then returned to the local project that was selected as the target on a wizard panel.

This type of code generation is different from the local, non-server based generation implemented using Velocity templates (for example, REQUEST-DOCUMENT Client, Object Maint, Object Browse, and Object Skeleton; see Using the Code Generation Component). The Natural Construct component allows you to use Natural Construct models on the server in NaturalONE, as well as create Eclipse wizards for them (including customized ones).

Note:
To install the Natural Construct component for NaturalONE, Designer > NaturalONE > Natural Construct must be selected in the installation tree for the installer. NaturalONE > Natural Construct is selected by default when you select Designer in the installation tree.

This section covers the following topics:


Supplied Client Generation Wizards

The Natural Construct component for NaturalONE supplies client generation wizards for the following Natural Construct models on the server:

Model Generates For Information
BATCH Batch programs can be generated for large volumes of output, routed to a printer or a terminal. Batch Wizard
BROWSE Browse program that reads a file in logical order and displays record values on the screen. Browse/Browse-Select Wizards
BROWSE-SELECT Browse-select program that reads a file in logical order, displays record values on the screen, and allows the user to specify which set of commands are executed. Browse/Browse-Select Wizards
BROWSE-SELECT-HELPR Browse-select helproutine that enables the user to select a field value from a list of valid values. Browse/Browse-Select Wizards
BROWSE-SELECT-SUBP Browse-select subprogram that is invoked as a sub-function of another program. For example, you can use a browse-select subprogram to perform the Browse action for a maintenance program, in which case, the maintenance program invokes the subprogram without disturbing the current state of the panel. Browse/Browse-Select Wizards
BROWSE-SUBP Browse subprogram that is invoked as a sub-function of another program. Browse/Browse-Select Wizards
DRIVER Driver program that executes a helproutine or subprogram for testing purposes. Driver Wizard
MAINT Maintenance program that maintains a file using a unique key and, optionally, a related secondary file. The Maint wizard generates the code necessary to scroll through the MU/PE fields of a primary file or the records of a secondary file. Maint Wizard
MENU Menu program that presents users with several choices in the form of a menu. The user enters a code for one of the choices to invoke a predefined function. Menu Wizard
OBJECT-BROWSE-DIALOG Object-browse dialog component of an object-maintenance process that works with the object-browse subprogram to provide the browse functionality for a Natural object. Object-Browse-Dialog Wizard
OBJECT-BROWSE-SELECT-SUBP Object-browse-select subprogram and corresponding parameter data areas that provide the browse functionality for a Natural object. This model is similar to the OBJECT-BROWSE-SUBP model, except the generated object-browse-select subprogram can accommodate a client/server environment and a subprogram proxy can be used to access the generated code as a business service. Object-Browse-Select-Subp Wizard
OBJECT-BROWSE-SUBP Object-browse subprogram and corresponding parameter data areas that provide the browse functionality for a Natural object. Object-Browse-Subp Wizard
OBJECT-MAINT-DIALOG Object-maintenance dialog component of an object-maintenance process. The dialog component (Natural program) communicates with the user and invokes methods (data actions) implemented by the object-maintenance subprogram. Object-Maint-Dialog Wizard
OBJECT-MAINT-ENHANCED-SUBP Object-maintenance subprogram and corresponding parameter data areas that update all entities within a Natural object. Similar to the Object-Maint-Subp wizard, the main difference between these wizards is that the Object-Maint-Enhanced-Subp wizard will generate large fields in the object PDA as dynamic fields. Object-Maint-Enhanced-Subp Wizard
OBJECT-MAINT-SUBP Object-maintenance subprogram and corresponding parameter data areas that update all entities within a Natural object. Object-Maint-Subp Wizard
QUIT Quit program that releases resources used by an application. It displays a confirmation window that overlays the host panel and gives users the option of quitting an application entirely or resuming where they left off. Quit Wizard
STARTUP Startup program (often named Menu) that initializes global variables and invokes the main menu program. Startup Wizard

Requirements

To use the Natural Construct code generation features in NaturalONE, the following requirements must be met:

  • Your NaturalONE environment must be mapped to a server in the Natural Server view that contains a version of Natural Construct 5.3, service pack 8 or higher.

  • Projects in your workspace must be connected to the server containing Natural Construct; projects mapped to the local Natural runtime environment cannot be used to generate Natural Construct modules.

    The target Natural project must be configured to a remote environment. If you select a Natural project that is mapped to a local environment, an error will be displayed. When you change the target project to a valid remote project, the clear subprogram will be called using the connection settings for the valid project.

  • The Natural >Runtime setting in the Properties window for the project must point to the Natural Server connection containing the Natural Construct installation. For example:

    graphics/natural-runtime-properties.png

Perform Standard Actions on Natural Construct Resources

You can use the Natural Server view to copy/paste, delete, or move Natural Construct resources on the server. The action will be performed in the mapped environment for the selected node(s).

This section covers the following topics:

Perform Actions on Code Frames

Start of instruction setTo perform actions on one or more code frames

  1. Open the context menu for the code frame(s) in the Natural Server view.

    For example:

    graphics/code-frame-context-menu.png

  2. Select one of the actions listed.

    The available actions are:

    Action Description
    Move Removes the selected code frame(s) from the current mapped environment and adds it to a target mapped environment. For information, see Move a Code Frame.
    Copy Copies the selected code frame(s) to the clipboard in anticipation of a Paste action. For information, see Copy a Code Frame.
    Delete Removes the selected code frame(s) from the current mapped environment. For information, see Delete a Code Frame.

Move a Code Frame

This section describes how to move one or more code frame(s) from the current mapped environment to a target mapped environment.

Note:
A code frame cannot be moved within the same mapped environment.

Start of instruction setTo move one or more code frames

  1. Open the context menu for the code frame(s) in the Natural Server view.

  2. Select Move.

    The Move Objects window is displayed. For example:

    graphics/move-objects-window-code-frame.png

    This window lists the connection nodes for the available mapped environments.

  3. Expand the connection node for the environment into which you want to move the code frame(s).

  4. Select the Construct or Code-Frames root node.

  5. Select OK.

    A progress window is displayed while the code frame(s) is removed from the current mapped environment and copied to the target mapped environment.

Copy a Code Frame

This section describes how to copy one or more code frames to the clipboard and then paste the frame(s) into a target mapped environment.

Start of instruction setTo copy one or more code frames

  1. Open the context menu for the code frame(s) in the Natural Server view.

  2. Select Copy.

  3. Open the context menu for the Construct or Code-Frames root node into which you want to copy the code frame(s).

  4. Select Paste.

    The frame(s) is copied to the target mapped environment.

Delete a Code Frame

This section describes how to remove one or more code frames from the current mapped environment.

Start of instruction setTo delete one or more code frames

  1. Open the context menu for the code frame(s) in the Natural Server view.

  2. Select Delete.

    A confirmation window is displayed to confirm the action.

  3. Select Yes.

    The frame(s) is removed from the current mapped environment.

Perform Actions on Models

Start of instruction setTo perform actions on one or more Natural Construct models

  1. Open the context menu for the model(s) in the Natural Server view.

    For example:

    graphics/cst-model-context-menu.png

  2. Select one of the actions listed.

    The available actions are:

    Action Description
    Move Removes the selected Construct model from the current mapped environment and adds it to a target mapped environment. For information, see Move a Construct Model.
    Copy Copies the selected model(s) to the clipboard in anticipation of a Paste action. For information, see Copy a Construct Model.
    Delete Removes the selected model(s) from the current mapped environment. For information, see Delete a Construct Model.

Move a Construct Model

This section describes how to move one or more model(s) from the Models root node in the current mapped environment to a target mapped environment.

Note:
A Construct model cannot be moved within the same mapped environment.

Start of instruction setTo move one or more Construct models

  1. Open the context menu for the model(s) in the Natural Server view.

  2. Select Move.

    The Move Objects window is displayed. For example:

    graphics/move-objects-window-model.png

    This window lists the connection nodes for the available mapped environments.

  3. Expand the connection node for the environment into which you want to move the model(s).

  4. Select the Construct or Models root node into which you want to move the model(s).

  5. Select OK.

    A progress window is displayed while the model(s) is removed from the current mapped environment and copied to the target mapped environment.

Copy a Construct Model

This section describes how to copy one or more models to the clipboard and then paste the model(s) into a target mapped environment.

Start of instruction setTo copy one or more Construct models

  1. Open the context menu for the model(s) in the Natural Server view.

  2. Select Copy.

  3. Open the context menu for the Construct or Models root node into which you want to copy the model(s).

  4. Select Paste.

    The model(s) is copied to the target mapped environment.

Delete a Construct Model

This section describes how to remove one or more models from the current domain.

Start of instruction setTo delete one or more Construct models

  1. Open the context menu for the model(s) in the Natural Server view.

  2. Select Delete.

    A confirmation window is displayed to confirm the action.

  3. Select Yes.

    The model(s) is removed from the current mapped environment.

Use the Dependencies View

When a Construct resource (for example, a Construct model, code frame, etc.) is open in the editor, the Dependencies view displays dependencies between that resource and other Construct resources and/or Natural resources. This section describes the child nodes contributed to the view by the Construct-related resources. The following topics are covered:

Notes:

  1. Select graphics/sort-alphabetically-icon.png to sort the resources alphabetically.
  2. Select graphics/dependencies-view-export-icon.png to export a textual representation of the visible nodes in the view to a file.
  3. When a supporting resource cannot be found locally using the project steplib chain and project references, "<Unknown>" is displayed with the name of the resource (see above). If the unknown module(s) is not shipped with the Construct runtime project, either manually download it from the server or create it locally. If the module(s) is shipped with the Construct runtime project, add the project. For information, see Add the Construct Runtime Project.
  4. For more information about the Dependencies view, see the description of the source editor in Using NaturalONE.

Construct Resources

When a Construct resource is open in the editor, the root node displays the name of the resource. In caller mode (graphics/caller-mode-icon.png), child nodes are contributed to the Dependencies view for each resource that depends on that Construct resource. For example, when a code frame is open in the editor, the child nodes display any Construct models or other code frames that depend on that code frame:

graphics/dependencies-view-construct-resource-caller-mode.png

In this example, three Construct models (BROWSE-SUBP, BROWSE-HELPR, and BROWSE) depend on the CSCA8 code frame.

In callee mode (graphics/callee-mode-icon.png), Construct and Natural nodes are contributed to the view for each resource the Construct resource depends on. For example, when a Construct model is open in the editor, the child nodes will display any code frames, PDAs, subprograms and Construct models that this model depends on. For example:

graphics/dependencies-view-construct-resource-callee-mode.png

In this example, the Construct model named BROWSE depends on two code frames (CSCC9 and CSCA8), a PDA named CUSCPDA in the C53 library and many subprograms.

Related Natural Resources

When a Natural subprogram is open in the editor, the root node displays the name of the subprogram, as well as the name of the library in which it is located. In caller mode (graphics/caller-mode-icon.png), child nodes are contributed to the Dependencies view for each Construct-related resource that depends on this subprogram (such as a Construct model, code frames, etc.). For example:

graphics/dependencies-view-subprogram-caller-mode.png

In callee mode (graphics/callee-mode-icon.png), a Construct model node is contributed to the view if the subprogram was generated by a Construct model. For example:

graphics/dependencies-view-subprogram-callee-mode.png