Utility Formatting Routines
DMTMGFFM also contains several utility routines that assist in the message formatting process.
The MGFNEWLN routine allocates a MSGLINE by calling DMTQSAAB and adds it to the MSGLINE chain for the message. This MSGLINE is usually added to the end of the MSGLINE chain to ensure that the each line of the message is displayed in the correct order. For columnar message headers, however, MGFNEWLN adds the new MSGLINE to the start of the chain.
CHECKFLD determines the columns to be included in a columnar message by checking the MSGBSHOW bit mask. The MOVETEXT routine moves text into its correct location in the MSGLINE and updates the pointer to the end of the message text. If there is not enough space in the MSGLINE for the substitution text, the text is truncated.