PRINT in TSO
The PRINT command prints a copy of an object in the QMF temporary storage area or an object that is stored in the database.
TSO with ISPF | TSO without ISPF |
---|---|
X | X |
Syntax
PRINT a QMF object from temporary storage
- 1 The name of the QMF object panel currently displayed, if appropriate, is used.
- 2 The value set in your profile is used.
- 3 Use of this option is limited. Refer to the description that follows.
- 4 The value set in your profile is used.
- 5 Use of this option is limited. Refer to the description that follows.
- 6 The value set in your profile is used.
PRINT a QMF report from temporary storage
- 1 The name of the QMF object panel currently displayed, if appropriate, is used.
- 2 The value set in your profile is used.
- 3 The value set in your profile is used.
- 4 Use of this option is limited. Refer to the description that follows.
- 5 The value set in your profile is used.
- 6 Set dsqec_cc to 1 (where cc is in effect) to obtain a carriage control character in column 1 of the report; set this global variable to 0 for no carriage control character.
PRINT an object from the database
- 1 The type of the named object, if appropriate, is used. QMF objects have priority over other types of objects (such as database objects).
- 2 The value set in your profile is used.
- 3 Use of this option is limited. Refer to the description that follows.
- 4 The value set in your profile is used.
- 5 Use of this option is limited. Refer to the description that follows.
- 6 The value set in your profile is used.
Description
- objectname
- The name of an object in the database. Valid objects include:
- QMF objects (PROC, QUERY, FORM)
- Table objects (TABLE, VIEW, SYNONYM, ALIAS)
If the object name is too long to fit on the QMF command line, issue the command from a command prompt panel. The name does not need to be delimited by quotation marks when continued on multiple lines on the panel.
- PRINTER
- Specifies the output destination for the PRINT command.
- printername
- Specifies a printer destination. This value must be the nickname of a GDDM printer.
- blankstring
- Specifies a file destination. This value must be indicated by
a string of 0 to 8 blanks that are enclosed in single quotation marks
(' ').
The physical destination for the print output is a data set or a device that is allocated to the QMF DSQPRINT data set. Contact your administrator for details specific to your QMF environment.
Use a string of blanks for the PRINTER option when you start QMF for TSO as a Db2® for z/OS® stored procedure and you want to receive output back in a result set.
This option is not valid for chart, form, or prompted query objects.
- LENGTH
- Specifies the length of a printed page. The unit of length is
one line.
- integer
- Specifies the maximum number of lines between page breaks. The
number must be an integer from 1 to 999.
Minimum lengths apply to the objects shown in the following table:
Table 1. Objects and their minimum lengths when printing Object Minimum Length Form 25 SQL query 25 Procedure 25 Prompted query 25 Table 8 QBE query 7 (5 when you print to a data set) Profile 7 (5 when you print to a data set) The minimum length for a report varies with the form used and the value of the command options DATETIME and PAGENO.
The maximum length of a printed form is 66.
- CONT
- Specifies continuous printing, without page breaks.
This option is not valid for chart, form, or prompted query objects, or whenever a printer name is specified.
- WIDTH
- Specifies the width of a printed page. The unit of width is one
single-byte character.
- integer
- Specifies the maximum number of characters to be printed on any
line. The number must be an integer from 22 to 999.
Lines wider than the value specified are cut off on the right, unless the object you are printing is a report. In that case, lines longer than the value specified are formatted on a subsequent page, unless you specified line wrapping on the FORM.OPTIONS panel.
- PAGENO
- Specifies the inclusion of page numbers with the printed object.This option is ignored when you print a report and the form contains the variable &PAGE.
- YES
- Page numbers are included at the bottom of the page.
- NO
- Page numbers are suppressed.
- DATETIME
- Specifies the inclusion of the system date and time on each page
of the printed object.This option is ignored when you print a report and the form contains the variable &DATE or &TIME.
- YES
- Date and time are included at the bottom of the page.
- NO
- Data and time are not included.
- FORM
- Specifies the form to use when you print a report.
- FORM
- The current FORM object in temporary storage. This is the default.
- formname
- The name of a QMF form in the database. This form will replace the current form in temporary storage.
- UNITS
- Specifies the unit of measure for chart dimension parameters CLENGTH,
CWIDTH, HOFFSET, and VOFFSET.
- PERCENT
- Chart dimensions are relative to the screen size (100 percent).
- CENTIMETERS
- Chart dimensions are expressed in centimeters.
- INCHES
- Chart dimensions are expressed in inches.
- CLENGTH
- The length of the chart area, expressed as a number. The unit of measure is determined by the UNITS parameter. The default varies with the unit of measure.
- CWIDTH
- The width of the chart area expressed as a number. The unit of measure is determined by the UNITS parameter. The default varies with the unit of measure.
- HOFFSET
- The horizontal offset of the chart from the left side of the page, expressed as a number. The unit of measure is determined by the UNITS parameter.
- VOFFSET
- The vertical offset of the chart from the top of the page, expressed as a number. The unit of measure is determined by the UNITS parameter.
- ICUFORM
- Specifies the name of a chart format. A chart format contains
the specifications that are required to turn data into a chart. Different
formats are used to produce different types of charts.
- DSQCFORM
- The name of the default chart format that is provided by QMF.
This format can be customized by your administrator. It provides a bar chart if not customized.
- chartname
- The name of a chart format.
- ICUCHART
- Specifies the default chart format for the GDDM Interactive Chart Utility.
- BAR
- HISTOGRAM
- LINE
- PIE
- POLAR
- SCATTER
- SURFACE
- TOWER
- TABLE
- The name of a chart format that is provided by QMF.
Usage notes
- This command does not apply to QMF Analytics for TSO. To print a QMF Analytics for TSO chart or statistical analysis, first generate or display the chart or analysis, and then use the Print function key to print it. For more information, press the Help key from the Print panel in QMF Analytics for TSO.
- When you print a form, all parts of the form are printed.
- When you print a report, the report is printed according to the form specifications.
- When you print a table, the table is formatted using a default
form.You can override the default formatting by setting the following global variables:
- DSQDC_EC_DATE
- DSQDC_EC_TIME
- DSQDC_EC_CHAR
- DSQDC_EC_NUM
- DSQDC_EC_DEC
To print a table that is formatted with any form other than the default form, display the table, display the form that you want, and then issue the PRINT REPORT command.
However, if the form requires that the rows of data be in sorted order (for example, the form uses breaks), you must first run a query that selects data from the table in sorted order rather than display the table.
- When you print a chart, the form specifications are applied to the data and the chart is formatted by the GDDM Interactive Chart Utility.
- When you print a report or chart and the form contains errors,
the form panel on which the first error was found is displayed, and
the error is highlighted. To see other errors, you must correct the
first error displayed.
Some errors are not detected until you create a report.
- With a DBCS printer, you can print reports that contain DBCS data even if you do not have a terminal that displays DBCS data. Start QMF with the program parameter DSQSDBCS set to YES. Contact your administrator for details on customizing your QMF start procedure.
- If you are using DBCS data and QMF splits the page, printing resumes on the second and subsequent pages of the report at the fourth-byte position from the left side of the page.
- The page number, date, and time can be included in the chart title by specifying &PAGE, &DATE, and &TIME, respectively, on the FORM.PAGE panel.
- If you are using a three-part name to print a table
and your database administrator set up QMF to
use the multirow fetch feature, both databases you are working with
(local and remote) must be Db2 for z/OS;
otherwise, your command fails. Your database administrator can turn
off multirow fetch.
QMF commands with three-part names cannot be directed to DB2® for VSE and VM databases, nor can data be accessed remotely if you start QMF as a stored procedure.
By default, three-part names cannot be used to access remote tables that contain LOB data. However, you can set the DSQEC_LOB_RETRV global variable to 2 or 3 to access LOB metadata or data with a three-part name. Or, you can use the CONNECT command to connect to the database, and then run the query to access the remote table.
-
You can use the PRINT TABLE command to print from a QMF Data Service server. Use a three part name format and ensure that the DSQEC_DS_SUPPORT global variable is set.
- The maximum length of a data row that can be printed
depends on the type of object:
- Printing a table or printing a view that is based on a single
table
Db2 stores records within pages that are 4 KB, 8 KB, 16 KB, or 32 KB in size. Because you cannot create a table with a maximum record size that is greater than the page size, the maximum length of a data row that can be printed is 32 KB when you print a single table. For tables containing LOB or XML columns, each data row contains a locator or pointer that references the location of the data. The data itself is not stored as part of the record and metadata is printed for these types of columns when you issue the PRINT TABLE command.
- Printing a report or printing a view that is based on two or more
tables
The maximum length of a data row that can be printed from a view that joins two or more tables or from a QMF report in temporary storage is 2 GB when the DSQEC_TWO_GB_ROW global variable is set to 1. When the variable is set to 0, all rows except those that contain LOB or XML columns are truncated at 32 KB. Up to 2 GB of XML, CLOB, and BLOB data and up to 1 GB of DBCLOB data can be printed regardless of the DSQEC_TWO_GB_ROW setting.
Operations with XML data typically require larger amounts of storage, so printing reports, tables, or views that contain XML data might be limited by the amount of storage you have available. You can use the DSQSPILL and DSQSPTYP parameters to specify the use of extended storage for data no longer needed in active storage.
- Printing a table or printing a view that is based on a single
table
- The PRINT TABLE command prints XML metadata rather than XML data. By default, the PRINT REPORT command prints XML metadata rather than XML data unless you change the M edit code.
- The behavior of the PRINT REPORT and PRINT TABLE
commands for LOB data is controlled by the DSQEC_LOB_RETRV global
variable as follows:
- When the DSQEC_LOB_RETRV global variable is set to 1, LOB metadata is printed by default. You can print LOB data by changing the default M edit code.
- When the DSQEC_LOB_RETRV global variable is set to 2, LOB metadata is printed and the default M edit code cannot be changed.
- When the DSQEC_LOB_RETRV global variable is set to 3, LOB data is printed instead of LOB metadata.
- QMF updates the Last Used field for the object when you use this command. This field appears on object list panels that are displayed by the LIST command. You can change the list of commands that cause the field to be updated by setting the DSQEC_LAST_RUN global variable.
- If a PRINT TABLE command is directed to a Unicode database and the table contains columns that have graphic data types, QMF casts the data to other types to avoid errors.
- When you issue a PRINT TABLE command that references an unqualified table or view name, QMF sends the unqualified name to Db2 for resolution. Db2 uses the value in the CURRENT SCHEMA register to qualify the table or view name. You set the value of this register using the SET CURRENT SCHEMA statement.
A printed report differs from a report that is displayed on a screen in the ways that are shown in the following table:
Part of report | Displayed report | Printed report |
---|---|---|
Number of pages | One page that can be scrolled | One or more pages |
Page headings and footings | Appear only once | Appear at the top and bottom of each page |
Detail headings | Before the first detail line at the beginning of a report and on every screen that follows | Before the first detail line at the beginning of a report and on every page that follows |
Fixed column | Remain in place when report is scrolled horizontally | Repeated on the left side of each page |
Examples
- To display a prompt panel for the QMF PRINT
command:
PRINT ?
- To print a table that is formatted with a form other
than the default form:
DISPLAY tablename DISPLAY formname PRINT REPORT