Rational Developer for System z
PL/I for Windows, Version 7.6, Programming Guide

Overriding the tab control table

Data-directed and list-directed output to a PRINT file are aligned on preset tabulator positions, which are defined in the PL/I-defined tab control table. The tab control table is an external structure named PLITABS. Figure 11 shows its declaration.

Figure 11. Declaration of PLITABS. (Gives standard page size, line size and tabulating positions)
dcl 1 PLITABS static external,
  ( 2   Offset init (14),
    2    Pagesize init (60),
    2    Linesize init (120),
    2    Pagelength init (64),
    2    Fill1 init (0),
    2    Fill2 init (0),
    2    Fill3 init (0),
    2    Number_of_tabs init (5),
    2    Tab1 init (25),
    2    Tab2 init (49),
    2    Tab3 init (73),
    2    Tab4 init (97),

    2    Tab5 init (121)) fixed bin (15,0);

The definitions of the fields in the table are as follows:

Offset
Binary integer that gives the offset of Number_of_tabs, the field that indicates the number of tabs to be used, from the top of PLITABS.
Pagesize
Binary integer that defines the default page size. This page size is used for dump output to the PLIDUMP data set as well as for stream output.
Linesize
Binary integer that defines the default line size.
Pagelength
Binary integer that defines the default page length for printing at a terminal. The value 0 indicates unformatted output.
Fill1, Fill2, Fill3
Three binary integers; reserved for future use.
Number_of_tabs
Binary integer that defines the number of tab position entries in the table (maximum 255). If tab count = 0, any specified tab positions are ignored.
Tab1—Tabn:
Binary integers that define the tab positions within the print line. The first position is numbered 1, and the highest position is numbered 255. The value of each tab should be greater than that of the tab preceding it in the table; otherwise, it is ignored. The first data field in the printed output begins at the next available tab position.

You can override the default PL/I tab settings for your program by causing the linker to resolve an external reference to PLITABS. You do this by including a PL/I structure with the name PLITABS and the attributes EXTERNAL STATIC in the source program containing your main routine.

An example of the PL/I structure is shown in Figure 12. This example creates three tab settings, in positions 30, 60, and 90, and uses the defaults for page size and line size. Note that TAB1 identifies the position of the second item printed on a line; the first item on a line always starts at the left margin. The first item in the structure is the offset to the NO_OF_TABS field; FILL1, FILL2, and FILL3 can be omitted by adjusting the offset value by –6.

Figure 12. PL/I structure PLITABS for modifying the preset tab settings
dcl 1 PLITABS static ext,
    2 (Offset init(14),
      Pagesize init(60),
      Linesize init(120),
      Pagelength init(0),
      Fill1 init(0),
      Fill2 init(0),
      Fill3 init(0),
      No_of_tabs init(3),
      Tab1 init(30),
      Tab2 init(60),

      Tab3 init(90)) fixed bin(15,0);

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)