DB2 Server for VSE & VM: Interactive SQL Guide and Reference


Obtaining Printed Reports on a Workstation Printer

Your printed output is automatically sent to the printer designated by your site. You can change or redirect your printed output to another printer and specify other print characteristics by using the CP commands TAG and SPOOL. The TAG command identifies the receiving destination; the SPOOL command directs the printed output to the network machine.

First, start the statement stored as DEPT in Chapter 6, Storing SQL Statements by typing:

   start dept

Suppose that you want to print this information on a remote printer. You have to know the node ID for that printer and the user ID of the network machine. You can use the CMS IDENTIFY command for information about network identifiers (NETIDs). For this example, assume that you want to send your output to a 3262-13 printer with a destination ID of RMT3262. Enter CMS subset mode by typing the following:

   cms

Then type the following CMS command:

   identify

The results of this command give you the necessary information to use the SPOOL and TAG commands. The format of the output produced by typing this command is:

   user AT nodeid VIA netid

Now you would type the CP SPOOL and TAG commands to route your printed output to the 3262 printer:

   #cp spool printer to netid nohold
   #cp tag dev printer RMT3262 system

To return to ISQL and print your report, type:

   return
   print


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]