| 1 | MKMSGF infile outfile [options]
|
|---|
| 2 |
|
|---|
| 3 | OR
|
|---|
| 4 |
|
|---|
| 5 | MKMSGF @controlfile
|
|---|
| 6 |
|
|---|
| 7 | The infile field specifies the input file that contains message definitions. The
|
|---|
| 8 | input-file name can be any valid OS/2* file name, optionally preceded by a
|
|---|
| 9 | drive letter and a path.
|
|---|
| 10 |
|
|---|
| 11 | The outfile field specifies the output file created by MKMSGF. The output-file
|
|---|
| 12 | name can be any valid OS/2* file name, optionally preceded by a drive letter
|
|---|
| 13 | and a path.
|
|---|
| 14 |
|
|---|
| 15 | To differentiate between the two files, the following convention is
|
|---|
| 16 | recommended, using the same file name.
|
|---|
| 17 |
|
|---|
| 18 | o The infile file should have a .TXT extension.
|
|---|
| 19 | o The outfile file should have a .MSG extension.
|
|---|
| 20 |
|
|---|
| 21 | Note: The output file cannot have the same file name and extension as the
|
|---|
| 22 | input file.
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 | The input message file is a standard ASCII file that contains three types of
|
|---|
| 28 | lines:
|
|---|
| 29 |
|
|---|
| 30 | o Comment lines
|
|---|
| 31 | o Component identifier line
|
|---|
| 32 | o Component message lines
|
|---|
| 33 |
|
|---|
| 34 | Comment Lines
|
|---|
| 35 |
|
|---|
| 36 | Comment lines are allowed anywhere in the input message file, except between
|
|---|
| 37 | the component identifier and the first message. Comment lines must begin with a
|
|---|
| 38 | semicolon (;) in the first column.
|
|---|
| 39 |
|
|---|
| 40 | In the Input Message File Example, the comment lines are
|
|---|
| 41 |
|
|---|
| 42 | ; This is a sample of an input
|
|---|
| 43 | ; message file for component DOS
|
|---|
| 44 | ; starting with three comment lines.
|
|---|
| 45 |
|
|---|
| 46 | Component Identifier Line
|
|---|
| 47 |
|
|---|
| 48 | The component-identifier line contains a three-character name identifier that
|
|---|
| 49 | precedes all MKMSGF message numbers.
|
|---|
| 50 |
|
|---|
| 51 | In the example, the component identifier is DOS.
|
|---|
| 52 |
|
|---|
| 53 | Component-Message Lines
|
|---|
| 54 |
|
|---|
| 55 | Each component-message line consists of a message header and an ASCII text
|
|---|
| 56 | message.
|
|---|
| 57 |
|
|---|
| 58 | The message header is comprised of the following parts:
|
|---|
| 59 |
|
|---|
| 60 | o A three-character component identifier
|
|---|
| 61 | o A four-digit message number
|
|---|
| 62 | o A single character specifying message type (E, H, I, P, W, ?)
|
|---|
| 63 | o A colon (:)
|
|---|
| 64 | o Followed by a blank space.
|
|---|
| 65 |
|
|---|
| 66 | The following message types are used:
|
|---|
| 67 |
|
|---|
| 68 | Type Meaning
|
|---|
| 69 | E Error
|
|---|
| 70 | H Help
|
|---|
| 71 | I Information
|
|---|
| 72 | P Prompt
|
|---|
| 73 | W Warning
|
|---|
| 74 | ? no message assigned to this number
|
|---|
| 75 |
|
|---|
| 76 | The message header must begin in the first column of the line. Only one header
|
|---|
| 77 | can precede the text of a message, although a message can span multiple lines.
|
|---|
| 78 |
|
|---|
| 79 | Message numbers can start at any number, but messages must be numbered
|
|---|
| 80 | sequentially. If you do not use a message number, you must insert an empty
|
|---|
| 81 | entry in its place in the text file. An empty entry consists of the message
|
|---|
| 82 | number, with ? as the message type, and no text.
|
|---|
| 83 |
|
|---|
| 84 | The character % has a special meaning when used within the text of a
|
|---|
| 85 | message:
|
|---|
| 86 |
|
|---|
| 87 | %0 is placed at the end of a prompt (type P) to prevent DosGetMessage from
|
|---|
| 88 | executing a carriage return and line feed. This allows the user to be prompted
|
|---|
| 89 | for input on the same line as the message text.
|
|---|
| 90 |
|
|---|
| 91 | %1 - %9 are used to identify variable string insertion within the text of a
|
|---|
| 92 | message. These variables correspond to the Itable and IvCount parameters in
|
|---|
| 93 | the DosGetMessage call.
|
|---|
| 94 |
|
|---|
| 95 | Component-Message Example
|
|---|
| 96 |
|
|---|
| 97 | For example, DOS0100E: is DOS error message 100. For additional examples,
|
|---|
| 98 | see the Input Message File Example.
|
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 | Following is an example of an input message file:
|
|---|
| 102 |
|
|---|
| 103 | ; This is a sample of an input
|
|---|
| 104 | ; message file for component MAB
|
|---|
| 105 | ; starting with three comment lines.
|
|---|
| 106 | MAB
|
|---|
| 107 | MAB0100E: File not found
|
|---|
| 108 | MAB0101?:
|
|---|
| 109 | MAB0102H: Usage: del [drive:][path] filename
|
|---|
| 110 | MAB0103?:
|
|---|
| 111 | MAB0104I: %1 files copied
|
|---|
| 112 | MAB0105W: Warning! All data will be destroyed!
|
|---|
| 113 | MAB0106?:
|
|---|
| 114 | MAB0107?:
|
|---|
| 115 | MAB0108P: Do you wish to apply these patches (Y or N)? %0
|
|---|
| 116 | MAB0109E: Divide overflow
|
|---|
| 117 |
|
|---|
| 118 |
|
|---|
| 119 |
|
|---|
| 120 | The output file contains the indexed message file that DosGetMessage will use.
|
|---|
| 121 | The output-file name can be any valid OS/2* file name, optionally preceded by
|
|---|
| 122 | a drive letter and a path. The output file cannot have the same name as the
|
|---|
| 123 | input file.
|
|---|
| 124 |
|
|---|
| 125 | To differentiate between the two files, the following convention is
|
|---|
| 126 | recommended, using the same file name.
|
|---|
| 127 |
|
|---|
| 128 | o The infile file should have a .TXT extension.
|
|---|
| 129 | o The outfile file should have a .MSG extension.
|
|---|
| 130 |
|
|---|
| 131 | Help-message file names begin with the component identifier, followed by H.MSG.
|
|---|
| 132 | For example, the help file associated with the component identifier DOS would
|
|---|
| 133 | be DOSH.MSG.
|
|---|
| 134 |
|
|---|
| 135 |
|
|---|
| 136 | Text-based messages in different code pages can be created using MKMSGF to
|
|---|
| 137 | display errors, help information, prompt, or provide general information to the
|
|---|
| 138 | application user.
|
|---|
| 139 |
|
|---|
| 140 | MKMSGF uses the following parameter formats to build message files:
|
|---|
| 141 |
|
|---|
| 142 | MKMSGF infile outfile /Pcodepage
|
|---|
| 143 |
|
|---|
| 144 | MKMSGF infile outfile /Ddbcsrange or country id
|
|---|
| 145 |
|
|---|
| 146 | MKMSGF infile outfile /LlangID,VerId
|
|---|
| 147 |
|
|---|
| 148 | MKMSGF infile outfile /V
|
|---|
| 149 |
|
|---|
| 150 | MKMSGF infile outfile /?
|
|---|
| 151 |
|
|---|
| 152 | MKMSGF @controlfile
|
|---|
| 153 |
|
|---|
| 154 | o Infile is the ASCII-text source file.
|
|---|
| 155 |
|
|---|
| 156 | Example:
|
|---|
| 157 |
|
|---|
| 158 | MSG
|
|---|
| 159 | MSG0001I: (mm%4dd%4yy) %2%4%1%4%3
|
|---|
| 160 | MSG0002I: (dd%4mm%4yy) %1%4%2%4%3
|
|---|
| 161 | MSG0003I: Current date is: %0
|
|---|
| 162 |
|
|---|
| 163 | %0 is a special argument that displays a prompt for user input.
|
|---|
| 164 |
|
|---|
| 165 | %1 - %9 are the arguments the user can use to insert text in a message.
|
|---|
| 166 |
|
|---|
| 167 | o Outfile is the binary output message file.
|
|---|
| 168 |
|
|---|
| 169 | o @controlfile is the message definition file.
|
|---|
| 170 |
|
|---|
| 171 | Options
|
|---|
| 172 |
|
|---|
| 173 | /P Code-page ID for the input message file.
|
|---|
| 174 |
|
|---|
| 175 | /D DbcsRange or country ID for the input message file.
|
|---|
| 176 |
|
|---|
| 177 | /L Language family ID (one word) and language version ID (one word).
|
|---|
| 178 |
|
|---|
| 179 | /V Verbose display of message file control variables as the message file is
|
|---|
| 180 | being created. See Verbose Option Output Example.
|
|---|
| 181 |
|
|---|
| 182 | /? Help display of command syntax for MKMSGF.
|
|---|
| 183 |
|
|---|
| 184 | Note: Any combination of /P, /D, /L, and /V switches can be used for either
|
|---|
| 185 | the command line or @controlfile execution method.
|
|---|
| 186 |
|
|---|
| 187 | The / switch prefix and the - prefix can be used interchangeably when
|
|---|
| 188 | defining switches to MKMSGF.
|
|---|
| 189 |
|
|---|
| 190 |
|
|---|
| 191 |
|
|---|
| 192 |
|
|---|
| 193 | The control file (@controlfile) is used to create multiple-code-page message
|
|---|
| 194 | files. The at sign (@) is not part of the file name, but rather, a delimiter
|
|---|
| 195 | required before a control-file name.
|
|---|
| 196 |
|
|---|
| 197 | The control file has the following format:
|
|---|
| 198 |
|
|---|
| 199 | Example:
|
|---|
| 200 |
|
|---|
| 201 | root.in root.out /Pcodepage /Ddbcsrang/ctryid /LlangID,VerId
|
|---|
| 202 | sub.001 sub1.out /Pcodepage /Ddbcsrang/ctryid /LlangID,VerId
|
|---|
| 203 | .
|
|---|
| 204 | .
|
|---|
| 205 | sub.00n subn.out /Pcodepage /Ddbcsrang/ctryid /LlangID,VerId
|
|---|
| 206 |
|
|---|
| 207 | The help option (/?) is invalid due to the purpose of the definition file.
|
|---|
| 208 |
|
|---|
| 209 | Note: Any combination of /P /D /L and /V switches can be used for either the
|
|---|
| 210 | command line or msg_definition_file execution method.
|
|---|
| 211 |
|
|---|
| 212 |
|
|---|
| 213 |
|
|---|
| 214 |
|
|---|
| 215 | When an application requests the message retriever for text associated with a
|
|---|
| 216 | message number, a test is made to determine if there is a bound message
|
|---|
| 217 | segment with this executable file. If true, each bound message segment is
|
|---|
| 218 | searched for a match with the current session's code-page number.
|
|---|
| 219 |
|
|---|
| 220 | If a match is made, then the message number is searched for. If it is found,
|
|---|
| 221 | the message will be returned to the caller. Otherwise, the search of remaining
|
|---|
| 222 | bound message segments will continue.
|
|---|
| 223 |
|
|---|
| 224 | If no match results from a search of all message segments, the message file on
|
|---|
| 225 | the disk is searched. DosGetMessage will access the message file under any of
|
|---|
| 226 | the following conditions:
|
|---|
| 227 |
|
|---|
| 228 | o The message file is in the current directory.
|
|---|
| 229 | o The message file is in the path specified in the DPATH environment variable
|
|---|
| 230 | (protect mode).
|
|---|
| 231 | o The message file is in the path specified in the APPEND environment variable
|
|---|
| 232 | (real mode).
|
|---|
| 233 | o The fully-qualified file name is specified in DosGetMessage.
|
|---|
| 234 |
|
|---|
| 235 |
|
|---|
| 236 |
|
|---|
| 237 | MKMSGF: Error writing output file
|
|---|
| 238 | Explanation: Error during output to target file.
|
|---|
| 239 | Action: Make sure there is sufficient disk space or that the drive is
|
|---|
| 240 | ready. Retry the command.
|
|---|
| 241 |
|
|---|
| 242 | MKMSGF: Error reading input file
|
|---|
| 243 | Explanation: Error during input from source file.
|
|---|
| 244 | Action: Make sure the source message file exists and that the drive is
|
|---|
| 245 | ready. Retry the command.
|
|---|
| 246 |
|
|---|
| 247 | MKMSGF: File not found
|
|---|
| 248 | Explanation: Input file could not be found
|
|---|
| 249 | Action: Retry the command, using the correct source message file
|
|---|
| 250 | name.
|
|---|
| 251 |
|
|---|
| 252 | MKMSGF: Insufficient storage
|
|---|
| 253 | Explanation: Not enough storage to execute program or too many
|
|---|
| 254 | messages in the file. Message limit is about 6000.
|
|---|
| 255 | Action: Reduce the number of programs running in your system. Or
|
|---|
| 256 | reduce the size of the message file by either deleting messages or by
|
|---|
| 257 | having shorter messages. Retry the command.
|
|---|
| 258 |
|
|---|
| 259 | MKMSGF: Invalid message file format
|
|---|
| 260 | Explanation: Input file is not a recognizable message text file.
|
|---|
| 261 | Action: If an incorrect file name was entered, retry the command with
|
|---|
| 262 | the correct source message file name.
|
|---|
| 263 |
|
|---|
| 264 | MKMSGF: Message ID out of sequence
|
|---|
| 265 | Explanation: A message was detected that was out of the required
|
|---|
| 266 | sequential order.
|
|---|
| 267 | Action: Correct the error by editing your source message file and
|
|---|
| 268 | renumbering the messages. You may also want to delete or insert the
|
|---|
| 269 | appropriate message numbers to achieve the required sequential order.
|
|---|
| 270 |
|
|---|
| 271 | MKMSGF: Message XXXX too long
|
|---|
| 272 | Explanation: The message was too long to be processed (limit is
|
|---|
| 273 | approximately 2K characters).
|
|---|
| 274 | Action: Correct the error by editing your source message file and
|
|---|
| 275 | making the message shorter. Then, retry the command.
|
|---|
| 276 |
|
|---|
| 277 | MKMSGF: infile[.ext] outfile[.ext] [/V]
|
|---|
| 278 | [/D <DBCS range or country>] [/P <code page>] [/L <language id,sub id>]
|
|---|
| 279 | Explanation: This is the proper syntax for MKMSGF. It is displayed
|
|---|
| 280 | when no operands are specified on the command line and after some
|
|---|
| 281 | syntax errors.
|
|---|
| 282 | Action: None
|
|---|
| 283 |
|
|---|
| 284 | MKMSGF: Syntax error
|
|---|
| 285 | Explanation: The user entered the command incorrectly.
|
|---|
| 286 | Action: Retry the command using proper syntax. To display the proper
|
|---|
| 287 | syntax, just enter MKMSGF on the command line.
|
|---|
| 288 |
|
|---|
| 289 | MKMSGF: Codepage %s error in numeric conversion
|
|---|
| 290 | Explanation: The code-page ID specified with the /P option is not
|
|---|
| 291 | numeric. The message file is built with a code-page of zero.
|
|---|
| 292 | Action: Retry the command using the correct code-page specification.
|
|---|
| 293 |
|
|---|
| 294 | MKMSGF: Codepage %s is all zeroes
|
|---|
| 295 | Explanation: The code-page ID specified with the /P option is zero.
|
|---|
| 296 | The message file is built with a code-page of zero.
|
|---|
| 297 | Action: Retry the command using the correct code-page specification.
|
|---|
| 298 |
|
|---|
| 299 | MKMSGF: Codepage %s is too large
|
|---|
| 300 | Explanation: The code-page ID specified with the /P option is too
|
|---|
| 301 | large. The message file is built with a code-page of zero.
|
|---|
| 302 | Action: Retry the command using the correct code-page specification.
|
|---|
| 303 |
|
|---|
| 304 | MKMSGF: Country %u is not supported
|
|---|
| 305 | Explanation: The country ID specified in the /D option is not
|
|---|
| 306 | supported. MKMSGF processing is stopped.
|
|---|
| 307 | Action: Retry the command using the correct country code
|
|---|
| 308 | specification.
|
|---|
| 309 |
|
|---|
| 310 | MKMSGF: DBCS code page not found
|
|---|
| 311 | Explanation: No DBCS code page has been found that supports the
|
|---|
| 312 | DBCS Range specified in the /D option. MKMSGF processing is stopped.
|
|---|
| 313 | Action: Retry the command using the correct DBCS ranges or country
|
|---|
| 314 | ID for the input message file.
|
|---|
| 315 |
|
|---|
| 316 | MKMSGF: Input file same as output file
|
|---|
| 317 | Explanation: The input and output file names are the same,
|
|---|
| 318 | processing is stopped.
|
|---|
| 319 | Action: Correct the command line or the controlfile and restart
|
|---|
| 320 | MKMSGF.
|
|---|
| 321 |
|
|---|
| 322 | MKMSGF: Invalid language or sub id
|
|---|
| 323 | Explanation: The language family ID specified in the /L option is not
|
|---|
| 324 | supported. The message file is built with a language family ID of
|
|---|
| 325 | Action: Retry the command using the correct language family ID.
|
|---|
| 326 |
|
|---|
| 327 | MKMSGF: Language family %s error in numeric conversion
|
|---|
| 328 | Explanation: The language family ID specified with the /L option is
|
|---|
| 329 | not numeric. The message file is built with a language family ID of
|
|---|
| 330 | zero.
|
|---|
| 331 | Action: Retry the command using the correct language family ID.
|
|---|
| 332 |
|
|---|
| 333 | MKMSGF: Language family %s is all zeroes
|
|---|
| 334 | Explanation: The language family ID specified with the /L option is
|
|---|
| 335 | zero. The message file is built with a language family ID of zero.
|
|---|
| 336 | Action: Retry the command using the correct language family ID.
|
|---|
| 337 |
|
|---|
| 338 | MKMSGF: Language family %s is too large
|
|---|
| 339 | Explanation: The language family ID specified with the /L option is
|
|---|
| 340 | not supported. The message file is built with a language family ID of
|
|---|
| 341 | zero.
|
|---|
| 342 | Action: Retry the command using the correct language family ID.
|
|---|
| 343 |
|
|---|
| 344 | MKMSGF: More than NN codepages entered
|
|---|
| 345 | Explanation: A maximum of NN code-page ID's may specified for a
|
|---|
| 346 | single message file, Only the first NN will be accepted.
|
|---|
| 347 | Action: Retry the command using the correct code-page
|
|---|
| 348 | specification(s).
|
|---|
| 349 |
|
|---|
| 350 | MKMSGF: No sub id using 1 default
|
|---|
| 351 | Explanation: The language version ID specified in the /L option is
|
|---|
| 352 | either invalid or not supported. The message file is built using the
|
|---|
| 353 | default value shown.
|
|---|
| 354 | Action: Retry the command using the correct language version ID.
|
|---|
| 355 |
|
|---|
| 356 | MKMSGF: Sub id %s error in numeric conversion
|
|---|
| 357 | Explanation: The language version specified with the /L option is not
|
|---|
| 358 | numeric. The message file is built with a default language version.
|
|---|
| 359 | Action: Retry the command using the correct language version ID.
|
|---|
| 360 |
|
|---|