VisualAge Generator to Enterprise Generation Language Migration Guide

DISPLAY statement for maps

VisualAge Generator: DISPLAY is used for both display maps and printer maps.

EGL: Two separate statements are used:

In VisualAge Generator Compatibility mode, display form is accepted if the form is a print form.

Associated part needed for migration: The map is needed to determine the device type. The first map with this map name in any available map group is the map that the migration tool uses. When migrating in program context, the migration tool only looks at the program's main map group.

Figure 34. Display statement for maps

Migrating with the associated part
Migrating without the associated part
Based on the first migration of this function, if a map with this name is available, the migration tool converts to the following:
  • display textForm if the map is a display map
  • print printForm if the map is a printer map
If a map with this name is not available, the migration tool does the following:
  • Converts to display form
  • Issues a warning message that the map type could not be determined

Potential Problem 1: The first program that migrated used a print form so the migration tool migrated to the print statement. Another program uses the same function, but with a text form.

Solution 1: Use VisualAge Generator Compatibility mode. Edit the function and change the print statement to a display statement.

Potential Problem 2: A problem arises if you want to eliminate the use of VisualAge Generator Compatibility mode and two programs use the function -- one with a text form and one with a print form.

Possible Solution 2A: If a specific target environment always uses display maps and other environments always use print maps, you could change the EGL function to something similar to the following:

if (sysVar.systemType is zoscics)
  DISPLAY_FUNCTION();
else
  PRINT_FUNCTION();
end

where DISPLAY_FUNCTION and PRINT_FUNCTION use the display and print statements, respectively.

Possible Solution 2B: Assuming the function migrated to a display statement, change the function from the following:

    before-logic
    display textForm;
    after-logic
 

to the following:

    before-logic-function();
    display textForm;
    after-logic-function();
 

Putting the before-logic and after-logic into separate functions enables you to keep most of the logic in common functions. Then you can make a copy of the modified display function and change it to use print map, but still use the common before-logic-function and after-logic-function. Disadvantage: This has the potential to ripple back into functions that use the original DISPLAY function.

Potential Problem: The same potential problems and possible solutions as listed in the Migrating with the associated part column apply.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]