VisualAge Generator to Enterprise Generation Language Migration Guide


Programs

The programs section is organized into the following tables:


Figure 85. Programs -- general syntax, program type, called parameters, and prolog

VisualAge Generator 4.5
EGL produced by the migration tool Migration tool considerations
Programs part:
  • programName
  • Program type
  • Specifications (vary based on program type):
    • Working Storage record
    • PSB
    • Firstmap
    • First UI Record
    • Map Group
    • Help Map Group
  • Tables and Additional Records
  • Called Parameters
  • Prolog
  • Properties (vary based on program type)
  • Structure diagram
    • Main Functions
    • Flow Statements (hidden in the structure diagram, but can be specified for any main function)
EGL syntax sample:
//*** Program=programName
// prolog
//******************* 
Program programName 
  type eglProgramType
  //vagenProgramType
[ ( calledParameters ) ]
{
[alias= "originalProgramName"]
includeReferencedFunctions
          =yes,
allowUnqualifiedItemReferences
          =yes
[ propertiesBasedOnType ]
}
  [ dataDeclarations ]
  [ useDeclarations ]
  function main ( )
   {  functionLabel:
          functionName( ) ;
  [{functionFlowStatements}]}
  end  // end main
end  // end programName

The migration tool does not rename programs for you even if they conflict with the EGL reserved word list. The migration tool does not set the alias property. If you must rename a program, you can use the alias property to specify the original name of the VAGen program. See Program names and reserved words.

The migration tool includes the VAGen program type as a comment in the program definition.

The migration tool migrates the Tables and Additional Records list as follows:

  • Records migrate to dataDeclarations.
  • Tables migrate to useDeclarations.

The migration tool always includes the following properties to preserve VAGen behavior:

  • includeReferencedFunctions
  • allowUnqualifiedItemReferences

Programs types:
  • Main transaction
  • Called Transaction
  • Main Batch
  • Called Batch
  • Web Transaction
Note:
See later row on "Main Transaction Exection Mode Values" for additional details.
EGL program types:
  • textUIProgram
  • textUIProgram
  • basicProgram
  • basicProgram
  • Not supported in this release.
The migration tool includes the VAGen program type as a comment in the program definition. See Figure 86 for information on how the segmentation values correspond to EGL properties.
Called Parameters
Note:
  • Called parameters are entered in a special window.
  • The parameter type indicates whether the parameter is an item, record, or map.
  • The parameter name is always the name of another VAGen part. There is no equivalent of an EGL type definition or primitive type.
EGL called parameters example:
( parameterName typeInfo
  { , parameterName typeInfo } )
  • Parameters must be separated by commas.
  • A parameter can be an item, record, or form. There is no direct correspondence to the VAGen parameter types.
  • The EGL typeInfo can be:
    • a primitive type for an item
    • a type definition for an item, record, or form.

The migration tool includes the original VAGen parameter type as a comment. The migration tool always migrates called parameters with type definitions. The migration tool does not use primitive types for item parameters.

Special considerations apply. See Redefined records for details and potential problems.

Prolog Not applicable. The migration tool converts the prolog to a comment that precedes the program definition.

Figure 86. Programs -- program specifications, properties, tables and additional records list

VisualAge Generator 4.5
EGL produced by the migration tool Migration tool considerations
General information:
  • Some VAGen specifications and properties information migrates to EGL properties, data declarations, or use declarations.
General information:
  • The rows that follow indicate whether the corresponding EGL language element is a program property, data declaration, or use declaration.
No special considerations.
Main Transaction Execution Mode values:
  • Nonsegmented
  • Segmented
  • Single segment
Note:
Called transactions always run in nonsegmented mode.
segmented -- values:

  • segmented = no
  • segmented = yes
  • segmented = yes
(program property)
Note:
The segmented property is not specified for called programs.
If the segmented information is not in the External Source Format file, the migration tool defaults to segmented = no.
Working Storage record (Specifications)
  • The Working Storage record can be specified for both main and called programs. It is sometimes referred to as the program's primary working storage record.
  • The primary working storage record is always initialized.
inputRecord (program property)
  • The inputRecord property can only be specified for main programs.
  • The inputRecord is always initialized.
  • A data declaration is also required.

The migration tool converts the primary working storage record to the inputRecord property for main programs.

The migration tool also includes a data declaration for the primary working storage record for both main and called programs. The tool includes the initialized = yes property for the data declaration in called programs.

If the primary working storage record contains level 77 items, the migration tool includes a data declaration statement for the level 77 record.

See Level 77 items in records for details and potential problems.

PSB (Specifications) Not supported in this release. The migration tool comments out a use declaration for the PSB. If the program does not use DL/I, you might be able to generate and run it in this release.
Firstmap (Specifications) inputForm (program property) No special considerations.
First UI Record (Specifications) Not supported in this release No special considerations.
Map Group (Specifications)

use formGroup (use declaration)

No special considerations.
Help Map Group (Specifications)

use formGroup { helpGroup=yes } (use declaration)

No special considerations.
Message table prefix (Program property) msgTablePrefix (program property) No special considerations.
Allow implicit data items (Program property) Not supported. The migration tool does not create implicit definitions for you. See Implicit data items in programs for details and potential problems.
Keys assignment:
  • Help key (1 key)
  • Bypass keys (up to 5 keys)
  • F1-12 = F13-24
(Program property)
Note:
The keys assignment is specified once for the program and applies to both the map group and the help map group.
EGL keys assignment example:
use formGroup
  { [ helpGroup = yes ]
    helpKey = pfNumber,
    validationBypassKeys =
      ( pfNumberList ) , 
    pfKeyEquate = yes | no  } ;
 
(Use declaration properties for the program's form group and help form group.)
Note:
  • The values in the validationBypassKeys list must be separated by commas.
  • The validationBypassKeys property is not specified for the program's help form group.
The migration tool includes the EGL equivalent of the keys assignment information on the use declaration statements for both the form group and the help form group. The migration tool omits the validationBypassKeys property from the use declaration for the help form group.
Tables and Additional Records:
  • Records
Note:
  • Redefinition information is stored in the VAGen Redefined record, not in the program.
  • Records that are used as I/O objects are never included in the Tables and Additional Records list.
EGL additional record example:
recordName recordName
  [ { redefines = 
      otherRecord } ] ; 
(data declaration)
Note:
  • The redefines property must be specified on the program's data declaration if the record provides a different record layout for the same physical storage as another record.
  • Data declarations are required for all records used in the program, including the I/O records.

The migration tool always uses the same record name as the type definition.

If a VAGen record is used in the program as a redefined record, the migration tool includes the redefines property on the data declaration statement. See Redefined records for details and potential problems.

The migration tool also includes data declarations for all records that are used as I/O objects by the program.

The migration tool includes data declarations for records that are specified as attributes of any MQ Message record that is used as an I/O object by the program.

Tables and Additional Records:
  • Tables
  • You can specify Keep After Use for each table.
EGL use declaration example:
use tableName
   [{deleteAfterUse = yes}];
(use declaration)

The migration tool converts tables on the Tables and Additional Records list to use declarations.

DeleteAfterUse has the opposite meaning from the VAGen Keep After Use. The migration tool reverses yes and no.


Figure 87. Programs -- main functions and flow statements

VisualAge Generator 4.5
EGL produced by the migration tool Migration tool considerations

VAGen programs specify the main functions as the top-level functions in the VAGen Structure Diagram. All other functions appear only when you expand the Structure Diagram.

Each main function can have flow statements. These statements do not appear in the Structure Diagram, but can be accessed from the diagram.

EGL programs specify only one main function. This function is always named main.

There are no flow statements.

An example of the syntax for the program's main function is as follows:

function main ( )
   {  functionLabel:
        functionName( ) ;
[ { functionFlowStatements } ] }
end // end main

The migration tool builds the EGL main function. The tool includes the following within the main function for each VAGen main function:

  • functionLabel so that the VAGen main function can be referenced in an EGL exit stack functionLabel statement. The tool always sets the functionLabel to the functionName.
  • function invocation statement to invoke the VAGen main functionName.
  • flow statements, if any, for the VAGen main function.

See the following for details on the migration of flow statements:



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