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:
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.
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.