$Fsterr: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
<p>The $FSTERR function returns a variable length string of up to 79 characters that contains the prefix and the first counting error message or request cancellation message you received since the last time that the count was reset to zero. $FSTERR returns a null value, if <var class="product">Model&nbsp;204</var> has not received a counting error or request cancellation message since:</p>
<p>The <var>$FstErr</var> function returns a string containing the prefix and text of the first counting error message or request cancellation message received by the user. </p>
<p>A null value is returned if no counting error or request cancellation message has been received since:</p>
<ul>
<ul>
<li>The beginning of your <var class="product">Model&nbsp;204</var> session</li>
<li>The beginning of the user's <var class="product">Model&nbsp;204</var> session</li>
</li>
</li>
<li>The last call to the <var>[[$ERRCLR]]</var> function</li>
<li>The last call to the <var>[[$ERRCLR]]</var> function</li>
</li>
</li>
<li>Processing a User Language OPEN statement</li>
<li>Processing a <var class="product">SOUL</var> <var>Open</var> statement</li>
</li>
</li>
</ul>
</ul>
<p>For more information about counting errors or request cancellation messages, refer to the Rocket <var class="product">Model&nbsp;204</var> Messages Manual. To return the most recent error message, refer to the <var>[[$ERRMSG]]</var> function. $FSTERR is not available for Host Language Interface applications. The $FSTERR function takes no arguments.</p>
<p>Refer to the Rocket <var class="product">Model&nbsp;204</var> Messages Manual for more information on counting messages. This function takes no arguments.            </p>
<p>The $FSTERR function requires an additional 88 bytes in the fixed portion of the server.</p>
<p><var>$FstErr</var> is not available for Host Language Interface applications. </p>
<p>The <var>$FstErr</var> function requires an additional 88 bytes in the fixed portion of the server.</p>
<b>Example</b>
<b>Example</b>
<p>An example of the $FSTERR function with an ON ERROR unit follows. For more information, refer to [[Subroutines#ON units|ON units]].   </p>
<p>A sample <var>$FstErr</var> function with an <var>On Error</var> unit follows. To learn about <var>On Error</var> units, see [[Subroutines#ON units|ON units]].</p>
<p class="code">BEGIN
<p class="code">begin
FSTERR.PROCON ERROR
fsterr.procon error
                   PRINT 'THE REQUEST IS ENDING'
                   print 'The request is ending'
                   PRINT 'THE FIRST ERROR MESSAGE WAS:'
                   print 'The first error message was:'
                   PRINT $FSTERR
                   print $fstErr
               END ON
               end on
 
GET.RECS:      FIND ALL RECORDS FOR WHICH
get.recs:      find all records for which
                   AGENT = BLAKE
                   agent = blake
               END FIND
               end find
               FOR EACH RECORD IN GET.RECS
               for each record in get.recs
              .
                  .
                .
                  .
                END FOR
              end for
END
end
</p>
</p>
<p>The maximum length of the returned string is determined by the setting of the <var>[[ERRMSGL parameter|ERRMSGL]]</var> parameter. That parameter defaults to 80 which means a maximum of 79 characters are returned, but <var>ERRMSGL</var> can be set as high as 256 which means up to 255 characters would be returned.
==See also==
==See also==
<ul>
<ul>
<li>the [[IFGERR IFAM function]]
<li>the [[IFGERR IFAM function]]
<li><var>[[$ERRMSG]]</var>, which returns the <b>most recent</b> counting error message.
<li><var>[[$ERRMSG]]</var>, which returns the <b>most recent</b> counting error message.
<li>The [[ERRMSGL parameter]], which determines the length of errors returned by <var>[[$ERRMSG]]</var> and <var>[[$FSTERR]]</var>.
<li>The <var>[[ErrMsgL parameter|ERRMSGL]]</var>, which determines the length of errors returned by <var>$ErrMsg</var> and <var>$FstErr</var>.
</ul>
</ul>
[[Category:SOUL $functions]]
[[Category:SOUL $functions]]

Revision as of 22:57, 26 April 2014

The $FstErr function returns a string containing the prefix and text of the first counting error message or request cancellation message received by the user.

A null value is returned if no counting error or request cancellation message has been received since:

  • The beginning of the user's Model 204 session
  • The last call to the $ERRCLR function
  • Processing a SOUL Open statement

Refer to the Rocket Model 204 Messages Manual for more information on counting messages. This function takes no arguments.

$FstErr is not available for Host Language Interface applications.

The $FstErr function requires an additional 88 bytes in the fixed portion of the server.

Example

A sample $FstErr function with an On Error unit follows. To learn about On Error units, see ON units.

begin fsterr.proc: on error print 'The request is ending' print 'The first error message was:' print $fstErr end on get.recs: find all records for which agent = blake end find for each record in get.recs . . end for end

The maximum length of the returned string is determined by the setting of the ERRMSGL parameter. That parameter defaults to 80 which means a maximum of 79 characters are returned, but ERRMSGL can be set as high as 256 which means up to 255 characters would be returned.

See also

  • the IFGERR IFAM function
  • $ERRMSG, which returns the most recent counting error message.
  • The ERRMSGL, which determines the length of errors returned by $ErrMsg and $FstErr.