Fast/Reload V7.8 changes

From m204wiki
Revision as of 20:13, 11 March 2011 by JAL (talk | contribs)
Jump to navigation Jump to search

{{#hierarchy-top:}} The following sections contain new or changed features in Fast/Reload.

Warning messages for some DV, STORE-x, and repeatibility changes

V7R2 of Model 204 introduced several new field attributes. Reorganizing a file and changing some of these attributes may create differences in field processing which may not be obvious at first glance.

To highlight this, Fast/Reload will issue a warning message (MSIR.1037) for each attribute change that may have some of these subtle effects.

For the most part, applications using the reorganized file will continue to work as before.

One source of possible change in application behavior involves use of the following User Language constructs:

  • The Is Present test
  • The count returned by a Count Occurrences Of statement
  • The number of iterations of a For Each Occurrence Of loop

All three of the above constructs have equivalent exposure to the changes in field attributes, even though the examples below only use Is Present, for brevity.

The other source of possible change in behavior is:

  • The value returned when referencing a physically absent field occurrence that was AT-MOST-ONE prior to the reorganization

This is shown in the examples using the Print statement, although the change could be in any kind of reference to the field value.

When changing field attributes as part of reorganizing a file, you should understand the impact of the change. To help in this, the conditions that cause warning messages are listed in the following subsections, along with a very brief example of a possible change in behavior.

Notes:

  • Other changes in these field attributes do not cause the kinds of problems discussed here. For example, you can change the DEFAULT-VALUE, STORE-DEFAULT, and STORE-NONE attributes of an EXACTLY-ONE field without any consequences about User Language application behavior.
  • Although the examples below all involve fields defined within fieldgroups, the potential problems, and the warning messages issued by Fast/Reload, apply equally to fields defined outside fieldgroups.

In these examples, assume you are reorganizing with UAI/LAI a file with the following “old” definitions:

DEFINE FIELD KEY WITH ORDERED DEFINE FIELDGROUP GRP DEFINE FIELD EXO.OLD (FG GRP) DEFINE FIELD REPT.OLD.MISS (REPT FG GRP) DEFINE FIELD REPT.OLD.XX (REPT FG GRP) DEFINE FIELD REPT.OLD.NUL (REPT FG GRP) DEFINE FIELD AMO.OLD.DF_YY (ONE DV 'YY' FG GRP) DEFINE FIELD AMO.OLD.SD_LIT (ONE DV 'AA' SD LIT FG GRP)

And assume that a record has been stored as follows:

Store Record KEY = 'Some unique value' Then Continue Add Fieldgroup GRP REPT.OLD.XX = 'xx' REPT.OLD.NUL = '' AMO.OLD.SD_LIT = 'AA' End Add End Store

Each example contains a field definition, used in the LAI step, to highlight one condition, and contains a User Language fragment which is assumed to be contained within the following:

FR Where KEY = 'Some unique value' For Fieldgroup GRP ... example fragment End For End For

The conditions are shown in the following subsections.

EXONE -> non-EXONE with STORE-x NONE

Case: Changing a field that was EXACTLY-ONE in the UAI to AT-MOST-ONE or REPEATABLE, with either STORE-DEFAULT NONE or STORE-NULL NONE.

Changed definition in LAI:

DEFINE FIELD EXO.OLD (REPT SN NONE FG GRP)

User Language fragment:

If EXO.OLD Is Present Then Print 'Present' Else Print 'Not Present'; End If

Result prior to reorg:

Present

Result after reorg:

Not Present

REPT -> EXONE

Case: Changing a field that was REPEATABLE in the UAI to EXACTLY-ONE.

There is one exception to this, which does not produce a warning: if the field was not a member of a fieldgroup in the UAI, and is a member of a fielgroup in the LAI. Note that the "out of sync" check of this "collecting loose fields" LAI feature ensures there is no exposure to a change in User Language behavior when using such a field.

Changed definition in LAI:

DEFINE FIELD REPT.OLD.MISS (EXONE FG GRP)

User Language fragment:

If REPT.OLD.MISS Is Present Then Print 'Present' Else Print 'Not Present'; End If

Result prior to reorg:

Not Present

Result after reorg:

Present

REPT -> ONE STORE-x NONE

Case: Changing a field that was REPEATABLE in the UAI to EXACTLY-ONE.

Changed definition in LAI:

DEFINE FIELD REPT.OLD.XX (ONE DV 'xx' SD NONE FG GRP)

User Language fragment:

If REPT.OLD.XX Is Present Then Print 'Present' Else Print 'Not Present'; End If

Result prior to reorg:

Present

Result after reorg:

Not Present

ONE -> ONE with changed DV

Case: Changing a field that was AT-MOST-ONE in the UAI to a different DEFAULT-VALUE in the LAI.

Changed definition in LAI:

DEFINE FIELD AMO.OLD.DF_YY (ONE DV 'ZZ' FG GRP)

User Language fragment:

Print AMO.OLD.DF_YY

Result prior to reorg:

YY

Result after reorg:

ZZ

ONE -> EXONE

Case: Changing a field that was AT-MOST-ONE in the UAI to EXACTLY-ONE in the LAI.

Changed definition in LAI:

DEFINE FIELD AMO.OLD.DF_YY (EXONE FG GRP)

User Language fragment:

If AMO.OLD.DF_YY Is Present Then Print 'Present' Else Print 'Not Present'; End If

Result prior to reorg:

Not Present

Result after reorg:

Present

ONE with DV -> REPT

Case: Changing a field that was AT-MOST-ONE with DEFAULT-VALUE in the UAI to REPEATABLE in the LAI.

Changed definition in LAI:

DEFINE FIELD AMO.OLD.DF_YY (REPT FG GRP)

User Language fragment:

Print '>' With AMO.OLD.DF_YY With '<'

Result prior to reorg:

>YY<

Result after reorg:

><

ONE SD LIT/ALL -> SD NONE

Case: Changing a field that was AT-MOST-ONE with STORE-DEFAULT LIT or ALL in the UAI to STORE-DEFAULT NONE in the LAI.

Changed definition in LAI:

DEFINE FIELD AMO.OLD.SD_LIT (ONE DV 'AA' SD NONE FG GRP)

User Language fragment:

If AMO.OLD.SD_LIT Is Present Then Print 'Present' Else Print 'Not Present'; End If

Result prior to reorg:

Present

Result after reorg:

Not present

Non-EXONE SN LIT/ALL -> SN NONE

Case: Changing a field that was AT-MOST-ONE or REPEATABLE with STORE-NULL LIT or ALL in the UAI, to STORE-NULL NONE in the LAI.

There is one exception to this, which does not produce a warning: if the field was not a member of a fieldgroup in the UAI, and it is a member of a fielgroup in the LAI. Note that the "out of sync" check of this "collecting loose fields" LAI feature ensures there is no exposure to a change in User Language behavior when using such a field.

Changed definition in LAI:

DEFINE FIELD REPT.OLD.NUL (REPT SN NONE FG GRP)

User Language fragment:

If REPT.OLD.NUL Is Present Then Print 'Present' Else Print 'Not Present'; End If

Result prior to reorg:

Present

Result after reorg:

Not Present

{{#hierarchy-bottom:}}