Document revision date: 30 March 2001
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

OpenVMS DCL Dictionary


Previous Contents Index

The READ command requests data from the current SYS$COMMAND device. If the command procedure containing these lines is executed interactively, the command issues a prompt to the terminal, accepts a line of data, and equates the data entered to the symbol name DATA_LINE.

Then the WRITE command writes the value of the symbol DATA_LINE to the file identified by the logical name OUTPUT_FILE.
#4

$ OPEN/READ INPUT_FILE TRNTO::INVENTORY.DAT 
$ OPEN/APPEND OUTPUT_FILE RECEIVE.DAT 
$ READ INPUT_FILE DATA_LINE 
$ WRITE OUTPUT_FILE DATA_LINE 
      

The OPEN/READ command opens the file INVENTORY.DAT at the remote node TRNTO for reading and assigns it the logical name INPUT_FILE. The OPEN/APPEND command opens the file RECEIVE.DAT in the current default directory. The READ command requests data from the file INVENTORY.DAT at the remote node TRNTO. The WRITE command writes the value of the symbol DATA_LINE to the end of the local file RECEIVE.DAT.


RECALL

Displays up to 254 previously entered commands on the screen for subsequent execution.


Format

RECALL [command-specifier]


Parameter

command-specifier

Specifies the number or the first several characters of the command you want to recall. You cannot use any of the qualifiers in conjunction with a command-specifier.

The specified characters should be unique. If they are not unique, the RECALL command displays the most recently entered command line that matches those characters. For example, suppose you enter a SHOW STATUS command and later enter a SHOW TIME command. If you then type RECALL S, the SHOW TIME command is recalled. You must type RECALL SHOW S to recall the SHOW STATUS command. The number of the command can be from 1 to 254 (where 1 is the last command entered).

The RECALL command itself is never assigned a number. If no command specifier is entered, the RECALL command recalls the most recently entered command. You can use the /ALL qualifier to have the system display all the commands in the recall buffer, along with their command numbers, to verify the number of the command you want to recall.


Description

When you enter commands to the system, they are stored in a recall buffer for later use with the RECALL command. Input to the INQUIRE command in command procedures is also placed in the recall buffer. The RECALL command itself is never stored in the recall buffer. You can use continuation characters with the commands to be recalled, but only 255 characters can be read at a time.

The recall buffer can hold up to 254 commands. The size of the recall buffer is 4Kb, which will store approximately 80 commands at 48 characters each.

If the length of stored commands makes it necessary, one or more of the oldest commands will be removed from the recall buffer to make room for the most recent command.

When you use the RECALL command, the system displays the command but does not process it. If you want it processed as it appears, press Return. You can use the command line editing facility to make minor changes in the command line and then press Return to process the revised version of the command.


Qualifiers

/ALL

Displays all the commands (and their numbers) available for recall. Do not use the /ALL qualifier with the other RECALL qualifiers.

Note

The RECALL command is never stored in the recall buffer.

/ERASE

Erases the contents of the recall buffer.

/INPUT=filespec

Causes each line of the input file to be added to the recall buffer. If a file type is not specified with the file name, .LIS is the default. The file specification cannot include the asterisk (*) and the percent sign (%) wildcard characters.

If the /ERASE qualifier is also specified, the contents of the recall buffer are erased before the contents of the specified file are read into the recall buffer.

The /INPUT qualifier is incompatible with the /ALL and /PAGE qualifiers.

/OUTPUT=filespec

Specifies the name of the output file where the contents of the recall buffer are written. If you do not specify a file type, the default is .LIS. The file specification cannot include the asterisk (*) and the percent sign (%) wildcard characters.

If the /ERASE qualifier is also specified, the contents of the recall buffer are erased after the contents of the recall buffer are written to the specified file.

The /OUTPUT qualifier is incompatible with the /ALL and /PAGE qualifiers.

/PAGE

/NOPAGE (default)

Displays all the commands (and their numbers) available for recall one screen at a time. The /NOPAGE qualifier produces the same output as the /ALL qualifier. You can cancel the output display by pressing Ctrl/Z.

The /PAGE qualifier is incompatible with the /INPUT and /OUTPUT qualifiers.


Examples

#1

$ RECALL T
      

The RECALL command in this example recalls the last command entered that begins with the letter T.

#2

$ SHOW DEFAULT
  DISK3:[SMITH]
$ DIRECTORY SEPT*
  %DIRECT-W-NOFILES, no files found
$ SET DEFAULT [SMITH.LETTERS]
$ RECALL/ALL
  1 SET DEFAULT [SMITH.LETTERS]
  2 DIRECTORY SEPT*
  3 SHOW DEFAULT
$ RECALL 2
$ DIRECTORY SEPT* 
  %DIRECT-W-NOFILES, no files found
$ RECALL 2
$ SET DEFAULT [SMITH.LETTERS]
  <edit command line>
$ SET DEFAULT [SMITH.MEMOS] 
$ RECALL 2
$ DIRECTORY SEPT* 
 
      

This example starts with a SHOW DEFAULT and a DIRECTORY command. After not finding the file you want, enter the SET DEFAULT command to move to the LETTERS subdirectory. Next use the RECALL/ALL command to see the list of commands you have entered. Enter the RECALL 2 command to repeat the DIRECTORY command in the LETTERS subdirectory. Because you still have not found the file you want, enter the RECALL 2 command again to recall the SET DEFAULT command. (With the entry of the latest DIRECTORY command, SET DEFAULT becomes command 2 in the RECALL list.) Edit the command line so that the system sets the default to the MEMOS subdirectory. Finally, recall the DIRECTORY command to try once more to find the file.

#3

$ TYPE COMMANDS.LIS
DIRECTORY
RUN AUTHORIZE
SET PROCESS/PRIVILEGES=ALL
$ RECALL/INPUT=COMMANDS.LIS
$ RECALL/ALL
  1 SET PROCESS/PRIVILEGES=ALL
  2 RUN AUTHORIZE
  3 DIRECTORY
  4 TYPE COMMANDS.LIS
 
      

This example shows the contents of the COMMANDS.LIS file with the TYPE command, then uses the RECALL/INPUT=COMMANDS.LIS command to place the commands into the recall buffer. Issuing the RECALL/ALL command subsequently shows the numbered display of commands in the recall buffer.

#4

$ RECALL/OUTPUT=NEW_COMMANDS.LIS
$ TYPE NEW_COMMANDS.LIS
TYPE COMMANDS.LIS
DIRECTORY
RUN AUTHORIZE
SET PROCESS/PRIVILEGES=ALL
 
      

This example places the contents of the recall buffer (see the previous example) into the NEW_COMMANDS.LIS file. Note that they are not numbered and in the reverse sequence of the RECALL/ALL command output.


RENAME

Changes all or part of a file specification of an existing disk file or disk directory.

Format

RENAME input-filespec[,...] output-filespec


Parameters

input-filespec[,...]

Specifies the name of one or more files whose specifications are to be changed. The asterisk (*) and the percent sign (%) wildcard characters are allowed in the directory specification, file name, file type, or version number fields of the file specification. When wildcard characters are used, all files whose specifications satisfy the wildcard fields are renamed.

output-filespec

Provides the new file specification to be applied to the input file. The RENAME command uses the device, directory, file name, and file type of the input file as defaults for fields in the output file that are either unspecified, or are indicated by the asterisk (*) and the percent sign (%) wildcard characters. Wildcard characters in corresponding fields of the input and output file specification result in multiple rename operations. The RENAME command supplies output file version numbers in the following ways:

Description

The RENAME command changes the directory name, file name, file type, or version number of a file. The node and disk designation for the input file specification must be the same as that for the output file specification. In addition, you must have delete (D) access privileges to a file to rename the file. You cannot rename a file across a network.

Qualifiers

/BACKUP

Modifies the time value specified with the /BEFORE or the /SINCE qualifier. The /BACKUP qualifier selects files according to the dates of their most recent backups. This qualifier is incompatible with the /CREATED, /EXPIRED, and /MODIFIED qualifiers, which also allow you to select files according to time attributes. If you specify none of these four time qualifiers, the default is the /CREATED qualifier.

/BEFORE[=time]

Selects only those files dated prior to the specified time. You can specify time as absolute time, as a combination of absolute and delta times, or as one of the following keywords: BOOT, LOGIN, TODAY (default), TOMORROW, or YESTERDAY. Specify one of the following qualifiers with the /BEFORE qualifier to indicate the time attribute to be used as the basis for selection: /BACKUP, /CREATED (default), /EXPIRED, or /MODIFIED.

For complete information on specifying time values, refer to the OpenVMS User's Manual or the online help topic DCL_Tips (subtopic Date_Time).

/BY_OWNER[=uic]

Selects only those files whose owner user identification code (UIC) matches the specified owner UIC. The default UIC is that of the current process.

Specify the UIC by using standard UIC format as described in the OpenVMS Guide to System Security.

/CONFIRM

/NOCONFIRM (default)

Controls whether a request is issued before each rename operation to confirm that the operation should be performed on that file. The following responses are valid:
YES NO QUIT
TRUE FALSE Ctrl/Z
1 0 ALL
  [Return]  

You can use any combination of uppercase and lowercase letters for word responses. Word responses can be abbreviated to one or more letters (for example, T, TR, or TRU for TRUE), but these abbreviations must be unique. Affirmative answers are YES, TRUE, and 1. Negative answers include: NO, FALSE, 0, and pressing Return. Entering QUIT or pressing Ctrl/Z indicates that you want to stop processing the command at that point. When you respond by entering ALL, the command continues to process, but no further prompts are given. If you type a response other than one of those in the list, DCL issues an error message and redisplays the prompt.

/CREATED (default)

Modifies the time value specified with the /BEFORE or the /SINCE qualifier. The /CREATED qualifier selects files based on their dates of creation. This qualifier is incompatible with the /BACKUP, /EXPIRED, and /MODIFIED qualifiers, which also allow you to select files according to time attributes. If you specify none of these four time qualifiers, the default is the /CREATED qualifier.

/EXCLUDE=(filespec[,...])

Excludes the specified files from the rename operation. You can include a directory but not a device in the file specification. The asterisk (*) and the percent sign (%) wildcard characters are allowed in the file specification; however, you cannot use relative version numbers to exclude a specific version. If you specify only one file, you can omit the parentheses.

/EXPIRED

Modifies the time value specified with the /BEFORE or the /SINCE qualifier. The /EXPIRED qualifier selects files according to their expiration dates. (The expiration date is set with the SET FILE/EXPIRATION_DATE command.) This qualifier is incompatible with the /BACKUP, /CREATED, and /MODIFIED qualifiers, which also allow you to select files according to time attributes. If you specify none of these four time qualifiers, the default is the /CREATED qualifier.

/INHERIT_SECURITY

/NOINHERIT_SECURITY (default)

Controls whether the security profile (UIC, protection code, and ACL) of the renamed file is altered. If you specify /INHERIT_SECURITY, a new security profile is generated, as if a new file had been created with the new file and directory names. Refer to the OpenVMS Guide to System Security or online help (Hints topic) for a description of how a profile is assigned.

/LOG

/NOLOG (default)

Displays the file specification of each file as it is renamed.

/MODIFIED

Modifies the time value specified with the /BEFORE or the /SINCE qualifier. The /MODIFIED qualifier selects files according to the dates on which they were last modified. This qualifier is incompatible with the /BACKUP, /CREATED, and /EXPIRED qualifiers, which also allow you to select files according to time attributes. If you specify none of these four time modifiers, the default is the /CREATED qualifier.

/NEW_VERSION (default)

/NONEW_VERSION

Assigns a new version number if an output file specification is the same as that of an existing file. The /NONEW_VERSION qualifier displays an error message if an output file specification is the same as that of an existing file. The asterisk (*) and the percent sign (%) wildcard characters appearing in the version field of an input or output file overrides these qualifiers.

/SINCE[=time]

Selects only those files dated on or after the specified time. You can specify time as absolute time, as a combination of absolute and delta times, or as one of the following keywords: BOOT, LOGIN, TODAY (default), TOMORROW, or YESTERDAY. Specify one of the following qualifiers with the /SINCE qualifier to indicate the time attribute to be used as the basis for selection: /BACKUP, /CREATED (default), /EXPIRED, or /MODIFIED.

For complete information on specifying time values, refer to the OpenVMS User's Manual or the online help topic DCL_Tips (subtopic Date_Time).

/STYLE=keyword

Specifies the file name format for display purposes.

The valid keywords for this qualifier are CONDENSED and EXPANDED. Descriptions are as follows:
Keyword Explanation
CONDENSED (default) Displays the file name representation of what is generated to fit into a 255-length character string. This file name may contain a DID or FID abbreviation in the file specification.
EXPANDED Displays the file name representation of what is stored on disk. This file name does not contain any DID or FID abbreviations.

The keywords CONDENSED and EXPANDED are mutually exclusive. This qualifier specifies which file name format is displayed in the output message, along with the confirmation if requested.

File errors are displayed with the CONDENSED file specification unless the EXPANDED keyword is specified.

Refer to the OpenVMS Guide to Extended File Specifications for more information.


Examples

#1

$ RENAME  AVERAGE.OBJ  OLDAVERAGE
      

The RENAME command in this example renames the highest existing version of the file AVERAGE.OBJ to OLDAVERAGE.OBJ. If no file named OLDAVERAGE.OBJ currently exists, the new file is assigned a version number 1.

#2

$ RENAME/NONEW_VERSION  SCANLINE.OBJ;2   BACKUP.OBJ
      

The RENAME command in this example renames the file SCANLINE.OBJ;2 to BACKUP.OBJ;2. The /NONEW_VERSION qualifier ensures that, if BACKUP.OBJ;2 already exists, the RENAME command does not rename the file, but instead reports the error.

#3

$ RENAME  *.TXT;*   *.OLD;*
      

The RENAME command in this example renames all versions of all files with the file type TXT to have the file type OLD. The file names and version numbers are not changed.

#4

$ RENAME WATER.TXT [.MEMOS]
      

The RENAME command in this example changes the directory name of WATER.TXT from your default directory to the MEMOS subdirectory. (The RENAME command moves the file to another directory.)

#5

$ RENAME  [BORDERS.TESTFILES]SAVE.DAT  []TEST
      

The RENAME command in this example renames the file SAVE.DAT in the directory BORDERS.TESTFILES to TEST.DAT. The new file is moved to the current default directory.

#6

$ RENAME/LOG
$_From:      DATA.*,INFO.*
$_To:        NEW
%RENAME-I-RENAMED, _DISK0:[SYSTEM]DATA.AAA;1 renamed to _DISK0:[SYSTEM]NEW.AAA;1
%RENAME-I-RENAMED, _DISK0:[SYSTEM]DATA.BBB;1 renamed to _DISK0:[SYSTEM]NEW.BBB;1
%RENAME-I-RENAMED, _DISK0:[SYSTEM]DATA.CCC;1 renamed to _DISK0:[SYSTEM]NEW.CCC;1
%RENAME-I-RENAMED, _DISK0:[SYSTEM]INFO.001;1 renamed to _DISK0:[SYSTEM]NEW.001;1
%RENAME-I-RENAMED, _DISK0:[SYSTEM]INFO.002;1 renamed to _DISK0:[SYSTEM]NEW.002;1
%RENAME-I-RENAMED, _DISK0:[SYSTEM]INFO.003;1 renamed to _DISK0:[SYSTEM]NEW.003;1
$
 
      

In this example, three files exist with the file name of DATA, and three files have the file name of INFO. This RENAME command illustrates the asterisk (*) wildcard character in the input file names and the use of temporary default file types and version numbers on the output files. The result is the renaming of all six files as displayed by the /LOG qualifier.

#7

$ RENAME NODE1::DISK2:[SMITH]ASSEMSHT.EXE NODE1::DISK3:[JONES]ASSEMBLYSHEET.EXE
      

The RENAME command in this example renames the file ASSEMSHT.EXE in the SMITH directory on remote node NODE1 and disk DISK3 to ASSEMBLYSHEET.EXE in the JONES directory on the same remote node and disk. You can rename a file on another node and disk only if the new file resides on that same node and disk.


REPLY

Broadcasts a message to a terminal or terminals.

See the qualifier descriptions for restrictions.


Format

REPLY [message-text]


Parameter

message-text

Specifies the text of the message. The text must be 1 to 511 characters. Enclose the text in quotation marks (" ") if it contains spaces, special characters, or lowercase characters.

Description

All users with OPER (operator) privilege can use the REPLY command to communicate with system users. The REPLY command does the following:

You must always use one or more qualifiers with the REPLY command in order for it to be meaningful. If you use the REPLY command without using any qualifiers, an error message is returned. When you use the REPLY command for any purpose other than displaying messages at users' terminals, you must also use the /ENABLE=keyword qualifier. See the description of the /ENABLE qualifier to determine the appropriate keyword (or keywords) for your purpose.

Displaying Messages at Users' Terminals

To contact one or more system users, the operator enters one of the following REPLY commands:

The /ALL qualifier sends a message to all terminals that are on line and are connected to the OpenVMS system or OpenVMS Cluster. Generally, when an important message is to be broadcast, such as information about a system shutdown, you should use the /ALL qualifier.

The /TERMINAL qualifier sends a message to one or more specific terminals on the system or cluster.

The /USERNAME qualifier sends a message to terminals at which one or more system or cluster users are logged in.

Note that the /TO qualifier is not used under these three circumstances, because the operator is not replying to a specific request from either the file system or a user.

To broadcast to a terminal other than your own, you must have OPER privilege. The REPLY command is not complete until all terminals you are broadcasting to have received the message.

Responding to User Requests

When a user enters the REQUEST/REPLY command, the process associated with the requesting user's terminal is put in a wait state until the operator responds by using one of the following REPLY commands:

The /ABORT qualifier indicates that the user's request has been canceled.

The /PENDING qualifier sends a message to the user and keeps the user's process in a wait state until the request can be fulfilled or aborted.

The /TO qualifier indicates that the user's request has been fulfilled.

When a user enters the REQUEST/REPLY command, the message is displayed at the system console terminal. For example:


%OPCOM, 24-DEC-2001 09:49:24.47, request 3, from user SYSTEM
_TTB6:, This is a sample request

The user cannot enter any further commands until the operator responds using the /ABORT or the /TO qualifier, or until the user aborts the request. If the operator does not respond and the user does not abort the request, the request is repeated at 5-minute intervals on the operator's terminal until the operator replies.

The REPLY command is an essential part of the procedures that operators must use in order for users to gain access to tape and disk volumes.

Responding to File System Requests

When a multivolume tape volume reaches the end-of-tape (EOT) mark, the magnetic tape file system suspends processing and sends a message to the operator to mount the next tape. The operator responds using one of the following REPLY commands:

The /TO qualifier indicates that the file system request has been fulfilled. When the request from the magnetic tape file system specifies a volume label, the operator mounts the specified tape and enters the REPLY/TO command; however, if the file system requests a new volume, the operator can reuse a scratch volume by mounting it and by entering the REPLY/INITIALIZE_TAPE command. The operator also can mount a blank volume and then enter the REPLY/BLANK_TAPE command. In any case, the operator may add the message "label" to the REPLY command to specify the volume's label. The quotation marks (" ") are required syntax.

If the request is "REMOUNT" or "MOUNT NEW", the label is required in the message text. If the request is "MOUNT", no label is needed.

The /ABORT qualifier indicates that the file system request has been canceled.

Enabling and Disabling Operator Status on a Terminal

Any terminal connected to the operating system can be established as an operator's terminal if OPCOM is running. When an operator who is logged in to an account with OPER (operator) privilege enters the REPLY/ENABLE command at the designated terminal, that terminal can be used to respond to user requests and to monitor device status. Such a terminal retains operator status until it is specifically disabled, or until the end of the current interactive session, if it was established as a temporary operator's terminal (see the description of the /TEMPORARY qualifier).

Operator messages are printed on the system console terminal unless that terminal is explicitly disabled as an operator's terminal.

When the operator enters the REPLY/ENABLE command, OPCOM confirms that the terminal has been enabled. For example:


$ REPLY/ENABLE


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  
9996PRO_044.HTML