Displays the contents of a file or group of files on the current output device. Format TYPE filespec[,...]
1 – Parameter
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.
2 – Qualifiers
2.1 /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.
2.2 /BEFORE
/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.
2.3 /BY_OWNER
/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 VSI OpenVMS Guide to System Security.
2.4 /CONFIRM
/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.
2.5 /CONTINUOUS
/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.
2.6 /CREATED
/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.
2.7 /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.
2.8 /EXCLUDE
/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.
2.9 /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.
2.10 /HEADER
/HEADER /NOHEADER Specifies whether a header line is placed at the top of each file that is displayed with the TYPE /PAGE=SAVE command.
2.11 /HIGHLIGHT
/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.
2.12 /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.
2.13 /OUTPUT
/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.
2.14 /PAGE
/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), Get the next page of information. Return, Enter, Space 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.
2.15 /SEARCH
/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.
2.16 /SINCE
/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.
2.17 /STYLE
/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 Displays the file name representation of what is (default) 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.
2.18 /SYMLINK
/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.
2.19 /TAIL
/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: o File organization is sequential. o The longest record is less than 512 bytes. o 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). o 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
2.20 /WRAP
/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.
3 – Examples
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.