# DEF MSG Define Temporary Message

> Source: https://manual.pvxplus.com/directives/def-msg

## Formats

|  |  |  |
| --- | --- | --- |
| 1\. | *Override Message for Number:* | DEF MSG(*nnn*)="*message"* |
| 2\. | *Define Message & Name:* | DEF MSG(*name$*)="*message"* |
| 3\. | *Remove Message Override:* | DEF MSG(*nnn*) DELETE |
| 4\. | *Remove Message Name:* | DEF MSG(*name$***) DELETE** |

***Where:***

|  |  |
| --- | --- |
| *message* | String containing message text associated with *name$* or to override the message text in *nnn*. |
| *name$* | New system message name. |
| *nnn* | Message number from the system message library (i.e. *\_mlfile.en*). |

## Description

The **DEF MSG** directive allows you to change system messages on the fly. It can be used to temporarily override values returned by the **MSG( )** function for specific message numbers. It also allows the creation of text-based message names.

Note:  
To permanently define different system messages for a different language, create a *\*mlfile.xx* for a different language and use the \*msgupd program to define all the messages.  
  
See [Customizing System Messages for Different Languages](https://manual.pvxplus.com/pxplus-system-programs-and-files/message-library/overview#customizing).

## See Also

**[MSG( ) Return Message Text](https://manual.pvxplus.com/functions/msg)**  
**[MSGBOX Display Popup Message Box](https://manual.pvxplus.com/directives/msgbox)**  
**[MESSAGE_LIB Establish Message Library](https://manual.pvxplus.com/directives/message-lib)**
