DUPLEX (Duplex) keyword in printer files

You use this record-level keyword to specify whether output is printed on one side or two sides of the paper.

The format of the keyword is:

DUPLEX(duplex-value | &duplex-value) 

The possible values are:

*NO
The output is printed on one side of the paper.
*YES
The output is printed on both sides of the paper, with the top of each printed page at the same end of the sheet of paper. This is typically done for output that is bound at the side.
*TUMBLE
The output is printed on both sides of the paper, with the top of one printed page at the opposite end from the top of the other printed page. This is typically done for output that is bound at the top.

You can specify the duplex value as a constant or program-to-system field. When you specify the duplex value as a program-to-system field, the field must exist in the same record format as the DUPLEX keyword. The field must be defined as length 7 and type A (character), and usage P (program-to-system).

Specify DEVTYPE(*AFPDS) on the CRTPRTF command when DUPLEX is specified in the file. If DEVTYPE is changed to anything other than *AFPDS, the keyword is ignored and a warning message is issued at print time.

If currently printing on the front side of the sheet, the current sheet will be ejected and a new sheet fed in. If you do not specify the DUPLEX keyword, the value specified on the DUPLEX parameter on the CRTPRTF, CHGPRTF, or OVRPRTF command determines the duplex value.

DUPLEX is ignored at run time if it is not specified on a page boundary. The printer is on a page boundary when no named or constant fields are processed for a page. After a named or constant field is processed, the printer is no longer on a page boundary. The printer is on a page boundary again when a SKIP, SPACE, ENDPAGE, or INVMMAP keyword is processed that causes the printer to move to a new page, DUPLEX, SKIP, and SPACE keywords are processed in the following order:

   SKIPB
   SPACEB
   DUPLEX
   SPACEA
   SKIPA  

DUPLEX is in effect only for the record format specified. After records with the specified record format are processed, the duplex value for the next record format (if the DUPLEX keyword is not specified) is the duplex specified at the file level (CRTPRTF, CHGPRTF, or OVRPRTF) command.

Option indicators are valid for this keyword.

Note: Use of this DDS keyword will cause a spooled file to be generated that will not be correctly printed when sending the spooled file to MVS™. The spooled file with not print and will be held on the output queue by Print Services Facility (PSF)/MVS.

Example

The following example shows how to specify the DUPLEX keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A*
     A          R REC1                      DUPLEX(*YES)
     A            FLD1           5A    60 10
     A*

Duplex printing is selected when record format REC1 prints.