$ErrMsg: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
<p>The $ERRMSG function returns a variable length string of up to 79 characters containing the prefix and text of the last counting error message or request cancellation message received by the user. </p>
<p>The $ERRMSG function returns a string containing the prefix and text of the last 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>
<p>A null value is returned if no counting error or request cancellation message has been received since:</p>
<ul>
<ul>
Line 28: Line 28:
END   
END   
</p>
</p>
<p>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==
==See also==
<ul>
<ul>

Revision as of 21:21, 26 April 2014

The $ERRMSG function returns a string containing the prefix and text of the last 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 User Language OPEN statement

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

Example

A sample $ERRMSG function with an ON ERROR unit follows. To learn about ON ERROR units, see ON units.

BEGIN ERROR.PROC: ON ERROR PRINT 'THE REQUEST IS ENDING' PRINT 'THE LAST ERROR MESSAGE RECEIVED WAS:' PRINT $ERRMSG END ON GET.RECS: FIND ALL RECORDS FOR WHICH AGENT = CASOLA 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