HP 3000 Manuals

GENMESSAGE [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation


MPE/iX Intrinsics Reference Manual

GENMESSAGE 

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      |
|     msglength:=GENMESSAGE(filenum,setnum,msgnum,     |
|                            CA  I16V    I16V          |
|                           buffer,buffersize,parmask, |
|                             *      *      *      *   |
|                           param1,param2,param3,param4|
|                             *     I16V               |
|                           param5,msgdestination,     |
|                             I16                      |
|                           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:

                         Bits     Value/Meaning 

                         13:3     param5 type:

                                  000  String, terminated by an ASCII null (0)
                                  001  16-bit signed integer
                                  010  32-bit signed integer by reference
                                  011  Ignored

                         10:3     param4 type:

                                  000  String, terminated by an ASCII null (0)
                                  001  16-bit signed integer
                                  010  32-bit signed integer by reference
                                  011  Ignored

                          7:3     param3 type:

                                  000  String, terminated by an ASCII null (0)
                                  001  16-bit signed integer
                                  010  32-bit signed integer by reference
                                  011  Ignored

                          4:3     param2 type:

                                  000  String, terminated by an ASCII null (0)
                                  001  16-bit signed integer
                                  010  32-bit signed integer by reference
                                  011  Ignored

                          1:3     param1 type:

                                  000  String, terminated by an ASCII null (0)
                                  001  16-bit signed integer
                                  010  32-bit signed integer by reference
                                  011  Ignored

                          0:1     value:

                                  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        type varies (optional) 
param5 
                      (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.

                         Value    Meaning 

                           0      Successful

                           1      FREADLABEL call on catalog file failed

                           2      FREAD call on catalog file failed

                           3      Specified setnum not found in catalog

                           4      Specified msgnum not found in catalog

                           6      Message overflowed buffer (if msgdestination 
                                  specified, message routed correctly)

                           7      Write to destination file failed

                           8      Catalog file opened with improper access options

                          11      filenum was not specified

                          12      setnum was not specified

                          13      msgnum was not specified

                          14      setnum < 0 was specified

                          15      setnum > 62 was specified

                          16      msgnum <= 0 was specified

                          17      buffersize <= 0 was specified

                          18      msgdestination <= -2 was specified

                          19      Reference 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.

CCL (1)               Request denied.  File system error.

CCG (0)               Request denied.  Missing required parameter,
                      invalid parameter, or invalid file number of
                      catalog or destination file.

Related Information 

Intrinsics            None

Commands              None

Manuals               Message Catalogs Programmer's Guide (32650-90021)



MPE/iX 5.0 Documentation