Printer file design and translation
Program-described printer files and externally described printer files are two types of printer files. When you design printer files to be translated into a national language version, you should follow some specific guidelines.
- Program-described printer files
Program-described files rely on the high-level language program to define records and fields to be printed.
- Externally described printer files
Externally described printer files use DDS rather than the high-level language to define records and fields to be printed.
The following figure shows how externally described printer files are used in creating reports for a different national language version.

Printer file translation
When you design printer files to be translated into a national language version, consider these guidelines:
- Use externally described printer files to define records and fields to be printed. Avoid using program-described printer files. Program-described printer files are described inside the high-level language program. Translators trying to translate text imbedded within the program can mistakenly translate literals that are within your program.
- Print data in one national graphic character set on devices that support the corresponding character sets and code pages. Not all printers support all CHRID parameters.
- Use the MSGCON keyword to access the constant text described in the message file. A printer file does not have the MSGID keyword. However, the techniques of direct coding as unnamed output field (literal) and storing text in a database file can be used to specify the constant text in a printer file.
- Take culture conventions into consideration when bar codes are being described in the printer file. Different countries have different standards for bar codes.
- When entering data, consider these parameters on the Create Printer File
(CRTPRTF) command.
- PAGESIZE (page size)
Different countries have different page-size standards.
- OVRFLW (overflow line number)
The overflow line number must be less than or equal to the page length.
- CHRID (character set and code page)
If the CHRID parameter of the printer file is set to *DEVD, the printer uses the character identifier that was set on the control panel or specified in the device description.
If the CHRID parameter of the printer file is set to a specific value, this value determines the code page and character set used to print the data. For externally described printer files, the CHRID parameter is used only for fields that also have the CHRID DDS keyword specified. For all other fields, the code page and character set used is the same as if *DEVD was specified.
If the CHRID parameter of the printer file is set to *JOBCCSID, constant text from an externally described printer file is converted to the CCSID of the job. The printer data stream is tagged with the CHRID taken from the job CCSID, using this CHRID value to print the data. When using the *JOBCCSID value on the CHRID parameter, the CHRID DDS keyword is ignored.
Note: All code pages and character sets cannot be handled by all printers.
- PAGESIZE (page size)