Trail: PROIV Documentation > Developer > PROIV Developer > Developing Functions > Events and Logic > GMSG

 

 

Purpose

GMSG displays a user-defined error or processing message. 
 

Syntax

GMSG (operand1 {operand2,} {operand3}…)
 

Operation

operand1  is a literal value.
o
perand2 etc are parameters to the command.  The global messages should have replaceable tokens to be substituted by these parameters.  The placeholders are placeholder numbers prefixed by a “%" (percent) sign.
 

Remarks

Messages are defined in the PROIV System Message file, MSGF, using the Global Messages utility.

Global messages are displayed on the last line of the screen.  The order of priority of message output is:

1 GMSG Global Messages (highest priority).


2 MSG Messages. Messages defined at the MSG prompt of File Definition screen @F (lowest priority).

If the message is not defined in the message file, then the GMSG statement outputs a blank error message. This can be used to suppress display of system error messages. If there are no placeholders in the defined global message and parameters are passed with the GMSG command, PROIV ignores the parameters.  

The maximum length of global messages with the parameters substituted is 80 characters.  The message is truncated if it is longer than 80 characters.

Error messages defined in Global Logic are local to the Global Logic. 
 

On Read Error Logic

In logic associated with the event process point On Read Error, a global message overrides the system error message.  When developing an application, GMSG should be used in On Read error logic to display customized error messages that are meaningful to the operator.
 

Dynamic Object Logic

In logic associated with a Dynamic Object, a global message is treated as a warning message.  Executing a GMSG command here does not affect processing control.
 

General Check Logic

In logic associated with the event process point General Check, a global message is treated as an error message.  Issuing a message in General Check logic affects processing control.  If GMSG is executed in General Check logic, the message appears and PROIV re-prompts for input of the field.
 

Special Check Logic

A Global Logic may be specified as a Special Check.  In this logic a global message is treated as an error message.  Issuing a message in Special Check logic affects processing control.  If GMSG is executed in Special Check logic, the message appears and PROIV re-prompts for input of the field.
 

Example 1

IF #INPUT > 500 THEN
  GMSG (ENG11)
ENDIF
where global message ENG11 has been defined as VALUE ENTERED MUST NOT EXCEED 500.
 

Example 2

IF #INPUT > 500 THEN
                GMSG(ENG11,"GREATER")
ENDIF
IF #INPUT < 500 THEN
                GMSG(ENGL11,"LESS")
ENDIF


Where global message ENG11 has been defined as: VALUE ENTERED IS %1 THAN 500.
If #INPUT is 400 the following  appears: "VALUE ENTERED IS LESS THAN 500"
If #INPUT is 600 the following appears: "VALUE ENTERED IS GREATER THAN 500"
 

Comment on this topic

Topic ID: 520064

 
 
 

Table of Contents

Index

Glossary

-Search-

Back