Code Conversion

The Convert to Process Page command of the Natural Engineer component attempts to convert objects that use maps and inline INPUT statements to use the syntax of the PROCESS PAGE statement. This statement links the objects to adapters that have been generated by Ajax Developer (based on the map extract files generated earlier).

All converted objects are placed into a modification library. The name of this modification library depends on the following:

  • If a modification library was defined with the Natural Engineer product on the server, all modified objects are placed into the defined modification library, which may have any valid library name. If you want to change (or delete) the name of the modification library, you have to do this with the Natural Engineer product on the server. It is not possible to do this using NaturalONE. See also the description of the Application Properties in the Natural Engineer Application Management documentation.

  • If a modification library was not defined with the Natural Engineer product on the server, all modified objects are placed into a library which has the same name as the library containing the original objects, but which has an additional "X" as the last character. If the library name is already eight characters long, the last character is removed and replaced with the "X". For example, when the name of the original library is HOSPITAL, the name of the modification library is HOSPITAX.

Start of instruction setTo create objects with modified application code

  1. In the Natural Server view, select one of the following:

    • one or more programs, subprograms, subroutines or helproutines,

    • one or more group folders with the names Programs, Subprograms, Subroutines and/or Helproutines, or

    • one or more libraries containing the above-mentioned object types.

  2. Invoke the context menu and choose Natural Engineer > Convert to Process Page (or press ALT+SHIFT+C).

    The conversion process is immediately started on the Natural server. During the conversion, the Natural Engineer console in the Console view shows diagnostic messages. There you can see which objects have been converted, which statements or objects have not been converted, and which objects require manual intervention.

    When the conversion has been completed, new objects containing the modified application code are shown in the Natural Server view, in the modification library. They are not downloaded to the Eclipse workspace (Navigator view or Natural Navigator view).

    Note:
    If the modification library is new, you may have to refresh the user libraries manually in the Natural Server view so that the modification library is shown.

    The following sample shows an expanded modification library:

    Modification library

    When you display an object in the Natural Server view using the source editor, a temporary project is created in the Eclipse workspace. The following is a sample Natural program containing converted code:

    Converted code