ERR3270 [ SNA IMF Programmer's Reference Manual ] MPE/iX 5.0 Documentation
SNA IMF Programmer's Reference Manual
ERR3270
ERR3270returns the error messageassociated with a given intrinsic result
code.
Syntax
_____________________________________________________
| |
| I CA I I |
| ERR3270 (errorcode, msgbuf, msglen, result)|
_____________________________________________________
Parameters
errorcode (input)
An integer value returned in the result parameter of a previous SNA IMF
intrinsic call.
msgbuf (output)
Character array where the message associated with the errorcode will be
returned. This string must be large enough to hold up to 144 characters.
If a bounds violation occurs while you are using msgbuf, you will
receive a result of 26, and you will not receive a message in msgbuf.
msglen (output)
Integer indicating the number of characters actually returned in msgbuf.
If an error occurs while you are using msglen, both a message and a
message length are returned to your program. See the result parameter
for ERR3270. If a bounds violation occurs while you are using msglen,
you will not receive a value for msglen.
result (output)
The following values can be generated by the ERR3270 intrinsic:
<0 = (Less than zero) Indicates this result code
originated with the MPE V intrinsic, GENMESSAGE, or
with the MPE XL intrinsic CATREAD. Look up the
absolute value of the result code under GENMESSAGE
in the MPE V Intrinsics Reference Manual, or under
CATREAD in the MPE XL Intrinsics Reference Manual.
0 = Successful completion.
22 = BASIC calling sequence error has occurred.
25 = Intrinsic call made while in split stack mode.
26 = Intrinsic call made with the parameter value
out of bounds.
30 = Internal error occurred in IMF intrinsic.
Description
ERR3270 takes the result code from a previous intrinsic call and returns
the message that corresponds to that result code. You pass the result
code to the ERR3270 intrinsic in the errorcode parameter, and the
corresponding message is returned in the msgbuf parameter.
Appendix A contains a list of all intrinsic result codes, their
corresponding messages, their probable causes, and the recommended
actions for resolving problems.
SNA IMF messages are kept in a message catalognamed CATIMF.PUB.SYS. With
the appropriate MPE file access capabilities, you may change the messages
in CATIMF to suit your needs. The procedure for changing diagnostic
messages is explained in the MPE V Intrinsics Reference Manual.
Use the ERR3270 intrinsic in transparent or non-transparent mode.
COBOL Calling Sequence
CALL "CERR3270" USING ERRORCODE MSGBUF MSGLEN RESULT. (on MPE V and in
compatibility mode on MPE XL)
CALL INTRINSIC "ERR3270" USING ERRORCODE MSGBUF MSGLEN RESULT. (in native
mode on MPE XL)
All parameters are numeric data items except MSGBUF, which is an
alphanumeric data item.
FORTRAN Calling Sequence
CALL ERR3270 (ERRORCODE, MSGBUF, MSGLEN, RESULT)
All parameters are integer variables except MSGBUF, which is a character
array.
BASIC Calling Sequence
CALL BERR3270 (E, M$, L4, R) (on MPE V and in compatibility mode on MPE
XL)
CALL ERR3270 (E, M$, L4, R) (in native mode on MPE XL)
All parameters are integer variables except M$, which is a string
variable.
SPL Calling Sequence
ERR3270 (ERRORCODE, MSGBUF, MSGLEN, RESULT)
All parameters are integer variables except MSGBUF, which is a byte
array.
Pascal Calling Sequence
ERR3270 (ERRORCODE, MSGBUF, MSGLEN, RESULT);
All parameters are short integers except MSGBUF, which is a packed array
of char.
C/XL Calling Sequence
ERR3270 (&ERRORCODE, MSGBUF, &MSGLEN, &RESULT);
All parameters are of type short except MSGBUF, which is an array of
characters (a pointer to a char).
Pascal Program Excerpts
Following are excerpts from a Pascal program that calls SNA IMF
intrinsics. For examples of complete Pascal programs in non-transparent
and transparent modes, see appendix F, "Sample Programs."
{************************** Global Declarations **************************}
type
shortint = -32768..32767; { global type, two bytes (half word) }
.
.
.
var
result : shortint;
.
.
.
procedure ERR3270; intrinsic;
.
.
.
{************************** Local Declarations **************************}
var
errorcode : shortint; { All ERR3270 variables }
msgbuf : packed array[1..160] of char; { except result }
msglen : shortint; { are local. }
.
.
.
{************** Variable Initialization and Intrinsic Call **************}
errorcode := result;
msgbuf := ' ';
ERR3270 (errorcode, msgbuf, msglen, result);
MPE/iX 5.0 Documentation