ProvideX V8.20 > Language Reference > 2. Directives
207
MESSAGE_LIB Directive
             Establish Message Library
Formats
1. Designate Message Library: MESSAGE_LIB filename$[,NBF=num][,ERR=stmtref]
MESSAGE_LIB ADD filename$[,NBF=num][,ERR=stmtref]
2. Add Library to Top of List:
3. Remove Library from List: MESSAGE_LIB DROP filename$[,ERR=stmtref]
MESSAGE_LIB POP [,ERR=stmtref]
4. Remove Top Library from List:
Where:
filename
Name of the variable length Direct/Keyed file to be used as a Message
Library. String expression.
num
Number of buffers to allocate.
stmtref
Program line number or label to transfer control to.
Description
Use the MESSAGE_LIB directive to designate files as containing messages to be
returned by the MSG( ) function. A message library must be a variable length Direct
/ Keyed file with the message identifier as the key. The record contains the message.
As of Version 4.12, there is an alternate key to the *msglib.en (and any newly
created MESSAGE_LIB files) on the first 50 characters of the message field.
See Also
MSG( ) Function, p.482
KEYED Create Single/Multi-Keyed File, p.165
DIRECT Create File with Keyed Access, p.88
Format 1: Designate Message Library
MESSAGE_LIB filename$[,NBF=num][,ERR=stmtref]
Use this format to designate and add filename(s) to the MESSAGE_LIB list.
In earlier versions of ProvideX, only one message library could be active at a time ­
when using a MESSAGE_LIB directive. ProvideX closed any other currently active
message library and designated your given file as the new one. Currently, you can
now have more than one message library active at a time. With use of the MSG( )
function, the message libraries are searched in order until a match is found.
An error is generated if the file cannot be properly opened. Use NBF= to specify the
number of buffers to allocate. The filename$ expression can contain one or more
MESSAGE_LIB filenames, each SEP-separated, so that you can reset the entire list in
one command.