You use MSGCON, a field-level keyword to declare the text for constant fields is contained in a message description.
Years ago, this was used by a lot of companies to create multilingual display files.
The idea was that you could remove the ENGLISH language fields from every *DSPF and replace with MSGCON links to message files. Then you can ship your application with a ENGLISH, SPANISH, FRENCH or whatever language translated message file and *boom* the application is displayed in that language.
Personally, I found it horrible to work with. Using SDA to edit a screen that is filled with screen constants is a nightmare because you have to be extra careful to keep track of which field is which. But, there I go, digressing into moaning moaney land.
But, it warrants a little explanation in case you are trying to figure it out.
If the message description does not exist at DDS compilation time, the file will not be created. If you change the message description, you need to create the file again if you want the display file to contain the updated message.
The message-file-name parameter identifies the message file that contains the message description. The library-name parameter is optional.
The MSGCON keyword must be explicitly specified for the field and cannot be used to initialize a named field.
The DFT and MSGCON keywords are functionally equivalent. If you specify the DFT and MSGCON keywords for the same field, the MSGCON keyword is ignored and the file is not created.
The following example shows how to specify the MSGCON keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R RECORD1 00020A 2 1MSGCON(10 MSG0001 MESSAGE/MSGF) A
MSG0001 in message file MSGF in library MESSAGES contains the message text.
IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Alpha Nerd and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and in the words of the most interesting man in the world: Stay thirsty my friend.
Varying Length fields in DDS and IBM i SQL
Adding bar codes to good old fashioned spool reports | AS400 RPG BARCODE OVERLAY
Modernizing AS400 Green Screens
Interview Question and Answer – AS400 things you should know
IBM i SQL vs DDS – Is SQL faster than CPYF Native IO?
Controlling DSPF color without using indicators
IBM i DDS Edit Codes
An old AS400 Quiz willed with technical questions and plain old fashioned AS/400 brainteasers
Upgrade from PF to DDL (SQLSTM) using TURNOVER from UNICOM SOFTLANDING