arnold@mucs.UX.CS.MAN.AC.UK (Toby Howard) (10/27/87)
Does anyone know how to take the error number from a status(file) in Pascal and turn it into an error string? (Other than looking it up in the manual :-) ) Thanks... [This is a shared account. Please ignore the From: field, and reply to the following address. Thanks] Toby Howard Computer Graphics Unit, Manchester University, UK. janet: thoward@uk.ac.man.cs.cgu internet: thoward%cgu.cs.man.ac.uk@nss.cs.ucl.ac.uk
rbt@cernvax.UUCP (10/30/87)
In article <2071@mucs.UX.CS.MAN.AC.UK> thoward%cgu.cs.man.ac.uk@nss.cs.ucl.ac.uk (Toby Howard) writes: >Does anyone know how to take the error number from a status(file) in Pascal >and turn it into an error string? (Other than looking it up in the manual >:-) ) Thanks... There is a system routine that can be called to translate any VMS status code; I've never tested it versus Pascal error codes, but it should run. This routine is called SYS$GETMSG; it accepts 5 parameters whose Pascal declaration can be: function SYS$GETMSG(msgid: integer; var msglen: integer; var bufadr: packed array[1..256] of char; flags: integer; outadr: packed array [1..4] of char): integer; where: msgid is the error code (INPUT); msglen is the returned length of the message (OUTPUT); bufadr is the character string containing the message (OUTPUT); flags is a bit array which specifies the message components to be returned (15 means full message) (INPUT); outadr is the pointer to an optional information buffer, dummy (OUTPUT); The returned value can be SS$_NORMAL (all O.K.), SS$_BUFFEROVF (returned string truncated) or SS$_MSGNOTFND (message code cannot be found). So, if all the parameters have been passed properly, after the call to this routine you should have the error string in bufadr[1..msglen]. Cheers, Roberto Divia' =============