Fast/Reload V7.8 changes: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Created page with "{{Hierarchy header}} The following sections contain new or changed features in Fast/Reload. ==Warning messages for some DV, STORE-x, and repeatibility changes== V7R2 of ''Mo...")
 
m (Content removed to M2o4int page of same name)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Hierarchy header}}
Content moved to m204int page of same name, but history preserved here.
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:
<ul>
<li>the <tt>Is Present</tt> test
<li>the count returned by a <tt>Count Occurrences Of</tt> statement
<li>the number of iterations of a <tt>For Each Occurrence Of</tt> loop
</ul>
All three of the above constructs have equivalent exposure to the
changes in field attributes, even though the examples below only use
<tt>Is Present</tt>, for brevity.
The other source of possible change in behavior is:
<ul>
<li>the value returned when referencing a physically absent field
occurrence which was AT-MOST-ONE prior to the reorganization
</ul>
This is shown in the examples using the <tt>Print</tt> statement,
although of course 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:'''
<ul>
<li>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.
<li>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.
</ul>
In these examples, assume you are reorganizing with UAI/LAI a
file with the following &ldquo;old&rdquo; definitions:
<pre>
    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)
</pre>
And assume that a record has been stored as follows:
<pre>
    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
</pre>
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:
<pre>
    FR Where KEY = 'Some unique value'
      For Fieldgroup GRP
          ... example fragment
      End For
    End For
</pre>
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:
<pre>
    DEFINE FIELD EXO.OLD (REPT SN NONE FG GRP)
</pre>
 
User Language fragment:
<pre>
    If EXO.OLD Is Present Then Print 'Present'
    Else Print 'Not Present'; End If
</pre>
 
Result prior to reorg:
<pre>
    Present
</pre>
 
Result after reorg:
<pre>
    Not Present
</pre>
===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 synch" 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:
<pre>
    DEFINE FIELD REPT.OLD.MISS (EXONE FG GRP)
</pre>
User Language fragment:
<pre>
    If REPT.OLD.MISS Is Present Then Print 'Present'
    Else Print 'Not Present'; End If
</pre>
Result prior to reorg:
<pre>
    Not Present
</pre>
Result after reorg:
<pre>
    Present
</pre>
 
===REPT -> ONE STORE-x NONE===
Case: Changing a field that was REPEATABLE in the UAI to EXACTLY-ONE.
Changed definition in LAI:
<pre>
    DEFINE FIELD REPT.OLD.XX (ONE DV 'xx' SD NONE FG GRP)
</pre>
User Language fragment:
<pre>
    If REPT.OLD.XX Is Present Then Print 'Present'
    Else Print 'Not Present'; End If
</pre>
Result prior to reorg:
<pre>
    Present
</pre>
Result after reorg:
<pre>
    Not Present
</pre>
===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:
<pre>
    DEFINE FIELD AMO.OLD.DF_YY (ONE DV 'ZZ' FG GRP)
</pre>
User Language fragment:
<pre>
    Print AMO.OLD.DF_YY
</pre>
Result prior to reorg:
<pre>
    YY
</pre>
Result after reorg:
<pre>
    ZZ
</pre>
 
===ONE -> EXONE===
Case: Changing a field that was AT-MOST-ONE in the UAI to EXACTLY-ONE in the LAI.
Changed definition in LAI:
<pre>
    DEFINE FIELD AMO.OLD.DF_YY (EXONE FG GRP)
</pre>
User Language fragment:
<pre>
    If AMO.OLD.DF_YY  Is Present Then Print 'Present'
    Else Print 'Not Present'; End If
</pre>
Result prior to reorg:
<pre>
    Not Present
</pre>
Result after reorg:
<pre>
    Present
</pre>
===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:
<pre>
    DEFINE FIELD AMO.OLD.DF_YY (REPT FG GRP)
</pre>
User Language fragment:
<pre>
    Print '>' With AMO.OLD.DF_YY With '<'
</pre>
Result prior to reorg:
<pre>
    >YY<
</pre>
Result after reorg:
<pre>
    ><
</pre>
===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:
<pre>
    DEFINE FIELD AMO.OLD.SD_LIT (ONE DV 'AA' SD NONE FG GRP)
</pre>
User Language fragment:
<pre>
    If AMO.OLD.SD_LIT  Is Present Then Print 'Present'
    Else Print 'Not Present'; End If
</pre>
Result prior to reorg:
<pre>
    Present
</pre>
Result after reorg:
<pre>
    Not present
</pre>
===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 synch" 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:
<pre>
    DEFINE FIELD REPT.OLD.NUL (REPT SN NONE FG GRP)
</pre>
User Language fragment:
<pre>
    If REPT.OLD.NUL Is Present Then Print 'Present'
    Else Print 'Not Present'; End If
</pre>
Result prior to reorg:
<pre>
    Present
</pre>
Result after reorg:
<pre>
    Not Present
</pre>
 
{{Hierarchy footer}}

Latest revision as of 21:42, 17 October 2013

Content moved to m204int page of same name, but history preserved here.