HP OpenVMS Systems Documentation

Content starts here

OpenVMS User's Manual

Previous Contents Index

3.4.4 Copying Files from a Remote Node to Your Node Using DECnet

Use the COPY command to copy files from another node to your node. For example, to copy the latest version of all files in the directory DISK2:[PUBLIC] on node CHAOS to files with the same names in your default directory, enter the following command:


3.4.5 Copying Files from Your Node to a Remote Node Using DECnet

Use the COPY command to copy files from your node to another node. If you receive a protection violation or DECnet error message when you attempt to copy a file across systems, you can either use mail to copy the file or you can use an access control string.

In the following example, the latest version of all files in the default directory are copied to files with the same names in the directory DISK2:[STAFF_BACKUP] on node CHAOS:


3.4.6 Copying Files on Remote Systems Using TCP/IP

TCP/IP uses the File Transfer Protocol (FTP) service to access and transfer files to and from another host over a network. To copy files from a remote host to your local host, use the GET command. To copy files from your local host to a remote host, use the PUT command. To use these commands, you must have an active FTP session with a remote host. You can enter any number of FTP commands during the session. For information on using FTP commands, refer to the Compaq TCP/IP Services for OpenVMS User's Guide.

In the following example, the file FEES.DAT is sent to the JONES account on node CHAOS:


3.4.7 Using Access Control Strings to Copy Files

To copy files after you have received a protection violation, you can follow the node name in the file specification with an access control string (see Section 3.1.12).

In the following example, the user has an account on node CHAOS with the user name SMITH and the password SPG96PRT. The user is copying the latest version of all files in the default directory to the account on CHAOS.


3.4.8 Renaming Files

Use the RENAME command to give the file a new name and optionally to locate it in a different directory. Note that after being renamed, the original file no longer exists. When you use the RENAME command, the input and output locations must be on the same device.

In the following example, the file FEES.DAT is given the new name RECORDS.DAT and it is moved from the default directory to the [SAVETEXT] directory:


3.5 Displaying the Contents of Files

The following sections describe how to display the contents of files with tools and commands supported in an OpenVMS environment.

3.5.1 Using the TYPE Command

To display the contents of a file on your screen, enter the TYPE command and the file name at the DCL prompt. You do not have to specify the version number in the file specification because the system displays the latest version of a file by default.

In the following example, the latest version of the file STAFF_VACATIONS.TXT is displayed:


3.5.2 Controlling the Display

If you specify the /PAGE qualifier to the TYPE command, you can view one screen at a time. The system prompts you to press Enter when you want to see the next screen.

By invoking an interactive text editor (for example, EVE or EDT) with the /READ_ONLY qualifier, you can use interactive editing commands to move around in a file and search for specific sequences of characters. The /READ_ONLY qualifier prevents you from creating a modified version of the file when you exit from the interactive editor.

3.5.3 Displaying Files on Remote Nodes

When using DECnet to display the contents of a file on a remote node, include the node name, disk, and directory in the file specification.

In the following example, the file COMPANY_HOLIDAYS.TXT (which is located on remote node CHAOS) is displayed:


When using TCP/IP to display the contents of a file on a remote node, use the FTP VIEW command, and specify the file name. If the file is not in your current working directory, include the directory name in the file specification. Refer to the Compaq TCP/IP Services for OpenVMS User's Guide for information on the FTP VIEW command.

3.5.4 Displaying Files with Wildcards

You can use the asterisk (*) wildcard to display all versions of a specific file.

In the following example, all versions of the file LOGIN.COM in the directory [JONES] are displayed:


In the following example, all versions and all file types of all files that begin with the word STAFF in the directory [JONES] are displayed:


3.5.5 Displaying Multiple Files

If you specify more than one file in the TYPE command line, the system displays the files in the order you specify. If you use wildcard characters, the system displays the files in alphabetical order.

3.6 Deleting Files

The DELETE command removes files from directories and releases the disk space they occupy for use by other files. When you use the DELETE command, you must specify a version number or the asterisk (*) wildcard character as a version number in each file specification.

For example, to delete version 17 of the file POUND.LIS, enter the following command:


To delete versions 16 and 17 of the file POUND.LIS, enter the following command:


To delete all versions of the file POUND.LIS, enter the following command:


When you delete many files with wildcard characters, you might want to confirm each deletion by using the /CONFIRM qualifier. Similarly, you might want to display the names of files as they are deleted. To do this, specify the /LOG qualifier with the DELETE command.

In the following example, the deletion of all the files in the subdirectory [JONES.LICENSES.DOG] is confirmed because the /CONFIRM qualifier is specified:


In the following example, the system displays the names of the files after they are deleted because the /LOG qualifier is specified:


3.6.1 Using the PURGE Command

The PURGE command deletes all except the latest version of the specified file (or all files) in the default directory or any other specified directory. Purging old versions of files after updating them enables you to retain more free space on your disk.

In the following example, all except the latest two versions of each file in the default directory are purged:


3.7 Protecting Files from Other Users

The following sections provide an overview of file protection procedures. For detailed security information, see the following:

  • Chapter 4 for information on directory protection
  • Chapter 10 for complete information on changing file protections

3.7.1 Access Control Lists (ACLs)

To prevent other users from accessing your files, you can change the protection or modify the access control list (ACL) of your files. To change the protection or modify the ACL of a file, you must own the file, have control access to the file, or have GRPPRV, SYSPRV, BYPASS, or READALL privilege.

3.7.2 Types of Protection

There are two types of file protection: default and explicit. When a file is created, it usually has the same protections as its parent directory; this is the default protection. If you create a file using the CREATE/PROTECTION command or if you change the protection on an existing file by issuing the SET SECURITY/PROTECTION command, you are using explicit file protection.

Note that to protect a file completely, you must apply the same or greater protection to the directory in which the file resides.

3.8 Printing Files

To print a file or files, use the PRINT command. The PRINT command places your print job (all the files to be printed) in a list of jobs to be printed called a print queue. The file types of the files named in the PRINT command default to .LIS or the last explicitly named file type. The system displays the job name, the queue name, the job number, and status of the job.

By default, the job name is the name of the first (or only) file specification in the PRINT command. After a job is submitted to a queue, you reference it using the job number. After the job is queued, it will be printed when no other jobs precede it in the queue and when the printer is physically ready to print.

In the following example, a print job containing three files is placed in the default print queue, SYS$PRINT:

Job POUND (queue SYS$PRINT, entry 202) started on SYS$PRINT

Because the default file type for the PRINT command is .LIS, the files POUND.LIS, MALE.LIS, and FEES.DAT are queued. The job name is POUND, the queue name is SYS$PRINT, and the job number is 202.

3.8.1 Print Job Priority

A print queue can execute only one job at a time. Print jobs are scheduled for printing according to their scheduling priority, and the job with the highest priority is printed first. If more than one job exists with the same priority, the smallest job is usually printed first. Jobs of equal size having the same priority are selected for printing according to their submission time. Priority may also be determined by the system manger or by entering the /PRIORITY qualifier to the PRINT command. For more information on scheduling priorities, refer to the OpenVMS System Manager's Manual.

3.8.2 Displaying Queue Information

The default print queue, SYS$PRINT, is usually started as part of the site-specific system startup procedure. The following table shows commands you can use to display information about queues:

To display... Enter this command...
The queues at your site SHOW QUEUE
The status of your print jobs SHOW ENTRY
Jobs queued by other users SHOW ENTRY/USERNAME= username
Information about a specific job or jobs SHOW ENTRY job-name

SHOW ENTRY entry-number

In the following example, the SHOW ENTRY command is used to display information about a print job that has been queued:


  Entry  Jobname         Username     Blocks  Status
  -----  -------         --------     ------  ------
    202  POUND           JONES            38  Pending
         On stopped printer queue SYS$PRINT)

3.8.3 Print Forms

A print form serves the following functions:

  • Determines certain page formatting attributes (such as margins and page length)
  • Determines whether a job is eligible to print depending on the paper stock specified in the form

If your printing needs are limited, you do not need to use special forms because Compaq supplies a systemwide default form (named DEFAULT) for all queues. System managers can also create print forms. If you need to format output or if certain print jobs require special paper, contact your system manager.

3.8.4 Stopping a Print Job

To stop a print job and delete it from the print queue, enter the entry number parameter to the DELETE/ENTRY command.

In the following example, entry 202 is deleted:


3.8.5 Printing Files on Other Nodes

DECnet or TCP/IP services allow you to print a file on another system.

Using TCP/IP, your system manager can configure your system with the Line Printer Remote (LPR) and Line Printer Daemon (LPD) network services that allow you to use the DCL PRINT command to send print jobs to a print queue on a remote network host. The remote host can be a UNIX system or another OpenVMS system running LPR/LPD. Using the LPR/LPD network services, you can perform the following:

  • Send print jobs to a printer connected to a remote network host
  • Display print queue status
  • Cancel print jobs
  • Receive on local OpenVMS system print queues print jobs initiated from a user on a UNIX system
  • Get a "finished" notification through SMTP mail

Refer to the Compaq TCP/IP Services for OpenVMS User's Guide, which describes how to print files using the LPR/LPD commands.

With DECnet, you can print a file on another system, copy that file to the remote node and specify the /REMOTE qualifier to the PRINT command.

In the following example, the file COMPANY_HOLIDAYS.TXT is copied from the local node to the remote node CHAOS and the file is queued for printing to the default system print queue (SYS$PRINT) on node CHAOS:


An access control string indicates that the user JONES is authorized to copy files to the directory [JONES] on node CHAOS. The asterisk (*) wildcard at the end of the file specification instructs the system to duplicate the file name COMPANY_HOLIDAYS.TXT when that file is copied to the remote node.


Not all qualifiers to the PRINT command are compatible with the /REMOTE qualifier. For example, you cannot queue a job to a specific print queue; all jobs are queued to the default system print queue (SYS$PRINT). See the description of the /REMOTE qualifier to the DCL command PRINT in the OpenVMS DCL Dictionary for a list of PRINT command qualifiers compatible with /REMOTE.

3.8.6 PRINT Command Qualifiers

Print jobs can be controlled in various ways by using qualifiers to the PRINT command. For example, you can specify the number of copies printed or you can request that the system notify you when your print job is complete.

In addition to the qualifiers described in this manual, if you are running DECprint Supervisor software on your system, you can use the /PARAMETER qualifier to print landscape, two-sided, or many other ways. Contact your system manager for a list of print options that are available on your system.

The following table lists a summary of PRINT command qualifiers. For complete information on the PRINT command, refer to the OpenVMS DCL Dictionary or online help.

Print Operations Print Job Commands and Qualifiers
Number of copies:
By job
By file
Specified file only

file-spec/COPIES=n 1
Number of pages PRINT/PAGES= 1
Print features:
Flag pages
Type of forms (paper)
Special features
Page heading

Notification of job execution PRINT/NOTIFY
Delay execution of a job:
For a specified time

Release a delayed job SET QUEUE/ENTRY/RELEASE
Display your print jobs SHOW ENTRY
Stop a print job:
Delete job
Stop current job
and begin printing
the next job
in the queue
Stop current job
and requeue it
for printing


Keep a job in a queue
after it has completed

1Parallel qualifiers for the SET QUEUE/ENTRY command allow you to specify these operations for print jobs that are already queued but not yet printing.

3.8.7 WWPPS Utility (Alpha Only)

The World-Wide PostScript Printing Subsystem (WWPPS) is a utility that allows you to print a text file with various language characters on any PostScript printer. By embedding font data within the PostScript printable file, the language characters can be printed even if the printer does not have the local language fonts.


Embedding font data in PostScript printable files may increase the size of the file beyond the size that the printer memory can support. If this happens, WWPPS appends an error page to the end of the printed output to notify you that the file size exceeded the printer's capacity.

To print local language characters such as Chinese, Korean, and Japanese, it is recommended that a printer with a minimum of 24MB of memory be used.

Supported Languages

WWPPS supports the following languages:

  • Cyrillic (ISO8859-5)
  • Greek (ISO8859-7)
  • Hebrew (ISO8859-8)
  • Japanese (Super DEC Kanji)
  • Korean (DEC Korean)
  • Latin 1 (ISO8859-1)
  • Latin 2 (ISO8859-2)
  • Latin 4 (ISO8859-4)
  • Simplified Chinese (DEC Hanzi)
  • Thai (TACTIS)
  • Traditional Chinese (Taiwanese EUC/DEC Hanyu)
  • Turkish (ISO8859-9)
  • Unicode

When processing a character, WWPPS checks to see if the character is printable in the current locale. The locale setting is provided by the Compaq C for OpenVMS Run-Time Library (RTL) during the OpenVMS installation. Except for files in 16-bit Unicode or ISO 10646 (USC-4) format, you must set the appropriate locale before printing files that contain characters in languages other than English. If the locale setting for the process is not appropriate for the input file, the locale can be set specifically for the print job by using the /LOCALE qualifier.

Supported Codesets

The following codesets are supported on OpenVMS systems:

Codeset Codeset Name
DECHANYU DECHanyu for Traditional Chinese (Plane 1 and Plane 2 only)
DECHANZI DECHanzi for Simplified Chinese
DECKOREAN DECKorean for Korean
GB18030 GB18030-2000 for both Simplified Chinese and Traditional Chinese
ISO8859-1 ISO Latin-1
ISO8859-2 ISO Latin-2
ISO8859-5 ISO Latin-5
ISO8859-7 ISO Latin-7
ISO8859-8 ISO Latin-8
ISO8859-9 ISO Latin-9
SDECKANJI Super DEC Kanji for Japanese
TACTIS TIS-620 for Thai

All of these codesets are supported by WWPPS, but fonts can be associated with only one language at a time for each codeset.

WWPPS also supports Unicode character conversion for all of these codesets except Thai. A Unicode character is converted to a character in one of these codesets; then the font supporting that codeset is used for the character in the PostScript file. If a character cannot be converted, it is printed as a space.

Previous Next Contents Index