Products Downloads


French version


 

 

ADELIA

      

      

      

      

(I)

 

 

 

 

 

Warning: This instruction is used in "error message subfile" mode.

 

Section for use

All

 

Syntax

SEND_MSG MsgNumOrAlphaVarId SeriesVarId

SEND_MSG *CLR_ALL

SEND_MSG *CLR_OLD

 

MsgNumOrAlphaVarId

MsgNum | &AlphaVarId

 

 

 

SeriesVarId

SeriesVarId VarId | None

 

Description

This instruction is used to send a message in the message subfile associated with the program. The message is displayed with the transaction.

 

The message identifier MsgNum is defined as 4 characters (message number) or as 7 characters (prefix + message number).

 

The variable AlphaVarId must be a seven-character alpha variable that contains the message's full name (prefix + number).

This is only possible with the RPG generator.

 

The message must be present in the message file.

 

The variables SeriesVarId are optional. They are used to define a message having variable fields. These are defined within the message by &1, &2,...up to &5.

 

Important note: At the beginning of the transaction's initialization and verification, the message subfile is automatically reset to blank, except if the *CLR_MSGSFL reserved word is set to 1; in this case, the user must clear the error message subfile by using the SEND_MSG *CLR_ALL instruction.

 

The SEND_MSG instruction can also be used to clear the subfile messages by setting as parameters *CLR_ALL or *CLR_OLD instead of the message number:

    • *CLR_ALL clears all messages in the message subfile.

    • *CLR_OLD clears the former messages which have already been displayed.

Important note: Normal error message process is handled with the instructions PREPARE_MSG, INIT_MSG, ERROR, and ANOMALY.

 

Example

SFTKYS_PROCESS 02

* Prompt functions for transaction 2

SFTKY ZZ_CUST_CODE

* F4 to select customers

CALL CUSTOMER_WDW ZZ_CUST_CODE

END_SFTKY

*

SFTKY ZZ_ITEM_CODE

* F4 to select items

CALL ITEM_WDW ZZ_ITEM_CODE

END_SFTKY

*

* Error message SFT0002 if cursor is not in correct location

SEND_MSG SFT0002

END_SFTKYS_PROC

 

Other example

 

WVAR_MSG ='MSG0012'

SEND_MSG &WVAR_MES PW_USER_NAME

* where PW_USER_NAME is a parameter variable sent to the message.

* It is defined in the message as &1.

 

See also the list of 4GL instructions by topic

↑ Top of page

  • Aucune étiquette