VisualAge Generator to Enterprise Generation Language Migration Guide

SET map PAGE statement

VisualAge Generator: SET map PAGE is used for both display and print maps.

EGL: Two separate statements are used. The map name is not specified:

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 45. SET map PAGE statement

Migrating with the associated part
Migrating without the associated part
Based on the first migration of this function, the migration tool converts SET map PAGE to the following:
  • clearScreen() for a text form
  • pageEject() for a print form

The migration tool also includes a comment with the original map name.

If the map is not available, the migration tool does the following:

  • Converts SET map PAGE to EZE_SETPAGE().
  • Includes a comment with the original map name.
  • Issues an error message that it was unable to determine the map type.

Potential Problem: Any program that uses a different map type from what was determined when the function migrated might behave differently at run time. This is because clearScreen only applies to text forms and pageEject only applies to print forms. No error will appear on the Tasks list. Preprocessing and validation will not fail for the program.

Possible Solution: If a specific target environment does printing and other environments always use display maps, change the EGL function to something similar to the following::

if (sysVar.systemType is zosbatch)
  pageEject();
else
  clearScreen();
end

Similar logic can be used based on transaction code, user ID, and so on, depending on the specific details of your system.

Potential Problem 1: EGL validation results in a message on the Tasks list.

Solution: Edit the function and change EZE_SETPAGE() to either clearScreen() or pageEject(), depending on the map type.

Potential Problem 2: The same potential problem and solution as shown for Migrating with the associated part apply.


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