The statements section is organized into the following tables:
Figure 96. Statements - General rules - data item qualification and numeric literals
VisualAge Generator 4.5
| EGL produced by the migration tool | Migration tool considerations |
---|---|---|
Data item qualification rules: If an item is not qualified, VisualAge Generator looks for the item in the following order:
|
Data item qualification rules: If an item is not qualified, EGL looks for the item in the following order:
|
See Level 77 items in recordsand Implicit data items in programs for details and potential problems.
|
Numeric literals:
| Numeric literals:
| The migration tool converts the commas used as decimal points to a period except for initial values of form variable fields. |
Figure 97. Statements -- Function invocation
VisualAge Generator4.5
| EGL produced by the migration tool | Migration tool considerations |
---|---|---|
VAGen syntax example:
functionName( [argumentList] ); | EGL syntax example:
functionName( [argumentList] ); |
See EZE words for the EGL equivalent system library functions. See Figure 91 for function invocations from an I/O error routine.
|
In flow statements:
functionName(); | Flow statements are not supported.
goto functionName; | No special considerations. |
Figure 98. Statements -- Assignment, MOVE, and MOVEA
VisualAge Generator 4.5
| EGL produced by the migration tool | Migration tool considerations |
---|---|---|
VAGen syntax example:
target = functionName ( [argumentList] ) ; | EGL syntax example:
target = functionName ( [argumentList] ) ; | See EZE words for the EGL equivalent system library functions. |
target = numericExpression; or target = numericExpression (R; |
target = numericExpression ; or target = sysLib.round ( numericExpression ) ; | If the (R option is specified, the migration tool converts the option to the EGL round system function. |
target = source; or MOVE source [ TO ] target;
|
target = source ; or move source to target byName ; or move source to target ;
|
The migration tool considers the following EGL rules when migrating assignment and move statements:
Therefore, the migration tool does the following:
See Assignment statements for details and potential problems.
|
MOVEA source [TO] target; or MOVEA source [TO] target FOR occurrence;
|
move source to target for all ; or move source to target for occurrence ; |
The migration tool converts the MOVEA statement to a move statement with the for modifier. The tool also does the following:
|
VisualAge Generator 4.5
| EGL produced by the migration tool | Migration tool considerations |
---|---|---|
General information:
| General information:
| No special considerations. |
SET record SCAN;OR SET record EMPTY;
|
set record position;OR set record empty; | The migration tool does not add a statement for the level 77 record. |
SET sqlItem NULL;
| set sqlItem null ;
| No special considerations. |
SET map [ ALARM | [ CLEAR | EMPTY] ] ;
|
set form [alarm | [ initial | empty ] ] ;
| If ALARM, CLEAR, or EMPTY are used in combination with the PAGE option, the migration tool splits the VAGen statement into two EGL statements. |
SET map PAGE ;
|
sysLib.clearScreen(); // display form or sysLib.pageEject(); // printer form
|
The migration tool migrates SET map PAGE as follows:
See SET map PAGE statement for details and potential problems.
|
SET mapItem [ CURSOR | FULL | [ NORMAL | DEFINED ] ] ;
|
set formField [ cursor | full | [ normal | initialAttributes ] ] ;
|
The migration tool migrates to the EGL equivalent of each option without
regard to whether the formField is on a text or print form. See SET mapItem attributes for details and potential problems.
|
SET mapItem [ CURSOR | FULL | color | extendedHighlight | MODIFIED | [ BRIGHT | DARK ] | [ PROTECT | AUTOSKIP ] ] ;
|
set formField [ cursor | full | color | extendedHighlight | modified | [ bold | invisible ] | [ protect | skip ] ] ;
| The migration tool migrates to the EGL equivalent of each option without regard to whether the formField is on a text or print form. See SET mapItem attributes for details and potential problems. See later rows in this table for color and extendedHighlight information. |
color: MONO | BLUE | GREEN | PINK | RED | TURQ | YELLOW | WHITE |
color: defaultColor | blue | green | magenta | red | cyan | yellow | white | No special considerations. |
extendedHighlight: NOHILITE | BLINK | RVIDEO | USCORE |
extendedHighlight: noHighLight | blink | reverse | underline | No special considerations. |
Figure 100. Statements -- RETRIEVE and FIND
VisualAge Generator 4.5
| EGL produced by the migration tool | Migration tool considerations |
---|---|---|
RETR dataItem1 table[.searchColumn] dataItem2 [ returnColumn ] ;
|
if (dataItem1 in table.searchColumn) dataItem2 = table.returnColumn[sysVar.arrayIndex]; end
|
The migration tool converts the RETR statement to an if statement and an assignment statement. Special considerations apply if the table is not available during
migration. See RETR statement for details and potential problems.
|
FIND dataItem table[.searchColumn] trueStatement;OR FIND dataItem table[.searchColumn] , falseStatement ;OR FIND dataItem table[.searchColumn] trueStatement [,] falseStatement ;
|
if (dataItem in table.searchColumn) EGLtrueStatement ; endOR if (dataItem in table.searchColumn) else EGLfalseStatement ; endOR if (dataItem in table.searchColumn) EGLtrueStatement ; else EGLfalseStatement ; end
|
The migration tool converts the FIND statement to an if statement and the EGL equivalent of the true and false statements. See later rows in this table for conversion of the trueStatement and falseStatement to the corresponding EGL statements.
|
true/falseStatement in flow:
| Corresponding EGL replacements:
| No special considerations. |
true/falseStatement in a function:
| Corresponding EGL replacements:
| No special considerations. |
Figure 101. Statements -- IF, WHILE, and TEST, including EZEAID, EZESYS, and I/O error values
VisualAge Generator 4.5
| EGL produced by the migration tool | Migration tool considerations |
---|---|---|
IF logicalExpression ; { statement ; } [ ELSE; { statement ; } ] END; |
if ( EGLLogicalExpression ) { EGLStatement ; } [ else { EGLStatement ; } ] end | See later rows in this table for the relationship between the VAGen logical expressions and the EGL logical expressions. |
WHILE logicalExpression ; { statement ; } END; |
while ( EGLLogicalExpression ) { EGLStatement ; } end | See later rows in this table for the relationship between the VAGen logical expressions and the EGL logical expressions. |
TEST testCondition trueStatement ; TEST testCondition , falseStatement ; TEST testCondition trueStatement [, ] falseStatement ;
|
if ( EGLLogicalExpression ) EGLtrueStatement ; end if ( EGLLogicalExpression ) else EGLfalseStatement ; end if ( EGLLogicalExpression ) EGLtrueStatement ; else EGLfalseStatement ; end |
With the exception of TEST mapItem nnn, +nnn, and -nnn, the migration tool converts the TEST statement to the equivalent if ... is statement and the EGL equivalent of the true and false statements. See later rows in this table for the relationship between the VAGen logical expressions and the EGL logical expressions. See later rows in this table for conversion of the trueStatement
and falseStatement to the corresponding EGL statements.
|
VisualAge Generator boolean operators for IF and WHILE:
| Corresponding EGL boolean operators for if and
while:
| No special considerations. |
VisualAge Generator relational operators for IF and WHILE:
| Corresponding EGL relational operators for if and
while:
| No special considerations. |
VisualAge Generator state operators for IF and WHILE:
| Corresponding EGL state operators for if and
while:
| The migration tool always migrates a VAGen TEST statement to an EGL if ... is statement. |
VisualAge Generator array operator for IF and WHILE:
| Corresponding EGL state operators for if and
while:
| No special considerations. |
VisualAge Generator mapItem state conditions:
| Corresponding EGL formField state conditions:
|
The migration tool converts to the equivalent EGL state conditions. Special considerations apply to mapItem NULL. See Checking SQL and map items for NULL for details and potential problems.
|
Special mapItem state condition for the TEST statement: nnn | +nnn | -nnn
|
EGL does not provide direct support for this state condition. However, you can achieve the equivalent function by doing the following:
|
When migrating any program, the migration tool always includes a declaration for: <custPrefix>EZE_ITEMLEN The migration tool does the following for TEST nnn, +nnn, or -nnn:
|
VisualAge Generator map state conditions:
| Corresponding EGL form state conditions:
| No special considerations. |
VisualAge Generator EZEAID state conditions:
| Corresponding EGL sysVar.eventKey state
conditions:
| No special considerations. |
VisualAge Generator sqlItem state conditions:
| Corresponding EGL sqlItem state conditions:
|
The migration tool converts to the equivalent EGL state conditions. Special considerations apply to sqlItem NULL. See Checking SQL and map items for NULL for details and potential problems.
|
VisualAge Generator record state conditions:
| Corresponding EGL record state conditions:
|
The migration tool converts to the equivalent EGL state conditions. Special considerations apply to migrating DUP based on the record type. See I/O error values UNQ and DUP for details and potential problems. Special considerations also apply to migrating LOK. See I/O error value LOK for details and potential problems.
|
User Interface record state conditions:
| Corresponding EGL uiRecord conditions:
| This release of EGL does not support web transactions or UI records. However, testing the UI record state for MODIFIED is expected to be the same for both a map and a UI record. The migration tool converts a logical expression that tests for MODIFIED without regard to whether the part being tested is a map or a UI record. This preserves as much of your logic as possible. |
VisualAge Generator dataItem state conditions:
| Corresponding EGL dataItem state conditions:
| No special considerations. |
VisualAge Generator EZESYS state conditions:
| Corresponding sysVar.systemType state conditions:
|
The migration tool converts to the equivalent EGL state conditions. Special considerations apply to checking the state for EZESYS. See EZESYS for details and potential problems.
|
true/falseStatement in flow:
| Corresponding EGL replacements:
| No special considerations. |
true/falseStatement in a function:
| Corresponding EGL replacements:
| No special considerations. |
Figure 102. Statements -- CALL
VisualAge Generator 4.5
| EGL produced by the migration tool | Migration tool considerations |
---|---|---|
CALL programName argument [ { [,] argument} ] [ (options ] ;OR CALL serviceRoutine argument [ { [,] argument} ] [ (options ] ;
|
call programName argument [ { , argument } ] [ options ] ;
|
See later rows in this table for conversion of the options to the corresponding EGL statements or options. See Service Routines for information on migrating the CALL statement for them.
|
REPLY option | If the REPLY option is specified in VisualAge Generator, the
corresponding EGL statements are as follows:
try call programName argument [ { , argument } ] [ otherOptions ] ; end | The migration tool includes the try...end block if the REPLY option is specified. |
otherOptions:
| Corresponding EGL otherOptions:
| No special considerations. |
Figure 103. Statements -- DXFR
Figure 104. Statements -- XFER
VisualAge Generator 4.5
| EGL produced by the migration tool | Migration tool considerations |
---|---|---|
Variation 1 - Migrate to Transfer (no map or UI record)
XFER target [ recordName ] [ (NONCSP] ;where target is transactionNameOR EZEAPP
| EGL syntax for transfer statement:
transfer to transaction target [ passing recordName ] [ externallyDefined ] ;where target is transactionNameOR sysVar.transferName
| If there is no comma in the statement, the migration tool converts the XFER to an EGL transfer to transaction statement. |
Variation 2 - Migrate to Show (XFER with map)
XFER target [ recordName ] , map [ (NONCSP ] ;where target is transactionNameOR EZEAPP
| EGL syntax for show statement:
show formName returning to target [ passing recordName ] [ externallyDefined ] ;where target is transactionNameOR sysVar.transferName
|
The migration tool distinguishes between Variation 2 (XFER with a map) and Variation 3 (XFER with a UI record) as follows:
Special considerations apply if the migration tool cannot distinguish
between a map and a UI record. See XFER for details and potential problems.
|
Variation 3 - Migrate to Show (XFER with UI Record)
XFER target [ record ] , UIRecordwhere target is transactionNameOR EZEAPPOR ' '
| EGL syntax for forward statement:
forward UIRecord [ returning to target ] [ passing recordName ] ;where target is transactionNameOR sysVar.transferNameOR UI record
|
This release of EGL does not support web transactions, UI records, or a replacement for XFER with a UI record. However, the forward statement is expected to be the replacement for XFER with a UI record. The EGL syntax might not be correct. However, using this migration technique preserves as much of your logic as possible. The migration tool distinguishes between Variation 2 (XFER with a map) and Variation 3 (XFER with a UI record) as follows:
Special considerations apply if the migration tool cannot distinguish
between a map and a UI record. See XFER for details and potential problems.
|
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.