Using message files at runtime

In order to use compiled message files (.iem) in programs, specify the current message file with the OPTIONS HELP FILE command:
OPTIONS HELP FILE "mymessages.iem"

The message file will first be searched with the string passed to the OPTIONS HELP FILE command (i.e. the current directory if the file is specified without a path), and if not found, the DBPATH / FGLRESOURCEPATH environment variable with be used.

After the message file is defined, you can start the help viewer by calling the SHOWHELP() function:
CALL showhelp(1242)
Use the HELP clause in a dialog instruction such as INPUT to define particular message number for that the dialog:
INPUT BY NAME ... HELP 455

The help viewer will automatically display the message text corresponding to the number when the user pressed the help key. By default, the help key is Ctrl-W in TUI mode and F1 in GUI mode.

Note that you can implement your own help viewer by overloading the SHOWHELP() function defined in FGLDIR/src/fglhelp.4gl. This allows you to customize the help system for your application.