Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : TABLEPRINT

TABLEPRINT
Prints the contents of a table or of a set of joined tables. (E)
Invocation
Do one of the following:
Type tablespec <Enter>
Type TABLEPRINT(tablespec) <Enter>
Type PT tablespec <Enter>
Where:
 
Usage Notes
If you supply a value for tablespec, the table is sent to the printer.
If you do not supply a value for tablespec, the Table Print screen appears when TABLEPRINT is executed. An example of this screen is illustrated here:

 
------- TABLE PRINT UTILITY -------
PAGE LENGTH: 60 PAGE WIDTH: 132 PRT OR SCR: PRT
TABLE:
PFKYS:3=PRINT EXIT 12=CANCEL 13=PRINT REPEAT 6=ADD TABLE 22=DELETE TABLE

 
The print arguments are set at the top of the screen. The defaults are Page Length 60, Page Width 132 (which is the only supported width for a printed page), and PRT. The normal values for SCR are Page Length 25 and Page Width 80.
To print a table, enter its name in the TABLE field and press PF3.
To print two or more tables successively, enter the name of one table and press PF13. The table is printed and the screen appears again. Another table name can be entered, the print arguments can be changed, and the process can be repeated.
Joining Tables for Printing
Tables can be joined for printing. The following conditions apply:
Such a table can be included in a join where the selection is based on its parameter values. In this case, the parameter is specified in the form t.f on the JOIN TABLE field.
Each value of the field f is used, so that several instances of the table can be printed immediately.
The table t must already be named in the TABLE or JOIN TABLE fields.
When several tables are joined for printing, both matching of fields and matching of parameters can be used in the same join.
Examples
Statements
The statement: EX TABLEPRINT('EMPLOYEE') prints the contents of the table EMPLOYEE.
The statement: EX TABLEPRINT() displays the TABLEPRINT screen.
Use of Joins
The following example demonstrates the use of joins when printing tables. The table DEPARTMENT contains the department number in a field called DEPTNO. The table EMPLOYEE contains the department number for each employee in a field also called DEPTNO.
To join these tables for printing, type the name of one table, and then press PF6 to be able to enter the name of the second table and the fields to compare, in a screen like this:

 
------- TABLE PRINT UTILITY -------
PAGE LENGTH: 60 PAGE WIDTH: 132 PRT OR SCR: PRT
TABLE: DEPARTMENT
JOIN TABLE
MATCH FIELD: WITH (T.F): DEPARTMENT.

 
TABLEPRINT automatically fills in the first table in the WITH (T.F) field.
Fill in the information about the table you want to join (for example, the EMPLOYEE table), as shown in this screen:

 
------- TABLE PRINT UTILITY -------
PAGE LENGTH: 60 PAGE WIDTH: 132 PRT OR SCR: PRT
TABLE: DEPARTMENT
JOIN TABLE EMPLOYEE
MATCH FIELD: DEPTNO WITH(T.F): DEPARTMENTS.DEPTNO

 
Conditions for a Join
The following conditions apply to a join:
At least one of the two fields that are being compared must be a primary key. In this example, DEPTNO is the primary key of departments.
The table named in the field WITH(T.F) must already be named in the TABLE field or it must be named in a JOIN TABLE field above the one that names the table currently being added to the join.
Printing Parameterized Tables
The following example demonstrates the printing of a parameterized table.
The joined tables are printed as follows:

 
------- TABLE PRINT UTILITY -------
PAGE LENGTH: 60 PAGE WIDTH: 132 PRT OR SCR: PRT
TABLE: DEPARTMENT
JOIN TABLE EMPLOYEE_DEPT(DEPARTMENT.DEPTNO)
MATCH FIELD: WITH (T.F): DEPARTMENT.

 
In this case, the MATCH FIELD and WITH (T.F) fields are ignored.
Resulting Output

 
PRINTING TABLE(S): DEPARTMENT EMPLOYEE_DEPT(DEPARTMENT.DEPTNO)
DEPTNO DNAME EMPNO LNAME
------ ------------------- ------ ------------
10 ACCOUNTING 1011 CROFTON
10 ACCOUNTING 1007 STEVENSON
10 ACCOUNTING 1009 SMITH
................................................
20 SALES 1121 KIMURA
20 SALES 1622 SCHULTZ
. .
. .
. .

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved