Products Downloads


French version


 

 

ADELIA

      

      

      

      

(I)

 

 

 

 

 

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

 

Section for use

VERIFICATION

 

Syntax

ANOMALY

 

Description

This instruction is used to send a non-halting error message within the VERIFICATION section.

 

The field indicated after the error message statement is set to reverse image; but the verification processing is not halted, and other messages can be sent after the first one. The value of the Adelia reserved word *ANOMALY is set to 1.

 

At the end of the VERIFICATION block, the reverse image and the message are sent because Adelia redisplays the transaction, and the program execution starts at the beginning of the transaction section.

The instructions which follow the VERIFY instruction are not executed.

 

The message display is performed by an error message subfile. It is therefore necessary to paginate the subfile to display all the messages.

The use of messages with variables is strongly recommended, so as to guide the user when searching for specific errors; see the INIT_MSG instruction.

 

Reverse-imaging is performed on all screen fields in error.

The cursor is placed on the first variable in error on the screen.

 

Important note: The differences between ERROR and ANOMALY are:

    • ERROR is an immediate halting error; it stops the verification process.
    • ANOMALY does not stop the verification process and loads all error messages in an error message subfile.
    • ERROR does not require an error message subfile; ANOMALY does.


Example

IF  Z_SALES_AMOUNT = 0

PREPARE_MSG 0011 Z_SALES_AMOUNT

ANOMALY

END

*

CHAIN PAYMENTS

IF  PAYMENTS DOES_NOT_EXIST

PREPARE_MSG 0013 Z_PAYMENT_CODE

INIT_MSG Z_PAYMENT_CODE

ANOMALY

END

If sales amount is equal to zero and payment code is not correct, then messages 0011 and 0013 are both loaded in the error message subfile;

message 0013 contains the value of the wrong payment code (INIT_MSG);

both screen fields are reversed; cursor is on Z_SALES_AMOUNT;

message 0011 is the first one displayed;

pressing the roll-up key when cursor is on message subfile will display message 0013.

 

See also the list of 4GL instructions by topic

↑ Top of page

  • Aucune étiquette