Figure 336 shows how to specify the DRAWER keyword.
Figure 336. Specifying the DRAWER Keyword
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R RECORD1 SKIPB(3) 00020A FIELD1 10 1SPACEA(1) 00030A FIELD2 5 1SPACEA(1) 00040A 00050A R RECORD2 DRAWER(2) 00060A FIELD3 5 1 00070A FIELD4 5 6SKIPA(1) 00080A 00090A R RECORD3 DRAWER(2) 00100A FIELD5 10 1SPACEA(1) 00110A FIELD6 10 1SKIPA(1) 00120A FIELD7 10 1SPACEA(1) 00130A FIELD8 10 1SPACEA(1) 00140A 00150A R RECORD4 00160A FIELD9 10 1SKIPB(30) 00170A FIELD10 10 21 00180A R RECORD5 SKIPB(3) 00190A FIELD11 10 1SPACEA(1) 00200A FIELD12 10 1SPACEA(1) 00210A R RECORD6 SKIPB(1) DRAWER(&FIELD13) 00220A FIELD13 4 P 00230A FIELD14 10 1
The printer is not on a page boundary after record format RECORD1 is processed. When record format RECORD2 is processed, DRAWER is ignored and paper continues to come from the source drawer previously specified (file level). Because SKIPA(1) is specified for FIELD4 of RECORD2, the printer is on a page boundary after RECORD2 is processed. The paper for both pages of RECORD3 comes from drawer 2. The paper source for record formats RECORD4 and RECORD5 is the drawer specified at the file level (drawer 1 in this example). But because RECORD4 starts in the middle of a page, it prints on the same page as RECORD3 (drawer 2). Record format RECORD5 prints on a different page (SKIPB(3)) and prints on paper from drawer 1.RECORD6 allows the application program to specify the drawer-number by setting field FIELD13.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.