Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!homxb!whuts!mtune!rutgers!ukma!uunet!mcvax!cernvax!rbt From: rbt@cernvax.UUCP Newsgroups: comp.os.vms Subject: Re: Pascal run-time messages Message-ID: <552@cernvax.UUCP> Date: Fri, 30-Oct-87 04:32:33 EST Article-I.D.: cernvax.552 Posted: Fri Oct 30 04:32:33 1987 Date-Received: Tue, 3-Nov-87 02:16:43 EST References: <2071@mucs.UX.CS.MAN.AC.UK> Reply-To: rbt@cernvax.UUCP () Organization: CERN European Laboratory for Particle Physics, CH-1211 Geneva, Switzerland Lines: 32 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' =============