Call this procedure in order to get a printable string of
characters that describes the condition that corresponds to the
value of the status parameter. The string of ASCII characters returned
in message can be printed as an error message.
Operation Notes |
 |
The following example illustrates the use of BKERROR. Two strings are dimensioned for message; one (M$) is sufficiently long, the other (N$) causes
truncation of the message. Assume that the status code in S$ is
the value 22.
10 DIM S$(4),M$(72),N$(24)
20 REM..S$ IS THE STATUS STRING
30 REM..M$ IS A SUFFICIENTLY LARGE STRING
40 REM..N$ IS TOO SMALL FOR THE MESSAGE
50 REM..ASSUME S$ CONTAINS THE VALUE "22"
60 REM..
.
.
.
100 CALL BKERROR (S$,MS)
110 PRINT "ERROR";S$(1;1);"DETAIL";S$(2);"";M$
120 CALL BKERROR (S$,M$)
130 PRINT "ERROR "S$(1;1);"DETAIL";S$(2);"";N$
RUN
ERROR 2 DETAIL 2 INVALID KEY VALUE. DUPLICATED KEY VALUE
ERROR 2 DETAIL 2 INVALID KEY VALUE. DUPL
In another example, BKERROR is called to retrieve the message corresponding
to the MPE file system error code returned when the first character
of status is 9.
10 DIM S$(4),M$(72) . . . 50 IF S$(1;1)="9" THEN DO 60 CALL BKERROR(S$,M$) 70 PRINT"FILE ERROR";S$(2);"MEANS";M$ 80 DOEND |
Suppose the value returned in status is 9172. The routine above prints the following message
when the program is run:
FILE ERROR 172 MEANS KEY NOT FOUND; NO SUCH KEY VALUE |