Create a message file

To create your own predefined messages, you must first create the message file into which the messages are to be placed.

Use the Create Message File (CRTMSGF) command to create the message file. You then use the Add Message Description (ADDMSGD) command to describe your messages and place them in the message file.

On the Create Message File (CRTMSGF) command, you can specify the maximum size in K bytes on the SIZE parameter. The following formula can be used to determine the maximum:

S + (I x N)

where the following variables are true:

S
Is the initial amount of storage
I
Is the amount of storage to add each time
N
Is the number of times to add storage

The defaults for S, I, and N are 10, 2, and *NOMAX, respectively.

For example, you specify S as 5, I as 1, and N as 2. When the file reaches the initial storage amount of 5K, the system automatically adds another 1K to the initial storage. The amount added (1K) can be added to the storage two times to make the total maximum of 7K. If you specify *NOMAX as N, the maximum size of the message file is 16M.

When you specify a maximum size for a message file and the message file becomes full, you cannot change the size of the message file. You then need to create another message file and recreate the messages in the new file. The Merge Message File (MRGMSGF) command can be used to copy message descriptions from one message file to another. Since you will want to avoid this step, it is important to calculate the size needed for your message file when you create it, or specify *NOMAX.

Related information
CL command finder
Add Message Description (ADDMSGD) command
Create Message File (CRTMSGF) command