Products Downloads


French version


 

 

      

      

SADELIA

WADELIA

      

 

 

(B) (S)

(I/B) (C/S)

 

 

Warning: this instruction can be used in a batch program only for the *VARMSG mode.

 

Section for use

All

 

Syntax

SEND_MSG MsgNumOrAlphaVarId SeriesParameters Mode

SEND_MSG *CLR_ALL

 

MsgNumOrAlphaVarId

MsgNum | &AlphaVarId

 

 

 

Mode

*BOX(*OK) | *VARMSG(VarMsg) | None

 

 

 

VarMsg

Level1VarMsgId | Level1VarMsgId, Level2VarMsgId

 

Description

When *VARMSG mode is not used, this instruction displays a message. The message appears where the standard tag is placed when the mode is not specified.

If *BOX(*OK) mode is specified, the message appears in a box displayed above the browser window. The user must click the OK button to close the message box.

If *VARMSG mode is specified, the message is not displayed, but the level 1 message is placed in the alphanumerical variable Level1VarMsgId, and the level 2 message is placed in the alphanumerical variable Level2VarMsgId (if specified). When *VARMSG mode is used in a server part, the error message file corresponding to the server platform must be present in the server context. For the Windows and Java server parts, if the developer wishes to use a message in a given language, he needs to have set the server language via the VaToolBxSetServerLanguage function. On the other hand, for an AS/400 server part, the first error message file with the correct name in the library list is used so the one with the desired language must be put first.

 

If the *VARMSG mode is stipulated, the reserved word *RETURN_CODE is updated, making it possible to detect if the error message file has not been found or the message identifier does not exist (in the case of a dynamic call for example: SEND_MSG & MyAlpha7OfMessage...)

 

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

The variable AlphaVarId must be an ALPHA(7) variable and contain the message's full name (prefix + message number).

Parameters (variable identifiers for the data environment) can be indicated if the message was defined with parameters.

 

The instruction also lets you clear the list of messages using *CLR_ALL to clear all.

 

Example

SEND_MSG  MSG0002  *BOX(*OK)

 

SEND_MSG  MSG0003  PARAM1

 

SEND_MSG  MSG0003 PARAM1 *VARMSG(VARMSG1)

 

ALPHAVAR = 'MSG0002'

SEND_MSG  &ALPHAVAR

* where ALPHAVAR is ALPHA(7)

 

See also the list of 4GL instructions by topic

↑ Top of page

  • Aucune étiquette