Fast/Reload V7.8 changes: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (Content removed to M2o4int page of same name)
 
Line 1: Line 1:
The following sections contain new or changed features in <var class="product">[[Fast/Reload]]</var>.
Content moved to m204int page of same name, but history preserved here.
==Warning messages for some DV, STORE-x, and repeatibility changes==
V7R2 of <var class="product">Model 204</var> 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, <var class="product">Fast/Reload</var> 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 <var class="product">User Language</var> constructs:
<ul>
<li>The <var>Is Present</var> test
<li>The count returned by a <var>Count Occurrences Of</var> statement
<li>The number of iterations of a <var>For Each Occurrence Of</var> loop
</ul>
All three of the above constructs have equivalent exposure to the
changes in field attributes, even though the examples below only use
<var>Is Present</var>, for brevity.
The other source of possible change in behavior is:
<ul>
<li>The value returned when referencing a physically absent field
occurrence that was <var>AT-MOST-ONE</var> prior to the reorganization
</ul>
This is shown in the examples using the <var>Print</var> 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 aid this understanding,
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 <var>DEFAULT-VALUE</var>, <var>STORE-DEFAULT</var>, and
<var>STORE-NONE</var> attributes of an <var>EXACTLY-ONE</var> field without any consequences
for <var class="product">User Language</var> application behavior.
<li>Although the examples below all involve fields defined within
fieldgroups, the potential problems, and the warning messages issued
by <var class="product">Fast/Reload</var>, apply equally to fields defined outside fieldgroups.
</ul>
In these examples, assume you are reorganizing with <var>UAI</var>/<var>LAI</var> a
file with the following &ldquo;old&rdquo; definitions:
<p class="code"><nowiki>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)
</nowiki></p>
And assume that a record has been stored as follows:
<p class="code"><nowiki>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
</nowiki></p>
Each example contains a field definition, used in the <var>LAI</var> step,
to highlight one condition, and contains a <var class="product">User Language</var> fragment which
is assumed to be contained within the following:
<p class="code"><nowiki>FR Where KEY = 'Some unique value'
  For Fieldgroup GRP
      ... example fragment
  End For
End For
</nowiki></p>
The conditions are shown in the following subsections.
===EXONE -> non-EXONE with STORE-x NONE===
Case: Changing a field that was <var>EXACTLY-ONE</var> in the <var>UAI</var> to <var>AT-MOST-ONE</var> or
<var>REPEATABLE</var>, with either <var>STORE-DEFAULT NONE</var> or <var>STORE-NULL NONE</var>.
Changed definition in <var>LAI</var>:
<p class="code"><nowiki>DEFINE FIELD EXO.OLD (REPT SN NONE FG GRP)
</nowiki></p>
<var class="product">User Language</var> fragment:
<p class="code"><nowiki>If EXO.OLD Is Present Then Print 'Present'
Else Print 'Not Present'; End If
</nowiki></p>
Result prior to reorg:
<p class="output"><nowiki>Present
</nowiki></p>
Result after reorg:
<p class="output"><nowiki>Not Present
</nowiki></p>
===REPT -> EXONE===
Case: Changing a field that was <var>REPEATABLE</var> in the <var>UAI</var> to <var>EXACTLY-ONE</var>.
There is one exception to this, which does not produce a warning:
if the field was not a member of a
fieldgroup in the <var>UAI</var>, and is a member of a fielgroup in the <var>LAI</var>.
Note that the "out of sync" check of this "collecting
loose fields" <var>LAI</var> feature ensures there is no exposure
to a change in <var class="product">User Language</var> behavior when using such a field.
Changed definition in <var>LAI</var>:
<p class="code"><nowiki>DEFINE FIELD REPT.OLD.MISS (EXONE FG GRP)
</nowiki></p>
<var class="product">User Language</var> fragment:
<p class="code"><nowiki>If REPT.OLD.MISS Is Present Then Print 'Present'
Else Print 'Not Present'; End If
</nowiki></p>
Result prior to reorg:
<p class="output"><nowiki>Not Present
</nowiki></p>
Result after reorg:
<p class="output"><nowiki>Present
</nowiki></p>
===REPT -> ONE STORE-x NONE===
Case: Changing a field that was <var>REPEATABLE</var> in the <var>UAI</var> to <var>AT-MOST-ONE</var>,
with either <var>STORE-DEFAULT NONE</var> or <var>STORE-NULL NONE</var>.
Changed definition in <var>LAI</var>:
<p class="code"><nowiki>DEFINE FIELD REPT.OLD.XX (ONE DV 'xx' SD NONE FG GRP)
</nowiki></p>
<var class="product">User Language</var> fragment:
<p class="code"><nowiki>If REPT.OLD.XX Is Present Then Print 'Present'
Else Print 'Not Present'; End If
</nowiki></p>
Result prior to reorg:
<p class="output"><nowiki>Present
</nowiki></p>
Result after reorg:
<p class="output"><nowiki>Not Present
</nowiki></p>
===ONE -> ONE with changed DV===
Case: Changing a field that was <var>AT-MOST-ONE</var> in the <var>UAI</var> to a
different <var>DEFAULT-VALUE</var> in the <var>LAI</var>.
Changed definition in <var>LAI</var>:
<p class="code"><nowiki>DEFINE FIELD AMO.OLD.DF_YY (ONE DV 'ZZ' FG GRP)
</nowiki></p>
<var class="product">User Language</var> fragment:
<p class="code"><nowiki>Print AMO.OLD.DF_YY
</nowiki></p>
Result prior to reorg:
<p class="output"><nowiki>YY
</nowiki></p>
Result after reorg:
<p class="output"><nowiki>ZZ
</nowiki></p>
===ONE -> EXONE===
Case: Changing a field that was <var>AT-MOST-ONE</var> in the <var>UAI</var> to <var>EXACTLY-ONE</var>
in the <var>LAI</var>.
Changed definition in <var>LAI</var>:
<p class="code"><nowiki>DEFINE FIELD AMO.OLD.DF_YY (EXONE FG GRP)
</nowiki></p>
<var class="product">User Language</var> fragment:
<p class="code"><nowiki>If AMO.OLD.DF_YY  Is Present Then Print 'Present'
Else Print 'Not Present'; End If
</nowiki></p>
Result prior to reorg:
<p class="output"><nowiki>Not Present
</nowiki></p>
Result after reorg:
<p class="output"><nowiki>Present
</nowiki></p>
===ONE with DV -> REPT===
Case: Changing a field that was <var>AT-MOST-ONE</var> with <var>DEFAULT-VALUE</var> in the <var>UAI</var> to <var>REPEATABLE</var> in the <var>LAI</var>.
Changed definition in <var>LAI</var>:
<p class="code"><nowiki>DEFINE FIELD AMO.OLD.DF_YY (REPT FG GRP)
</nowiki></p>
<var class="product">User Language</var> fragment:
<p class="code"><nowiki>Print '>' With AMO.OLD.DF_YY With '<'
</nowiki></p>
Result prior to reorg:
<p class="output"><nowiki>>YY<
</nowiki></p>
Result after reorg:
<p class="output"><nowiki>><
</nowiki></p>
===ONE SD LIT/ALL -> SD NONE===
Case: Changing a field that was <var>AT-MOST-ONE</var> with <var>STORE-DEFAULT</var> <code>LIT</code> or <code>ALL</code> in
the <var>UAI</var> to <var>STORE-DEFAULT NONE</var> in the <var>LAI</var>.
Changed definition in <var>LAI</var>:
<p class="code"><nowiki>DEFINE FIELD AMO.OLD.SD_LIT (ONE DV 'AA' SD NONE FG GRP)
</nowiki></p>
<var class="product">User Language</var> fragment:
<p class="code"><nowiki>If AMO.OLD.SD_LIT  Is Present Then Print 'Present'
Else Print 'Not Present'; End If
</nowiki></p>
Result prior to reorg:
<p class="output"><nowiki>Present
</nowiki></p>
Result after reorg:
<p class="output"><nowiki>Not present
</nowiki></p>
===Non-EXONE SN LIT/ALL -> SN NONE===
Case: Changing a field that was <var>AT-MOST-ONE</var> or <var>REPEATABLE</var> with <var>STORE-NULL</var>
<code>LIT</code> or <code>ALL</code> in the <var>UAI</var>, to <var>STORE-NULL NONE</var> in the <var>LAI</var>.
There is one exception to this, which does not produce a warning:
if the field was not a member of a
fieldgroup in the <var>UAI</var>, and it is a member of a fielgroup in the <var>LAI</var>.
Note that the "out of sync" check of this "collecting
loose fields" <var>LAI</var> feature ensures there is no exposure
to a change in <var class="product">User Language</var> behavior when using such a field.
Changed definition in <var>LAI</var>:
<p class="code"><nowiki>DEFINE FIELD REPT.OLD.NUL (REPT SN NONE FG GRP)
</nowiki></p>
<var class="product">User Language</var> fragment:
<p class="code"><nowiki>If REPT.OLD.NUL Is Present Then Print 'Present'
Else Print 'Not Present'; End If
</nowiki></p>
Result prior to reorg:
<p class="output"><nowiki>Present
</nowiki></p>
Result after reorg:
<p class="output"><nowiki>Not Present
</nowiki></p>
{{Template:Content index: V7.8 Release Notes}}

Latest revision as of 21:42, 17 October 2013

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