Combining Field Processing and an Electronic Overlay

This example involves printing a monthly individual sales report for a specified distribution. The following items are needed to generate the sales report:

  • A pre-designed electronic overlay for the sales report
  • An unformatted print data file with periodic sales statistics

An example of these is shown in Figure Electronic Overlay and Data File for a Sales Report.

Electronic Overlay and Data File for a Sales Report

Electronic Overlay and Data File for a Sales Report

The code example that follows contains a form definition and a page definition. The page definition maps the file to the overlay.

In the previous figure, the 0,0 point is the upper-left corner of the overlay. This means that the logical page origin must coincide with the overlay origin in this example. POSITION subcommands are relative to the logical page origin. The overlay origin point that positions the overlay is specified in the Overlay Generation Language/370 that creates the overlay, but can be modified in the page definition. In mapping to an overlay, you should check the input to the overlay creation program so you can coordinate its origin with the logical page origin. You can reposition the overlay through the PRINTLINE command.

01 FORMDEF SLSRPT OFFSET 0 0 ;
02   OVERLAY SLSRPT ;
03     SUBGROUP OVERLAY SLSRPT ;
04
05 PAGEDEF SLSRPT ;
06   PRINTLINE  POSITION 2 IN 1.3 IN ;   /* RECORD 1           */
07    FIELD START 1 LENGTH 23  ;
08   PRINTLINE  POSITION 2 IN 1.70 IN ;  /* RECORD 2           */
09     FIELD START 1 LENGTH 9 ;         /* DEFAULT POSITION    */
10     FIELD START 10 LENGTH 5
11           POSITION 4.3 IN  * ;       /* THE ASTERISK MEANS  */
12                                      /* CURRENT LINE        */
13   PRINTLINE POSITION 1.5 IN 6 IN ;   /* RECORD 3            */
14     FIELD START 1 LENGTH 4 ;
15  SETUNITS LINESP 4 LPI ;
16   PRINTLINE  REPEAT 4                /* RECORDS 4-7         */
1