Products Downloads


French version


 


      

VADELIA

      

WADELIA



(I) (C/S)


(I) (C/S)



Section for use

VERIFICATION and procedure


Syntax

PREPARE_MSG MsgNumOrAlphaVarId GraphicalObjectIdOrAlphaVar Mode


MsgNumOrAlphaVarId

MsgNum | &AlphaVarId

GraphicalObjectIdOrAlphaVar 

 GraphicalObjectId | &ObjectAlphaVarId

Mode

*BOX | None


Description

This instruction prepares a message to be displayed in the event of an error, anomaly or warning.

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

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

The instruction is authorised in a procedure only if it is directly called from a VERIFICATION paragraph. In this case, the graphical object must be described by the name of its window or page and must belong to the window (or page) corresponding to the VERIFICATION paragraph which called the procedure.


Visual Adelia Context

A graphical object name can be specified in an ObjectAlphaVarId variable by prefixing it with the & character. The ObjectAlphaVarId variable must be ALPHA type and contain the graphical object name. It is possible to only specify the names of graphical objects belonging to the window corresponding to the VERIFICATION paragraph in progress or the VERIFICATION paragraph which called the procedure. An ObjectAlphaVarId variable cannot be used in a server part.


The message appears in a message box, and may or may not interrupt processing, depending on the Mode set.


If the mode is set to *BOX, the message box will suspend the application until the user clicks on the OK button.


Adelia Web Context

If the mode is set to *BOX, the message will appear in a box which is displayed above the browser window. The user has to click on the OK button to close the message box.


If the mode is not set to *BOX, the message will display at the place where the error tag (with the same name as the graphic object) is, if it exists. Otherwise, the error message appears at the place where the standard error tag is.


Important note: ERROR, ANOMALY, and WARNING instructions corresponding to a PREPARE_MSG instruction in *BOX mode are not permitted in server blocks.


Example

IF   Z_AMOUNT = 0

PREPARE_MSG 0011 Z_AMOUNT

ANOMALY

END


MESSAGENAME = 'MSG0012'

* where MESSAGENAME is declared as ALPHA(7)

IF   Z_AMOUNT > WMAX_AMOUNT

PREPARE_MSG &MESSAGENAME Z_AMOUNT

ANOMALY

END


In Visual only:


IF   Z_AMOUNT> WMAX_AMOUNT

        OBJECTNAME = 'Z_AMOUNT'

ELSE_IF Z_TOTAL > WMAX_AMOUNT

        OBJECTNAME = 'Z_TOTAL'

END

PREPARE_MSG 0025 &OBJECTNAME 

ANOMALY


↑ Top of page

  • Aucune étiquette