Document revision date: 19 July 1999
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

OpenVMS System Manager's Manual


Previous Contents Index

7.8.1 Setting Printer Characteristics

Printer characteristics must be set prior to starting queues for the printers. The DCL command SET PRINTER establishes characteristics for a line printer. The DCL command SET TERMINAL sets characteristics for a printer connected to a terminal or LAT port.

In addition, if you want to spool your printers, you must do so before starting the queues to be associated with those printers. For information about spooled printers, see Section 7.8.2.

To execute these commands each time your system boots, add these commands to your site-specific startup command procedure. If your configuration is simple, you can add the commands to SYSTARTUP_VMS.COM. If your configuration requires a large number of commands, create a separate command procedure (for example, PRINTER_SETUP.COM) and execute it from SYSTARTUP_VMS.COM. When the device setup command procedure finishes executing, control returns to SYSTARTUP_VMS.COM.

Example

The following example provides sample commands you could include in your startup procedure to set device characteristics for printers. This example also includes the commands used to spool printers. You generally include the commands to spool printers along with the commands to set device characteristics.


$! Set up line printer devices                  
$! 
$ SET PRINTER/PAGE=60/LOWERCASE/TRUNCATE LPA0: 
$ SET PRINTER/LA11/UPPERCASE/WRAP LPB0: 
$ SET DEVICE/SPOOLED=(LINE_PRINT,SYS$SYSDEVICE) LPA0: 
$ SET DEVICE/SPOOLED=(SYS$PRINT,SYS$SYSDEVICE) LPB0: 
$! 
$! Set up LAT printers 
$! 
$ SET TERMINAL LTA331:/SPEED=9600/DEVICE=LN03 - 
  /NOBROADCAST/NOECHO/HARDCOPY/NOTYPE_AHEAD/PERMANENT 
$ SET DEVICE LTA331:/SPOOLED=(MKTG$LN03_1,SYS$SYSDEVICE) 
$! 
$ SET TERMINAL LTA332:/DEVICE=LA210/PAGE=66  - 
  /NOBROADCAST/PERMANENT 
$ SET DEVICE LTA332:/SPOOLED=(LA210$PRINT,SYS$SYSDEVICE) 

7.8.2 Using Spooled Printers

Certain application programs print output by writing or copying data directly to a printer rather than submitting it to a queue. A spooled printer causes such an application program to write output to an intermediate storage device (such as a disk) so that the printer targeted to print the output remains available to other system users while the program is running.

When you spool a printer, you specify a storage device and an output queue to be associated with that printer. When a process running an application directs its output to the spooled printer, the output is instead placed in a temporary file on the storage device. When the file is closed, the system submits the file for printing on the associated output queue. Both the spooling of the output file to an intermediate storage device and the subsequent queuing of a job consisting of this file occur without the direct intervention of the user.

If your system runs application programs that might write output directly to a printer, Compaq recommends that you spool your printers. Compaq recommends that you also spool your LAT printers to prevent privileged users from writing directly to a LAT printer. Writing directly to a LAT printer can cause problems for output queues that use the printer.

Figure 13-9 illustrates a sample configuration using spooled printers. Section 7.8.2.1 describes how to set up a spooled printer.

7.8.2.1 Spooling Printers

To spool a printer, use the SET DEVICE/SPOOLED command. This command associates the printer with a storage device (such as a disk) and an output queue.

You must spool a printer before you start the queue to be associated with the printer.

Enter the DCL command SET DEVICE/SPOOLED in the following format:

SET DEVICE/SPOOLED[=(queue-name[:],intermediate-disk-name[:])] output-device-name 

You should always specify the intermediate disk and queue explicitly. If the queue you associate with the spooled output device is a generic queue, a file written to that device is sent to the generic queue, which in turn places the job in one of its target queues. As a result, a job copied to the LPA0: device, for example, might not necessarily print on the printer LPA0:, but instead might print on one of the other printers targeted by the generic queue.

When you select an intermediate storage device, make sure that it has sufficient free space for the volume of spooled output. If you plan to enforce disk quotas on the intermediate device, make sure that all expected users have a quota authorized on the intermediate device. The intermediate device must be mounted before files can be written to it.

After establishing an output device as spooled, you should test the device, because errors in disk or queue names are not detected until spooling is attempted. This step is described in Section 7.8.2.3.

You should create a command procedure to set up your output devices each time the system reboots. Include the commands to set up spooled devices in this command procedure. For more information, see Section 7.8.1.

Example

The following example illustrates sample commands used to set up spooled printers. This example also includes the command used to set device characteristics. You generally include the commands to spool printers along with the command to set device characteristics in a startup command procedure to set up output devices.


$! Set up and spool line printer devices                  
$! 
$ SET PRINTER/PAGE=60/LOWERCASE/TRUNCATE LPA0: 
$ SET PRINTER/LA11/UPPERCASE/WRAP LPB0: 
$ SET DEVICE/SPOOLED=(SYS$PRINT,SYS$SYSDEVICE) LPA0: (1)
$ SET DEVICE/SPOOLED=(SYS$PRINT,SYS$SYSDEVICE) LPB0: 
$! 
$! Set up and spool LAT printers 
$! 
$   SET TERMINAL LTA331:/SPEED=9600/DEVICE=LN03 - 
    /NOBROADCAST/NOECHO/HARDCOPY/NOTYPE_AHEAD/PERMANENT 
$   SET DEVICE LTA331:/SPOOLED=(MKTG$LN03_1,SYS$SYSDEVICE)  (2)
$! 
$   SET TERMINAL LTA332:/DEVICE=LA210/PAGE=66 - 
    /NOBROADCAST/PERMANENT 
$   SET DEVICE LTA332:/SPOOLED=(LA210$PRINT,SYS$SYSDEVICE) (3)

  1. Spools the output device LPA0: by associating it with the storage device SYS$SYSDEVICE and the queue SYS$PRINT. When output from an application is directed to LPA0:, the data is temporarily stored on SYS$SYSDEVICE until the application completes. This keeps the output device LPA0: available for other jobs until the application's output is ready for printing. When the application completes, its output is submitted to the queue SYS$PRINT.
  2. Spools the LN03 device on LAT port LTA331: by associating it with the storage device SYS$SYSDEVICE and the queue MKTG$LN03_1.
  3. Spools the LA210 device on LAT port LTA332: by associating it with the storage device SYS$SYSDEVICE and the queue LA210$PRINT.

7.8.2.2 Despooling a Spooled Printer

Occasionally, you might need to disable spooling on a device. For example, the SET TERMINAL command can be executed only on a despooled output device. If you need to disable spooling to an output device, use the SET DEVICE command with the /NOSPOOLED qualifier.

You must stop the corresponding queues before you can change the spooling status.

For more information about the SET DEVICE/NOSPOOLED command, refer to the OpenVMS DCL Dictionary.

7.8.2.3 Testing a Spooled Printer

After establishing an output device as spooled, you should test the device, because errors in disk or queue names are not detected until spooling is attempted. To test a spooled device, use a command procedure similar to the following one:


$!          *****TESTING SPOOLED DEVICE*** 
$! 
$! set the device spooled 
$  SET DEVICE/SPOOLED=(SYS$PRINT,SYS$SYSDEVICE:) LPA0: 
$! 
$! create a test file 
$  CREATE TEST.LIS 
     !Add the first test record here. 
     !Ctrl/Z to exit the file 
$! 
$! write the file to the output device 
$  COPY TEST.LIS LPA0: 
$  EXIT 

7.9 Managing Tape Drives

When managing tape drives, perform the following tasks:
Task For More Information
Get information about tape drives Section 7.9.1
Change tape drive characteristics Section 7.9.2

For information about managing volumes on tape drives, see Section 8.2.

7.9.1 Getting Magnetic Tape Device Information

You can enter the SHOW DEVICES command to find available magnetic drives on your system. The SHOW DEVICES/FULL command enables you to retrieve additional information about the characteristics of a particular magnetic tape device.

7.9.2 Modifying Magnetic Tape Device Characteristics

Use the DCL command SET MAGTAPE to define the default characteristics associated with a specific magnetic tape device for subsequent file operations. The device must not be currently allocated to any other user.

The following examples illustrate uses of the SET MAGTAPE command in conjunction with the MOUNT command.


Examples

#1

$ MOUNT MTB1:/FOREIGN
$ SET MAGTAPE MTB1:/DENSITY=800
      

> The MOUNT command mounts a tape on the MTB1: device. The /FOREIGN qualifier indicates that the tape is not in the standard format used by the operating system. For example, certain Backup utility (BACKUP) operations require you to mount a tape with the /FOREIGN qualifier.

The SET MAGTAPE command defines the density at 800 bpi for writing to the magnetic tape. (The density is reset only if the magnetic tape has never been written before.)

#2

$ MOUNT MTA0:/FOREIGN
$ SET MAGTAPE MTA0:/SKIP=FILES:4
      

The MOUNT command mounts a foreign magnetic tape on the MTA0: device; the SET MAGTAPE command directs the I/O subsystem to position the magnetic tape to skip four files.

#3

$ MOUNT MTA1:/FOREIGN
$ SET MAGTAPE/REWIND MTA1:
      

The MOUNT command mounts a foreign tape on the MTA1: device; the SET MAGTAPE/REWIND command rewinds the volume.

7.10 Managing a Card Reader (VAX Only)

On VAX systems, the Compaq CR--11 card reader reads computer card decks. Users can submit the two following types of card decks for processing:

To ensure that card decks are processed efficiently, you must understand their characteristics and the use of the card reader. The following sections describe which cards you should check before processing a deck through a card reader, and how to determine which cards are damaged.

7.10.1 Distinguishing the Type of Card Deck (VAX Only)

Before loading a card deck into the card reader, determine:

The following sections describe how to make these determinations.

7.10.1.1 Batch Job Card Deck (VAX Only)

A batch job card deck consists of three segments:

The initial two cards in a batch job card deck are the $JOB and the $PASSWORD cards. These cards log in the user and the batch job to the system. Following the initial two cards are program cards. Program cards contain instructions that direct the system to libraries, routines, and data needed to complete the batch job. The last card must be either an end-of-job command ($EOJ) card or an end-of-file (EOF) card. Either of these cards tells the system that this is the end of the job.

Checking Input

The system cannot execute the job without $JOB and $PASSWORD cards. If you are given a card deck with these cards omitted, return the deck so that the user can insert them.

Since the card deck contains the user's password, you must ensure that it is always handled with care to preserve the security of the user's account.

The last card in the deck must be either an $EOJ or an EOF card.

If the last card is not one of these end cards, you can type an end card on the card punch (12-11-0-1-6-7-8-9 overpunch in column 1) and place it at the end of the deck.

Checking Output

The log file produced by a card reader batch job is queued for printing to the default system printer queue, SYS$PRINT. To have the log file queued to a different queue, the user can specify the /PRINTER qualifier on the $JOB card.

If an error occurs while the system is attempting to validate the $JOB and $PASSWORD cards, the operator communication manager (OPCOM) sends to the card operator an error message that reports the job card and the error.

7.10.1.2 Data Card Deck (VAX Only)

A data deck contains data that will be either read by a program or copied to a file for later use. The process that reads the data deck is usually associated with an interactive user at a terminal or with a batch job submitted by an interactive user. Since the user and process already are logged in to the system, the first card can contain any data the user specifies. Then, either the program must read the exact number of cards supplied, or the last card must be an EOF card to inform the program that this is the end of the data deck.

When a user wants a data deck to be read, you must make sure the user has allocated the card reader. If the card reader is not allocated, the system tries to submit the deck as a batch job and subsequently flushes the deck through the reader, rejecting the job.

If the program does not read the exact number of cards (as with the COPY command), the EOF card must be the last card in the deck, to inform the program that this is the end of the deck. Without this card, the program waits indefinitely for more cards, and the system prints "card reader off line" messages on the operator's terminal. If the card deck lacks an EOF card, you can type one on a card punch and insert it at the end of the deck.

7.10.1.3 Setting Card Reader Translation Modes (VAX Only)

For the system to read input properly, the card reader must be set to the correct translation mode---the same as the translation mode of the card punch that prepares the deck. The system supports 026 and 029 card punches.

Make sure the following conditions exist so you can set the card reader to the correct translation mode:

To set the translation mode of the card reader for many decks of the same type, use the SET CARD_READER command. This command is described in the OpenVMS DCL Dictionary. By default, when the system is booted, the translation mode is set to 029.

7.10.2 Running the Input Symbiont Interactively (VAX Only)

To run the input symbiont interactively and take card image input from an OpenVMS Record Management Services (RMS) file, follow these steps:

  1. Enter a command in the following format:

    DEFINE/USER_MODE SYS$INPUT filename 
    


    For example:


    $ DEFINE/USER_MODE SYS$INPUT SPECIAL_FILE.DAT 
    

  2. Enter the following command:


    $ RUN SYS$SYSTEM:INPSMB
    

Running the input symbiont interactively requires the following access:

All messages are displayed to the terminal rather than to the card operator.


Chapter 8
Managing Storage Media

This chapter discusses the following subjects:

Information Provided in This Chapter

This chapter describes the following tasks:
Task Section
Allocating and deallocating disk and tape drives Section 8.2
Initializing volumes Section 8.3
Protecting volumes Section 8.4
Mounting volumes Section 8.5
Setting up disk volume sets Section 8.6
Mounting ISO 9660 volume sets and groups Section 8.7
Mounting tape volume sets Section 8.8
Dismounting volumes and volume sets Section 8.9
Using command procedures for media setup Section 8.10
Managing disk space Section 8.11
Using the Analyze/Disk_Structure utility to check and repair disks Section 8.12
Using mount verification for recovery Section 8.13
Using Interrupt Priority Level C (IPC) Section 8.14
Using the Bad Block Locator utility to detect media errors Section 8.15

This chapter explains the following concepts:
Concept Section
Disks and CD-ROMs Section 8.1.1
Extended File Specifications on OpenVMS Alpha systems Section 8.1.2
Magnetic tape Section 8.1.3
Public and private disk volumes Section 8.1.4
Tape and disk volume protection Section 8.4
Disk volume sets Section 8.6.1
Disk quotas Section 8.11.1
Mount verification Section 8.13.1

8.1 Understanding Storage Media Concepts

The following list contains concepts related to storage media in general:
Term Definition
Device (or Drive) Hardware that allows access to storage media.
Media Physical items on which you can store data.
Volume Logical unit of data storage; one or more media units. A disk or tape must be mounted on a device for the operating system to recognize itas a volume.

The following sections use these terms to explain media concepts.

8.1.1 Disk and CD-ROM Concepts

This section defines terms related to disks and CD-ROMs. It also compares on-disk file structures and explains the ISO 9660 standard.

8.1.1.1 Disk Terminology

Disks are physical media on which files reside. On--Disk Structure (ODS) refers to a logical structure given to information stored on a disk; it is a hierarchical organization of files, their data, and the directories needed to gain access to them. The OpenVMS file system implements the ODS and provides access control to the files located on the disk.

Compact disc read-only memory (CD-ROM) discs and readers used with computers are very similar to the CD-ROMs used for audio applications. The major differences are that CD-ROM drives have a digital (rather than an audio) interface, and that CD-ROM discs employ additional layers of error correction and formatting to encode data blocks.

The advantages of storing data on CD-ROMs rather than on tape or other removable media are:

Table 8-1 defines terms as they apply to disks and CD-ROMs.

Table 8-1 Disk and CD-ROM Terminology
Term Definition
Sector Uniquely addressable unit. Each sector on a CD-ROM comprises a sequence of 2048 8-bit bytes; on most disks, a sector is equivalent to a block (512 bytes).
Logical block Organizational unit of volume space containing 512 8-bit bytes. A CD-ROM sector comprises 4 blocks.
Logical block numbering Logical blocks are numbered from 0 to n-1.
Cluster 1 Logical grouping of blocks; basic unit by which disk (not CD-ROM) space is allocated.
Extent Contiguous logical blocks allocated to a particular file.
File Array of consecutive virtual blocks 2, numbered 1 to n, plus a set of attributes with values. A file is either a data file or a directory file. Directories can contain both data files and directory files.
Volume Disk that has been prepared for use by placing a new file structure on it.
Volume set Combination of several volumes; has the appearance of one large volume.


1This usage of cluster does not refer to a set of nodes that form an OpenVMS Cluster environment; it refers only to disks.
2A logical block resides at an absolute address on a disk; a virtual block, on the other hand, resides at an address relative to a file.

Information on a disk or CD-ROM can be accessed as logical blocks on the disk or as virtual blocks of files on the disk.


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
6017PRO_028.HTML