.----------------------------. V | >>-PRInt-------+----------------------+--+--------------------->< | .-?---------. | +-CLAss--+-character-+-+ | .-1-------. | +-COPies--+-integer-+--+ +-TERMid--termid-------+ +-DESTid--wkstat-------+ +-SYStem---------------+ '-TOUSER--+--------+---' '-userid-' |
DB2 Server for VSE |
---|
PRINT is an ISQL display command that requests printed copies of a query result by sending it to the system printer, POWER remote printer, or CICS/VSE terminal. |
DB2 Server for VM |
---|
PRINT is an ISQL display command that requests printed copies of a query result by sending it to the system printer. |
The data that is printed is based on the query result obtained by the SELECT statement.
All the rows of the query result, as modified by FORMAT commands, are printed regardless of the position of your display of the result. A query result that is longer than what can be viewed on one display, can be printed with one PRINT command. The printed report starts with the column and the character position within the column that is at the left edge of the display when the PRINT command is typed. The number of characters of each row that is printed depends on the setting of the PAGESIZE WIDTH value specified by the SET command. You receive a message if the width of the row of data exceeds the WIDTH setting.
The output class to use can be obtained from the people responsible for data processing at your location.
DB2 Server for VSE | ||
---|---|---|
|
DB2 Server for VM | ||
---|---|---|
|
For DB2 Server for VM, the CLASS value can be an integer (0 to 9) or a letter (A to Z). The default is class A.
For DB2 Server for VSE, if CLASS is not included in the PRINT command at all, the current class set by the SET command is used. If no class has been set by a SET command, the default printer class for the system is used.
For DB2 Server for VM, there is no SET command for CLASS. You can set the CLASS value by a CP SPOOL command.
If this keyword is not specified, one copy is the default unless otherwise determined by a SET command (in DB2 Server for VSE).
DB2 Server for VM | ||
---|---|---|
You can also use the CP SPOOL command to specify the number of copies. The value for copies that is specified on the CP SPOOL command remains in effect until another value is specified by another CP SPOOL command.
Because you can reset your PF keys, you can assign the PRINT function to any PF key. The default function key is PF4 or PF16. |
If you enter the PRINT TOUSER command without specifying a userid, ISQL spools the output to the ISQL user ID used at time of log on.
The PRINT TOUSER nnn command has the same effect as the PRINT DESTid nnn command, where nnn is the ID of the remote workstation to which you want to direct your printed output. This ID can be any number from 1 to 250.
DB2 Server for VSE |
---|
Any TERM, DEST, or SYS indication on the PRINT command applies for that particular PRINT operation only. The PRINT command can be started by pressing PF4. |
Each printed page is numbered and dated at the top. A title is automatically provided at the top of each printed page. This title consists of the first 100 characters of the SELECT statement issued unless you specified your own title with an ISQL FORMAT command.
You can specify more than one keyword option on a single PRINT command. For example, the following command specifies both the class and number of copies:
print copies 3 class a
DB2 Server for VM |
---|
If there is an error in the command, all valid changes are made until the mistake is determined. For example, in the following command, you type a $ sign instead of the letter a: print copies 3 class $ The command sets the number of print copies to 3. However, the class remains at the default class A, because $ is an incorrect output class. This output class error does not change the number of copies to the original value. Neither does the number of copies or the class change from their current settings if the following command is issued: print class $ copies 3 The output class value is again incorrect, so processing stops when this error is detected. |