VisualAge Generator to Enterprise Generation Language Migration Guide

Checking SQL and map items for NULL

VisualAge Generator: IF, WHILE, and TEST support checking either an SQL item or a map item for NULL.

EGL: SQL items can be checked for null. Map items can be checked for blanks.

Associated part needed for migration: The record or map. If the item is not qualified, you need the program and all of its associates.

Figure 48. Checking SQL and map items for NULL

Migrating with the associated part
Migrating without the associated part
Based on the first migration of this function, if the item is qualified, the migration tool does the following:
  • Checks the qualifier to determine if it is a record or map.
  • Converts to checking for null if the qualifier is an SQL record.
  • Converts to checking for blanks if the qualifier is a map.
The migration tool tries to determine the type of the item as follows:
  • If the item is qualified and the qualifier is not available, the migration tool does the following:
    • Checks if the qualifier is also the function's I/O object. If so, the CONVERSE and DISPLAY I/O options guarantee the I/O object is a map. The CLOSE I/O option is valid for either a record or map. Other I/O options guarantee the I/O object is a record.
    • Also checks the function's parameter list and local storage. If the qualifier is found, the qualifier is a record.
  • If the migration tool can determine that the item is in an SQL record or on a map, the tool migrates to the following:
    • null for an SQL record
    • blanks for a map item
  • If the migration tool cannot determine that the item is in an SQL record or on a map, then the tool does the following:
    • Converts to EZE_NULL.
    • Issues an error message indicating that this statement should be reviewed.
Based on the first migration of this function, if the item is not qualified, the migration tool does the following:
  • Checks the function's parameter list to see if the item is specified there as either an SQLITEM or a MAPITEM parameter. If so, the tool migrates on that basis.
  • If the program and its associates are available, the migration tool uses the VAGen qualification rules to determine which record or map contains the item and then migrates on that basis.
If the item is not qualified, the migration tool checks the function's parameter list to see if the item is specified there as either an SQLITEM or a MAPITEM.

If the migration tool can determine that the item is in an SQL record or on a map, the tool migrates to the following:

  • null for an SQL record
  • blanks for a map item

If the migration tool cannot determine that the item is in an SQL record or on a map, then the tool does the following:

  • Converts to EZE_NULL.
  • Issues an error message indicating that this statement should be reviewed.

Potential Problem: None.

Potential Problem 1: A problem arises if the migration tool uses EZE_NULL. There will be an error on the Tasks list.

Solution: Edit the function and change EZE_NULL to null for an SQL item or blanks for a form variable field.


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