Every call to ERR_REP results in the status value given being converted into its associated VAX/VMS message, and then this message is associated with the token STATUS. Hence the global status may be used to construct an error message as follows:
CALL ERR_REP( 'DSCALE_BAD','%DSCALE: ^STATUS', STATUS )
This method of constructing error messages makes the assumption that all status values and operating system error numbers form part of a homogeneous set which can easily be associated with some appropriate message text. It is therefore not portable from VAX/VMS to other computer systems. If the STATUS token is used on other systems, an attempt will be made to translate it as a Starlink facility status value.
Subroutines following the recommended error reporting strategy will always make an accompanying error report when the returned status is set to an error value. As a result, error reports based upon the reserved token STATUS are rarely necessary and limit the portability of ADAM software.
New code should not use the reserved token STATUS. If it is required to include the message associated with an error code in an error report, subroutine ERR_FACER should be used to create some other token.
MERS (MSG and ERR) Message and Error Reporting Systems