HP 3000 Manuals

FERRMSG [ KSAM/3000 Reference Manual ] MPE/iX 5.0 Documentation


KSAM/3000 Reference Manual

FERRMSG 

INTRINSIC NUMBER 307

Returns message corresponding to FCHECK error number.

                I       LA       I
     FERRMSG(errorcode,msgbuf,msglgth);

A call to FERRMSG causes a message to be returned to msgbuf that
corresponds to an FCHECK error or number.  This makes it possible to
display an error message from your program.  The message describes the
error associated with the error number provided in the parameter
errorcode.

PARAMETERS 

errorcode        integer (required) 

                 A word identifier containing the error code for which a
                 message is tobe returned.  It should contain an error
                 number returned by FCHECK.

msgbuf           logical array (required) 

                 A logical array to which the message associated with
                 errorcode is returned by FERRMSG. In order to contain
                 the message string, msgbuf must be defined as at least
                 72 characters (36 words) long.

msglgth          integer (required) 

                 A word identifier to which is returned the length of the
                 msgbuf string.  The length is returned as a positive
                 byte count.

CONDITION CODES 

Condition codes are not returned by this procedure.

USING FERRMSG 

This intrinsic is called usually following a call to FCHECK. The error
code returned in the call to FCHECK can then be used as a parameter in
the call to FERRMSG.

For example, suppose a CCL condition is returned by a call to FCLOSE, a
call to FCHECK requests the particular eff or code, then a call to
FERRMSG can be used to retrieve a printable message associated with the
code.

         FCLOSE(FILNUM,1,0);
         IF<
         THEN BEGIN
      FCHECK(FILNUM,ERRNUM);
      FERRMSG(ERRNUM,MESSAGE,LENGTH);
      PRINT(MESSAGE,-LENGTH,0);
     END
         TERMINATE;

The message printed explains the FCHECK code.  If the FCHECK code has no
assigned meaning, the following message is returned:

         UNDEFINED ERROR errorcode 



MPE/iX 5.0 Documentation