Use this record-level keyword to specify that a stapling operation should be done within the spool file.
The stapling operation must be defined on the CORNERSTPL, EDGESTITCH, or SADLSTITCH parameters on the CRTPRTF, CHGPRTF, or OVRPRTF commands. If no stapling is defined on the printer file, then the STAPLE keyword is ignored. If you do not specify the STAPLE keyword, the entire spool file will be stapled according to the definition on the EDGESTITCH, SADLSTITCH, or CORNERSTPL parameters.
The format of the keyword is:
STAPLE([on/off-indicator])
When a STAPLE keyword is processed, the printer ejects a page, and all previous pages that have been stacked since the last staple operation are stapled together. This includes pages that were processed since the beginning of the spool file, since the last STAPLE keyword was issued, or since stapling resumed after the last STAPLE(*ON) was issued.
For example, for simple printing, if the STAPLE keyword where issued at the beginning of page 5, then the previous 4 pages are stapled together. Some printers might not support the stapling of a single page.
The optional off-on stapling indicator specifies whether stapling should be turned off within the spool file.
STAPLE 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, FORCE, or INVMMAP keyword is processed, which causes the printer to move to a new page.
STAPLE, SKIP, and SPACE keywords are processed in the following order:
SKIPB SPACEB STAPLE SPACEA SKIPA
The stapling operation will cause the ejection of the current sheet of paper. When duplexing is in effect (specified on the printer file or DDS), if STAPLE is issued when starting an odd page (for example, page 5), then the previous 4 pages (2 sheets of paper) will be stapled. If STAPLE is issued when starting an even page (for example, page 6), then the previous 5 pages (3 sheets of paper) will be stapled. The back side of the third sheet of paper will be blank.
STAPLE is valid only for printer files defined with DEVTYPE(*AFPDS).
Option indicators are valid for this keyword. Only one STAPLE keyword for each record format is valid at any time.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R RECORD1 SKIPB(3) 00020A FIELD1 10 1SPACEA(1) 00030A FIELD2 5 1SPACEA(1) 00040A R RECORD2 STAPLE 00050A FIELD1 5 1 00060A R RECORD3 STAPLE SKIPB(1) 00070A FIELD1 10 1 00080A 00090A R RECORD4 STAPLE(*OFF) SKIPB(1) 00100A
The printer is not on a page boundary after record format RECORD1 is processed. When record format RECORD2 is processed, STAPLE is ignored. Because SKIPB(1) is specified on RECORD3, the printer is on a page boundary when STAPLE is processed. All previous processed pages since the last stapling operation will be stapled together. RECORD 4 turns off stapling. All previous processed pages since the last stapling operation will be stapled together. Stapling will not resume unless a STAPLE(*ON) is issued on a another record format.