HPlogo MPE/iX Intrinsics Reference Manual > Chapter 6 Command Definitions (FLUSHLOG-GETUSERMODE)

GENMESSAGE

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701 ♥
Edition 7 E0300
Edition 6 E0195

NM and CM callable (differences noted below).

Provides access to messages in catalogs that were formatted with the MAKECAT utility.

Syntax



  I16                      I16V     I16V    I16V    CA
  msglength := GENMESSAGE (filenum, setnum, msgnum, buffer,
                           I16V        I16V
                           buffersize, parmask,
                           *       *       *       *       *
                           param1, param2, param3, param4, param5,
                           I16V            I16
                           msgdestination, errornum);

Functional Return


msglength

16-bit signed integer (assigned functional return)

Returns the length of the message (in bytes).

Parameters


filenum

16-bit signed integer by value (required)

Passes the file number that specifies the message catalog.

setnum

Positive 16-bit signed integer by value (required)

Passes the message set number within the catalog (>0,<63).

msgnum

Positive 16-bit signed integer by value (required)

Passes the message number within the message set (>0,<32767).

buffer

character array (optional)

Returns the assembled message.

buffersize

16-bit signed integer by value (optional)

Returns the length of buffer. If buffer is specified, the length is in bytes. If buffer is not specified, returns the length (in bytes) of the records to be written to the destination file.

Default: 72 bytes

(For a single-line message, the combined length of the message number, a blank space separator, and message text must not exceed the default buffer size of 72 bytes.)

parmask

16-bit signed integer by value (optional)

Passes a mask indicating parameter types for param1 through param5. The bit settings are:

BitsValue/Meaning
13:3, 10:3,
7:3, 4:3, 1:3
param5-4-3-2-1 type:
000 String, terminated by an ASCII null (0)
001 16-bit signed integer
010 32-bit signed integer by reference
011 Ignored
0:1value:
1 Ignore rest of word and parameters param1 through param5.
0 Rest of word, in 3-bit groupings, specifies parameter types for param1 through param5.

Default: param1 through param5 are ignored.

param1 through param5

type varies (optional)

(NM) Passes the parameter to be inserted into the message. If parmask is 000 (string), pass the 32-bit address of the array containing the string. If parmask is 001 (16-bit signed integer), pass a signed 16-bit integer (a value from -32,768 through 32,767). If parmask is 010 (32-bit signed integer by reference), pass the 16-bit address of the word identifier that returns the value.

(CM) Passes the parameter to be inserted into the message. If parmask is 000 (string), pass the 16-bit address of the array containing the string. If parmask is 001 (16-bit signed integer), pass a signed 16-bit integer (a value from -32,768 through 32,767). If parmask is 010 (16-bit signed integer by reference), pass the 16-bit address of the word identifier that returns the value.

msgdestination

16-bit signed integer by value (optional)

Returns the file number of the message's destination file (0 or -1=$STDLIST, >2=file number of the destination file).

Default: $STDLIST if you do not specify buffer, no file if you do specify buffer.

errornum

16-bit signed integer by reference (optional)

Returns one of the following values, indicating the success or failure of the intrinsic call.

ValueMeaning
0Successful
1FREADLABEL call on catalog file failed
2FREAD call on catalog file failed
3Specified setnum not found in catalog
4Specified msgnum not found in catalog
6Message overflowed buffer (if msgdestination specified, message routed correctly)
7Write to destination file failed
8Catalog file opened with improper access options
11filenum was not specified
12setnum was not specified
13msgnum was not specified
14setnum < 0 was specified
15setnum > 62 was specified
16msgnum <= 0 was specified
17buffersize <= 0 was specified
18msgdestination <= -2 was specified
19Reference parameter out of bounds

Operation Notes


The calling program opens a message catalog, allowing the insertion parameters supplied by GENMESSAGE. Depending on how the msgdestination and buffer parameters are defined, GENMESSAGE then routes the message to its destination. To route the message to a file, specify msgdestination. To return the message to a calling program, specify buffer. To do both, specify both msgdestination and buffer.

Open the catalog file as a permanent ASCII file with the NOBUF and MULTI access options enabled.

Condition Codes


CCE (2)Request granted.
CCG (0)Request denied. File system error.
CCL (1)Request denied. Missing required parameter, invalid parameter, or invalid file number of catalog or destination file.

Related Information


Intrinsics CATCLOSE, CATOPEN, CATREAD
Manuals Message Catalogs Programmer's Guide




FWRITELABEL


GETDSEG