z/OS Communications Server: IP User's Guide and Commands
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Specifying the output format

z/OS Communications Server: IP User's Guide and Commands
SC27-3662-00

You have two choices for the format of your output data set: spreadsheet format and report format. The default is NOSPRead (report format), but you can change the default for your FTP server by changing the FTP.DATA data set. See Changing local site defaults using FTP.DATA for more information.

Spreadsheet Format: You can have the output of the SQL query formatted to load directly into a spreadsheet program running on a PC or a workstation. To get the spreadsheet format, issue the following command:
SITE SPRead or LOCSITE SPRead

The SPRead format option puts a TAB character before the first character of each column entry, except the first column. See your spreadsheet program documentation for instructions about how to import the output of the SQL query.

Report Format: The NOSPRead format option puts one or more blank spaces between the columns, and it lists the SQL query, the column headings, and the resulting columns. Each section is separated with horizontal dashed lines. An output data set in NOSPRead, or report, format is easier to view and print.
To get the report format, issue the following command:
SITE NOSPRead or LOCSITE NOSPRead
The following is an example of the results contained in the NOSPRead format of the SQL.OUTPUT data set.
s---------+---------+---------+---------+---------+--------+---------+
SELECT * FROM DB2USER.PHONES
         WHERE FIRSTNAME LIKE 'BILL%'
         OR    FIRSTNAME LIKE 'WILL%'
h---------+---------+---------+---------+---------+---------+---------+
LASTNAME              FIRSTNAME       TIE  EXT  ALT  DEPT ROOM   NODE
d---------+---------+---------+---------+---------+---------+---------+
ACKERMAN              BILL            893  6266 7813 431  J2-A22 IBMABC
ADAMS                 WILLIAM J.      892  2202 1716 681  33-943 IBMABC
ASTERMAN              WILLIAM C.      893  7244 7813 222  J4-A44 IBMVM2
BENDER                WILLIAM R.      892  4217 4766 490  45-556 IBMVM2

A lowercase letter in the first position of each dashed line specifies what part of the output follows, enabling a program to read and interpret the contents. For example, s indicates that the SQL query follows, h indicates a header, d indicates that the rest of the data set is the actual data, and e indicates that an error message follows.

The width of the output data set depends on the width of the results from the DB2® query.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2013
This information center is Built on Eclipse™ ( www.eclipse.org ).