Defining a printer file

When defining a printer file using data description specifications (DDS), you should follow these rules for filling in positions 1 through 44 of the DDS form for printer files.

Specify the entries in the following order to define a printer file:

  1. Optional: File-level entries
  2. Record-level entries
  3. Field-level entries
Specify at least one record format in each file. The maximum number of record formats in a printer file is 1024. The maximum number of fields in any one record format is 32 767. The maximum combined length of all named fields and indicators in a record format is 32 767 bytes.
Note: Specify the file name through the Create Printer File (CRTPRTF) command, not through DDS.
See DDS concepts for the following general information:
  • An explanation of file level, record level, and field level in the overview topic.
  • A complete printer file example in the examples topic.
  • Syntax rules for specifying DDS keywords.

Figure 1 shows a printer file code example.

Figure 1. Printer file code example
Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A* PRINTER FILE CODING EXAMPLE
00020A*
00030A          R TITLER                    SKIPB(3)
00040A            FLD1          40        47SPACEA(2) UNDERLINE
00050A  30        FLD2          40        47SPACEA(2) UNDERLINE
00060A*
00070A          R AUTHORR
00080A                                    66'by'
00090A            FIELD1        40        47SPACEB(1)
00100A                                    50DFT('Task Force I')
00110A  31                                  SPACEA(1)
00120A  31                                65'and'
00130A  31        FIELD2        40        47
00140A*
00150A          R PUBR                      SKIPB(58)
00160A                                    47'Published by Department'
00170A            DEPT           3  0     +1
00180A                                    47DATE  EDTCDE(Y)
00190A                                      SPACEB(1)
00200A N15
00210AO 32 33 34                          47TIME
00220A                                      SPACEB(1)
     A