Using the Construct Runtime/Compile Time Modules in Non-Construct Server Environments

To avoid compile errors for Construct-generated modules in the server environment, Natural Construct on the server is delivered with all the required runtime/compile time modules in the SYSTEM library. Since these modules are combined with other modules and products in SYSTEM, the Natural Construct component on the client delivers the required modules in the Construct runtime project. The modules in this project will eliminate compile and parsing errors caused by missing Natural Construct resources and will provide more detailed information in the Dependencies view. This project is available for use by both the client generation wizards and the Construct generation wizards.

If uploading runtime modules to the server causes compile or runtime errors to existing server modules, try regenerating the server modules to incorporate the changes in the uploaded runtime modules. Likewise, if the compilation or execution of generated code results in errors on the server, try rebuilding the Construct runtime project on the server to ensure that you are using the most recent version of this project.

This section covers the following topics:


Add the Construct Runtime Project

When Natural code is generated by a Code Generation wizard, the wizard verifies whether the required runtime/compile-time modules are available in the local environment. If they are not, a window is displayed prompting you to add the Construct runtime project to your workspace. For example:

graphics/download-cst-runtime-project.png

If you select Yes, the project is added to the workspace and referenced from the current project.

You can also add the Construct runtime project to your workspace manually.

Start of instruction setTo add the Construct runtime project manually

  1. Open the context menu for any node in the Project Explorer.

  2. Select Code Generation > Construct Runtime > Add Runtime Project.

    The project is added to the Project Explorer view. For example:

    construct runtime project

The current version of the Construct runtime project is defined in the .construct file. For example:

graphics/construct-runtime-project-in-navigator-view-construct-file.png

Note:
The information in the .construct file is used internally and should not be modified.

The local version information is compared to the version information delivered in the Construct runtime project at startup and during generation and regeneration. If the version has changed on the server, the local project will be updated.

Update the Construct Runtime Project to the Latest Version

This section describes how to update an existing Construct runtime project to the latest version of the project. Updated modules in the shipped version are copied to the workspace (and overwritten when necessary).

Warning:
Any customizations of the Construct runtime project modules will be lost unless you exclude the modules from the update processing. For information, see Exclude Modules from the Update or Replace Process.

Start of instruction setTo update the Construct runtime project to the latest version

  1. Open the context menu for the ConstructRuntime project in the Project Explorer.

  2. Select Code Generation > Construct Runtime > Update to Latest Version.

    Note:
    When the Construct runtime project is updated, the project modules are copied to the SYSTEM library on the FUSER, but when the project is built, the project modules are copied to the SYSTEM library on the FNAT.

Replace the Construct Runtime Project with the Latest Version

This section describes how to replace an existing Construct runtime project with the latest shipped version of the project. All modules in the shipped version are copied to the workspace (and overwritten when necessary).

Warning:
Any customizations of the Construct runtime project modules will be lost unless you exclude the modules from the replace processing. For information, see Exclude Modules from the Update or Replace Process.

Start of instruction setTo replace the Construct runtime project with the latest version

  1. Open the context menu for the ConstructRuntime project in the Project Explorer.

  2. Select Code Generation > Construct Runtime > Replace with Latest Version.

Exclude Modules from the Update or Replace Process

This section describes how to exclude (and subsequently include) Construct runtime project resources from being overwritten during the update or replace process. You can use this functionality to protect changes to these modules from being overwritten during the update or replace process.

Notes:

  1. Excluding a folder automatically excludes all its child folders and files.
  2. You cannot exclude the Construct runtime project itself or the .construct file.

Start of instruction setTo exclude modules in the Construct runtime project from the update or replace processing

  1. Open the context menu for a Construct runtime resource in the Project Explorer.

  2. Select Code Generation > Construct Runtime > Exclude.

    The selected resource is added to the .construct-excludes file in the project. For example:

    construct excludes file

    Excluded resources will never be updated or replaced with the latest shipped version (triggered automatically at startup, generation, regeneration or by selecting the Update to Latest Version or Replace with Latest Version context menu actions).

    Note:
    You can view the .construct-excludes file to determine which resources are currently excluded, but you should never modify the file manually.

Start of instruction setTo include modules in the Construct runtime project update or replace processing

  1. Open the context menu for the excluded Construct runtime resource in the Project Explorer.

  2. Select Code Generation > Construct Runtime > Include.

    The selected resource is removed from the .construct-excludes file and will now be overwritten during an update or replace process.

Add Customized Modules to the Construct Runtime Project

If you have customized any of the required modules on the server, you must add these customizations to the local Construct runtime project. This project is imported from an archived file called ConstructRuntime.zip in the installation folder for the Natural Construct component.

Start of instruction setTo add customized modules to the Construct runtime project

  1. Make a backup copy of the ConstructRuntime.zip file.

  2. Import the ConstructRuntime.zip file into your workspace.

  3. Open the zip file and copy the customized modules into the Construct runtime project.

  4. Export the modified Construct runtime project from your workspace to the ConstructRuntime.zip file.

    Your customizations will overwrite the supplied Construct runtime project in the Natural Construct installation folder.

The customized Construct runtime project now can be used as the basis for loading runtime projects in a customized environment.

Build the Construct Runtime Project in a non-Construct Server Environment

The Construct runtime project allows Construct-generated modules to be compiled in NaturalONE and executed in a non-Construct Natural server environment. If Natural Construct is installed on the server (including the compiled version only), a Construct-generated application can be compiled and/or executed on that server. If Natural Construct is not installed on the server (for example, in a NaturalONE local server environment), a Construct-generated application can be compiled on that server if the Construct runtime project has been installed.

The Construct runtime project is copied to the environment defined in the Properties window for the project (for example, Projectname > Properties > Natural > Runtime).

For a Construct-generated application to compile in a NaturalONE local environment:

  • The referenced application DDMs must be copied into the NaturalONE local environment.

  • The Construct runtime project must be available in the workspace and referenced.

  • The SYSTEM library must be in the steplib chain.

The runtime folder does not require a Construct physical file. If Construct help is being used, the Construct physical file must be installed on the server and both the runtime and the CST-Help folders should be updated on the server.

Notes:

  1. To build the Construct runtime project, it must first be available locally. For information, see Add the Construct Runtime Project.
  2. If your non-Construct server environment is running on a mainframe, ensure that the ESIZE value is a minimum of 120 during the build.
  3. When the Construct runtime project is built, the project modules are copied to the SYSTEM library on the FNAT, but when the project is updated, the project modules are copied to the SYSTEM library on the FUSER.

Start of instruction setTo build the Construct runtime project in a non-Construct server environment

  1. Open the context menu for the ConstructRuntime project in the Project Explorer.

  2. Select Code Generation > Construct Runtime > Build Construct Runtime Project.

    The Define the Build Details panel is displayed. For example:

    graphics/define-build-details.png

  3. Select Finish.

    The Construct runtime project is built with all defaults.

    Or:
    Select one or more of the following options:

    Option Description
    Include GDA files Select this option to include all global data area files.

    The wizard ignores any global data areas. To include them, select Include GDA files.

    Note:
    To ensure compatibility with existing compiled files, and to avoid GDA timestamp errors, the Construct CDGDA global data area is also excluded by default. If you want this file uploaded and compiled, edit the .excludes file in the project. For more information on the .excludes file, see Using NaturalONE.

    Execute CVUSRCOP after successful build Select this option to execute the CVUSRCOP utility, which copies the Natural utility routines to the SYSTEM library after the Construct runtime project has been successfully built on the server. For more information, see Natural Business Services Installation on Mainframes.
  4. Select Finish.

    The Construct runtime project is built with the selected options.