NaturalONE Version 8.3.7
 —  Code Generation  —

Regenerate Subprograms and Associated Modules

You can regenerate any subprogram that was generated using a supplied code generator, as well as all data areas, associated subprograms, and user exits that were generated with the subprogram. You can also select more than one project, folder, or object to regenerate multiple modules.

This section covers the following topics:


Regenerate a Subprogram and Associated Modules

There are two methods of regenerating a subprogram, which are represented by two context menu options:

Start of instruction setTo regenerate a subprogram and associated modules

  1. Open the context menu for the subprogram in the Navigator view.

  2. Select Code Generation > Regenerate.

    The selected subprogram and all associated modules are regenerated without displaying the wizard panel(s).

    Or:
    Select Code Generation > Regenerate Using Wizard.

    The code generator reads the subprogram specifications and displays the wizard panels, which are the same as those displayed when the subprogram was first generated.

    Note:
    For information on the specification panels, see the section describing that code generator.

    After selecting Finish, the Generation Progress window is displayed, indicating the results of the regeneration. For example:

    graphics/generation-progress-regenerate.png

    If any of the Natural modules have changed since the subprogram was first generated, the compare option is enabled when you select the module. For information, see Compare Differences.

    Note:
    The Generation Progress window is only displayed when the option is set in the Preferences window. For information, see Set Code Generation Preferences.

  3. Select Save to save the regenerated subprogram and associated modules.

    You can now upload all modules to the server using standard NaturalONE functionality.

Top of page

Regenerate Multiple Subprograms

This section describes how to regenerate more than one subprogram and associated modules.

Start of instruction setTo regenerate multiple subprograms

  1. Open the context menu for the subprograms in the Navigator view.

    You can select one or more projects, libraries, or individual subprograms using standard selection techniques.

  2. Select Regenerate.

    First, a progress window is displayed as the wizard locates and loads the regeneratable objects. Next, a selection window is displayed to choose the objects you want to regenerate. For example:

    graphics/regenerate-multiple-subprograms.png

    Using this panel, you can:

    Task Procedure
    Filter the list of resources for selection. Type a prefix in Filter. For example, if you type "ZIP", only the resources beginning with ZIP are selected.
    Use a different code generator to regenerate the resource. Type the generator ID in Generator ID.
    Deselect all resources. Select Deselect All.
  3. Select Finish.

The Generation Progress window is displayed, showing the progress of the generation process. For example:

graphics/regenerate-multiple-subprograms-progress-window.png

Top of page

Compare Differences

The Generation Progress window displays the results of regeneration. If the generated modules have changed since the previous generation, Different is displayed in the Status column and you can display a window in which you can compare the regenerated code with the original.

Note:
You cannot compare two modules that are identical.

Start of instruction setTo compare the regeneration differences

  1. Select the module for which you want to compare the differences.

  2. Select Compare.

    The Compare Generation window is displayed. For example:

    graphics/compare-generation-window.png

    This window displays the results of the new (Generated) and previous (Original) generation and indicates the differences.

  3. Decide what to do about the differences.

  4. Select Commit to save the changes.

Top of page