Previous | Contents | Index |
Displays the contents of a file or group of files on the current output device.
TYPE filespec[,...]
filespec[,...]
Specifies one or more files to be displayed. If you specify a file name and not a file type, the file type defaults to .LIS; however, you can specify a different default file type with the TYPE$DEFAULT_FILESPEC logical name. The TYPE command displays all files that satisfy the file description.The asterisk (*) and the percent sign (%) wildcard characters are allowed in place of the directory name, file name, file type, or file version number field. If you specify more than one file, separate the file specifications with commas (,) or plus signs (+). The files are displayed in the order listed.
When the TYPE command displays output, you can control the display in the following ways:
- Press Ctrl/C to stop the TYPE command for the current file that is being displayed. If you specified only one file with your TYPE command, or if the TYPE command is displaying the last file in the list, pressing Ctrl/C cancels the TYPE command. If you have specified more than one file with the TYPE command, pressing Ctrl/C causes the TYPE command to display the next file in the list.
- Press Ctrl/S to temporarily suspend the output. Press Ctrl/Q to resume the output display at the point of interruption.
- Press Ctrl/O to suppress the display but not to suspend the command processing. If you press Ctrl/O again before the TYPE command terminates, output resumes at the current point in command processing. However, if you press Ctrl/O when the TYPE command is displaying files in a list, the TYPE command suppresses typing the current file and begins typing the next file in the list. This behavior is an exception to normal Ctrl/O processing.
- Press Ctrl/Y to interrupt the command execution. You can enter the CONTINUE command after pressing Ctrl/Y to resume displaying the files where the interruption took place, provided you have not entered an intervening command that calls up a new image. If you press Ctrl/Y to stop command execution entirely, you can enter the EXIT command (or any other DCL command that activates an image) to run down the image.
In addition, the /PAGE qualifier may be used to display text one screen at a time.
The TYPE command opens the specified file with shared read (R) and write (W) access. Therefore, any file that has its attributes set to shared write is displayed, even if it is currently opened by another user.
You also can use the TYPE command to execute a command procedure on a remote node. This is useful on OpenVMS Cluster systems, for example, when you want to display the status of clusterwide services, such as queues, or when you want to display the users logged in to other nodes on the cluster. A sample command procedure follows:
$ @ SHOWUSERS.COM $ if f$mode() .eqs. "NETWORK" then define/user sys$output sys$net $ show usersThis command procedure can be used with the TYPE command to display at the user's local node the users logged on to the remote node where the command procedure resides.
Specify the command procedure as a parameter to the TYPE command as follows:
$ TYPE node_name::"TASK=command_procedure"where:
node_name Specifies the name of the remote node on which the command procedure resides. command_procedure Specifies the file name of the command procedure to be run. This form of the command finds the command procedure in the default DECnet account of the remote node.
To execute a command procedure in the SYS$LOGIN directory of a particular account, use an access control string in the command, as follows:
$ TYPE node_name"user_name password"::"TASK=command_procedure"where:
user_name Specifies the user name of the account on the remote node. password Specifies the password of the account on the remote node.
/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, see the OpenVMS User's Manual or the online help topic Date.
/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 HP OpenVMS Guide to System Security.
/CONFIRM
/NOCONFIRM (default)
Controls whether a request is issued before each typing 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.
/CONTINUOUS/INTERVAL=n
Upon reaching the end of a file, TYPE waits a specified number of seconds (the default is 30) then displays any records which have been added to the file and returns to the wait state. TYPE continues until either Ctrl/C or Ctrl/Y is entered by the user./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./EXACT
Use with the /PAGE=SAVE and /SEARCH qualifiers to specify a search string that must match the search string exactly and must be enclosed with quotation marks (" ").If you specify the /EXACT qualifier without the /SEARCH qualifier, exact search mode is enabled when you set the search string with the Find (E1) key.
/EXCLUDE=(filespec[,...])
Excludes the specified files from the type 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.) The /EXPIRED 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./HEADER
/NOHEADER
Specifies whether a header line is placed at the top of each file that is displayed with the TYPE /PAGE=SAVE command./HIGHLIGHT[=keyword]
Use with the /PAGE=SAVE and /SEARCH qualifiers to specify the type of highlighting you want when a search string is found. When a string is found, the entire line is highlighted. You can use the following keywords: BOLD, BLINK, REVERSE, and UNDERLINE. BOLD is the default highlighting./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./OUTPUT[=filespec]
/NOOUTPUT
Controls where the output of the command is sent. If you specify the /OUTPUT=filespec qualifier, the output is sent to the specified file, rather than to the current output device, SYS$OUTPUT. If you do not enter the qualifier, or if you enter the /OUTPUT qualifier without a file specification, the output is sent to SYS$OUTPUT.If you enter the /OUTPUT qualifier with a partial file specification (for example, /OUTPUT=[VAKHRAMEEV]), TYPE is the default file name and .LIS the default file type. The file specification cannot include the asterisk (*) and the percent sign (%) wildcard characters.
If you enter the /NOOUTPUT qualifier, output is suppressed.
The /OUTPUT qualifier is incompatible with the /PAGE qualifier.
/PAGE[=keyword]
/NOPAGE (default)
Controls the display of information on the screen.You can use the following keywords with the /PAGE qualifier:
CLEAR_SCREEN Clears the screen before each page is displayed. SCROLL Displays information one line at a time. SAVE[= n] Enables screen navigation of information, where n is the number of pages to store. The /PAGE=SAVE qualifier allows you to navigate through screens of information. The /PAGE=SAVE qualifier stores up to 5 screens of up to 255 columns of information. When you use the /PAGE=SAVE qualifier, you can use the following keys to navigate through the information:
Key Sequence Description Up arrow key, Ctrl/B Scroll up one line. Down arrow key Scroll down one line. Left arrow key Scroll left one column. Right arrow key Scroll right one column. Find (E1) Specify a string to find when the information is displayed. Insert Here (E2) Scroll right one half screen. Remove (E3) Scroll left one half screen. Select (E4) Toggle 80/132 column mode. Prev Screen (E5) Get the previous page of information. Next Screen (E6), Return, Enter, Space Get the next page of information. F10, Ctrl/Z Exit. (Some utilities define these differently.) Help (F15) Display utility help text. Do (F16) Toggle the display to oldest/newest page. Ctrl/W Refresh the display. N Display the next file (when more than one file is specified with the TYPE command) Q Quit displaying output from the TYPE command. The /PAGE qualifier is not compatible with the /OUTPUT qualifier.
/SEARCH="string"
Use with the /PAGE=SAVE qualifier to specify a string that you want to find in the information being displayed. Quotation marks are required for the /SEARCH qualifier, if you include spaces in the text string.You can also dynamically change the search string by pressing the Find key (E1) while the information is being displayed. Quotation marks are not required for a dynamic search.
/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, JOB_LOGIN, 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, see the OpenVMS User's Manual or the online help topic Date.
/STYLE=keyword
Specifies the file name format for display purposes while typing files.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.
See the OpenVMS User's Manual for more information.
/SYMLINK=keyword
The valid keywords for this qualifier are [NO]WILDCARD and [NO]ELLIPSIS. Descriptions are as follows:
Keyword Explanation WILDCARD Indicates that symlinks are enabled during wildcard searches. NOWILDCARD Indicates that symlinks are disabled during directory wildcard searches. ELLIPSIS Equivalent to WILDCARD (included for command symmetry). NOELLIPSIS Indicates that symlinks are matched for all wildcard fields except for ellipsis. If the file named in the TYPE command is a symlink, the command operates on the symlink target.
/TAIL[=n]
Displays the last several lines of a log file. The value, n, defaults to p-2 where p is the current terminal page length. You can use TYPE/TAIL only if all of the following criteria are true:
- File organization is sequential.
- The longest record is less than 512 bytes.
- The record format is either VAR, VFC, STM, STRCM or STMLF (for more information, see the description of FAB$B_RFM in the OpenVMS Record Management Services Reference Manual).
- The file being typed is on a device that supports random access. The TYPE/TAIL command does not work on magnetic tape drives.
Even with this criteria, some file conditions cannot be anticipated and may not allow display of the last several lines of a log file, resulting in the following error message:
%TYPE-W-READERR, error reading DEVICE:[DIRECTORY]FILE.EXT;1 -SYSTEM-E-UNSUPPORTED, unsupported operation or function/WRAP
/NOWRAP (default)
Use with the /PAGE=SAVE qualifier to limit the number of columns to the width of the screen and to wrap lines that extend beyond the width of the screen to the next line.The /NOWRAP qualifier extends lines beyond the width of the screen and can be seen when you use the scrolling (left and right) features provided by the /PAGE=SAVE qualifier.
#1 |
---|
$ TYPE COMMON.DAT |
In this example, the TYPE command requests that the file COMMON.DAT be displayed at the terminal.
#2 |
---|
$ TYPE *.DAT This is the first line in the file AA.DAT. . . . [Ctrl/O] This is the first line in the file BB.DAT. . . . [Ctrl/Y] Interrupt $ STOP |
In this example, the TYPE command contains an asterisk (*) wildcard character in place of the file name. All files with file types of .DAT are scheduled for display. When Ctrl/O is pressed, output of the current file stops and the TYPE command begins displaying the next file. The Ctrl/Y function interrupts the command; the STOP command terminates the TYPE command.
#3 |
---|
$ TYPE LETTER*.MEM December 14, 2002 . . . [Ctrl/Y] Interrupt $ SHOW TIME 14-DEC-2002 15:48:07 $ CONTINUE Sincerely yours, . . . |
In this example, the TYPE command displays all files whose names begin with the word LETTER and have the file type .MEM. While the files are being displayed, the user presses Ctrl/Y to interrupt the TYPE operation and to display the time. After entering the SHOW TIME command, the user enters the CONTINUE command to resume the TYPE operation.
#4 |
---|
$ TYPE/OUTPUT=SAVETEXT.TXT *.TXT |
In this example, the TYPE command writes all TXT files in your default directory to a file called SAVETEXT.TXT (also in your default directory).
#5 |
---|
$ TYPE MEXICO::NOTICE.TEXT/OUTPUT=TEMP.TEXT |
In this example, the TYPE command requests that the file NOTICE.TEXT at remote node MEXICO be written to the output file TEMP.TEXT on the local node, rather than to SYS$OUTPUT.
#6 |
---|
$ TYPE SECSYS"FILES OFFICEFIL"::"TASK=SHOWUSERS" VAX/VMS Interactive Users 14-DEC-2002 17:20:13.30 Total number of interactive users = 5 Username Process Name PID Terminal MIRANDA Sec1 00536278 TXA1: JESSICA Sec2 00892674 VTA2: EMILY Sec3 00847326 TXA3: ANDREW Sec4 02643859 RTA1: BRIAN System Mangr 00007362 VTA1: |
In this example, the TYPE command executes the command procedure SHOWUSERS.COM found in the SYS$LOGIN directory of user FILES on remote node SECSSYS. The output of the TYPE command then is displayed at the local node.
The UNLOCK command is obsolete. Use the SET FILE/UNLOCK command.
Previous | Next | Contents | Index |