%ì VAX-11 Librarian V03-00 ¯A½L‹‘:D½L‹´Äµ MDELETEz DIRECTORY;ºFSPEC]ÄPURGEn(RUNOFFìTYPE­à?6MÖE‹($ IF P1 .NES. "" THEN GOTO DO_SUBROUTINE$ PAGE5$ WRITE SYS$OUTPUT "KMSCAI -- No subroutine specified$ WAIT 00:00:03$ EXIT$Do_Subroutine:$ GOTO 'P1' !$ EXIT$!$Menu:$ PAGE$ TYPE SYS$INPUT. #4 8 #3  The VAX/VMS DELETE Command  8 #4  The VAX/VMS DELETE Command  . #3  Type ^Y to Exit at any timeYou may choose:: Intro - Indroduction to the DELETE Command) Qualifiers - DELETE qualifiers" Final - Final exam& Exit - Exit this menu$ EXIT$Select: $ Test:=="F"$ Result:=="OK" $ ZTmp=P2 $ ZTMP1=P3+$ IF ZTmp .EQS. "E" THEN Result:=="DONE" $ IF ZTmp .EQS. "E" THEN EXIT0$ IF ZTmp .EQS. "I" THEN GOTO Do_Introduction.$ IF ZTmp .EQS. "Q" THEN GOTO Do_Qualifiers+$ IF Ztmp .EQS. "F" THEN GOTO Final_Exam$ Result:=="BAD"$ EXIT$!______________$ EXIT $Final_Exam:$ PAGE$ TYPE SYS$INPUT The Final Exam;Now lets see if you remember how to use the DELETE command.!Will the following delete command$!______________ $ Nmax==6 $ Test=="T"$ Question==""6$ Question_1=="Delete files modified after 1-Jan-1983".$ Example_1=="DEL /SINCE=1-JAN-1982 FOO.TXT;*"$ Answer_1=="N"B$ Reason_1=="To DELETE modified files must also include /MODIFIED"4$ Question_2=="DELETE all text files on a directory"$ Example_2= ="DEL *.TXT"$ Answer_2=="N"<$ Reason_2=="An explicit version number is always required."=$ Question_3=="DELETE all Fortran source files created today".$ Example_3=="DEL/CREATED/SINCE=TODAY *.FOR;*"$ Answer_3=="Y"/$ Reason_3=="TODAY is also a valid date string".$ Question_4=="Prompt for each file to delete""$ Example_4=="DEL/CONFIRM *.txt;*"$ Answer_4=="Y"B$ Reason_4=="VMS will prompt to confirm the deletion of each file"&$ Question_5=="Recover a deleted file""$ Example_5=="DEL/RECOVER *.TXT;*"$ Answer_5=="N"9$ Reason_5=="Once a file is deleted is is gone for good."0$ Question_6=="Delete a file across the network".$ Example_6=="DEL FUSION::[7,250]VECTOR.TXT;*"$ Answer_6=="N"V$ Reason_6=="To delete files on a remote node requires an account and password string"$ EXIT$Do_Introduction: $ Test=="F"$ Page$ Type SYS$INPUT* Introduction to the VMS DELete CommandH The VMS DELete command is used to delete files from your directory.OThe command may be abb reviated as "DEL". The command has the following syntax.< $ DEL/qualif1..../qualifN filspec1,filespec2.....,filespecNIwhere the file specifiers can include wild cards (*) for directory, name,Otype, or extension. The qualifiers are used for producing selective directory Jformatting, or extended informational display. One or more qualifiers mayKbe present but none are required. The DELete command will produce an errorEmessage if you do not explicitly state the version number of the fil eEto be deleted. This is done as a safety precaution. You either MUSTDspecify a specific version number or a wild card (*) version number.E The first file specification must contain an explicit or defaultLdirectory specification plus a file name, a file type, and a version number.ISubsequent file specifications must contain at least a version number. AKsemicolon followed by no file version number, a version number of 0, or oneJor more blanks, results in the deletion of the latest  version of the file.-$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUTK The DELete command assumes certain defaults if partial file specifiers are present.9 - If no device is present, it defaults to your current  system device.= - If no directory is specified, it defaults to your current directory.= - If multiple file specifiers are present, files specifiers: after the first default to the file name and file type! of the first file s pecified.-$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUT? Now let us observe the effects of certain DELETE commands.'$ ON CONTROL_Y THEN GOTO Reset_Terminal7$ WRITE SYS$OUTPUT "" ! Scroll bet lines 11-24$ Return="Command_15$ Text="The DELETE command requires a file specifier"$ Command="DEL"$ GOTO Do_Command $Command_1:$ Command="DEL DELXXXXX1.TXT;10$ Text="You are warned if the file is not found"$ Return="Command_2"$ GOTO Do_Command $Command_2:%$ TYPE/OUTPUT=DELXXXXX1.TXT SYS$INPUT THIS IS A DUMMY FILE TO DELETE$ Command="DEL DELXXXXX1.TXT"E$ Text="To DELete a file, you must supply an explicit version number"$ Return="Command_3"$ GOTO Do_Command $Command_3:!$ Command="DELETE DELXXXXX1.TXT;*P$ Text="If the file exists, and version number is supplied, the file is deleted"$ Return="Command_4"$ GOTO Do_Command $Command_4:%$ TYPE/OUTPUT=DELXXXXX1.TXT SYS$INPUT THIS IS A DUMMY FILE TO DELETE$ COPY DELXXXXX1.TXT *%$ Command="DELETE DELXXXXX1.TXT;1,;2"A$ Text="The second file uses the name and type of the first file"$ Return="Command_5"$ GOTO Do_Command $Command_5:%$ TYPE/OUTPUT=DELXXXXX1.TXT SYS$INPUT THIS IS A DUMMY FILE TO DELETE$ COPY DELXXXXX1.TXT */$ Command="DEL DELXXXXX1.TXT;1 DELXXXXX1.TXT;2"@$ Text="Multiple files must be seperated with commas or + signs"$ Return="Command_6"$ GOTO Do_Command $Command_6:$ DELETE DELXXXXX*.TXT;*6$ WRITE SYS$OUTPUT "" ! reset scrolling region$ PAGE$ TYPE SYS$INPUTC Remember, once a file is deleted it is GONE FOR GOOD. For generalIuse, the PURGE command can be used to delete old versions of files alwaysHkeeping the most recent files. Be very careful when using wild cards as9part of file. It is very easy to wipe out all your work. $ Test="F"9$ INQUIRE/NOPUN TMP "''EraseL23'Press RETURN when ready"$ EXIT$Do_Qualifiers: $ Test=="F"$ PAGE$ TYPE SYS$INPUTE You may request that files be  interactively deleted by using the /CONFIRMIqualifier. When the /CONFIRM qualifier is included, prior to deleting a Mfile you are requested to confirm thay you wish the file deleted by answeringKa "Y" to the confirmation request. Unless you respond the the request withGa "Y" followed by a RETURN the file will not be deleted. /NOCONFIRM is>also a valid qualifier. The default for DELete is /NOCONFIRM.G The /LOG qualifier displays the file specifier for each file afterHit is deleted. /NOLOG is also a valid qualifier. /NOLOG is the default for DELete.-$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUTI A number of qualifiers may be used to control the deletion of files.GIn addition to selecting files for deletion based on file name, type orHversion, files may be selected for deletion based on the dates when they(were created or modified. The qualifiers7 /CREATED and /MODIFIEDJselect whether  or not file deletion based on creation date or modificationHdate is to be used. If either /CREATED or /MODIFIED is used, it is alsoFnecessary to specify the range of dates to delete using either or bothof /BEFORE or /SINCE.H Both /BEFORE and /SINCE require a valid date string. The syntax is /BEFORE=date_string /SINCE=date_stringHwhere date_string is goverened by the rules for forming a VMS time/date Fstring. You can specify an absolute or delta time or a combination ofthe two.-$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUT@ Detailed information on forming valid date_strings can be foundAin the VMS Command Language user's in section 5.8.1 or by typing FHELP SPECIFY DATE_TIME from DCL. In its simplist format a date stringis  DD-MMM-YYYYwhere DD - Day of Month+ MMM - Month of year (Jan, Feb,....Dec)! YYYY - Year (1982, 1983, etc)ESo to delete all files created prior to August 12, 1976 one would usea command of the form* $ DELETE /CREATED/SINCE=12-AUG-1976 *.*;*-$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUTA Now let us observe the effects of certain DELETE qualifiers.)$ ON CONTROL_Y THEN GOTO Reset_Terminal !7$ WRITE SYS$OUTPUT "" ! Scroll bet lines 11-24%$ TYPE/OUTPUT=DELXXXXX1.TXT SYS$INPUT THIS IS A DUMMY FILE TO DELETE%$ TYPE/OUTPUT=DELXXXXX1.TXT SYS$INPUT THIS IS A DUMMY FILE TO DELETE&$ Command="DELETE/LOG DELXXXXX1.TXT;*"0$ Text="Display all files deleted to SYS$OUTPUT"$ Return="QUAL_1"$ GOTO Do_Command$Qual_1:%$ TYPE/OUTPUT=DELXXXXX1.TXT SYS$INPUT THIS IS A DUMMY FILE TO DELETE%$ TYPE/OUTPUT=DELXXXXX2.TXT SYS$INPUT THIS IS A DUMMY FILE TO DELETE*$ Command="DELETE/CONFIRM DELXXXXX*.TXT;*")$ Text="Specify Y/N for each file please"$ Return="QUAL_2"$ GOTO Do_Command$Qual_2:%$ TYPE/OUTPUT=DELXXXXX1.TXT SYS$INPUT THIS IS A DUMMY FILE TO DELETE%$ TYPE/OUTPUT=DELXXXXX2.TXT SYS$INPUT THIS IS A DUMMY FILE TO DELETE<$ Command="DELETE/CREATED/SINCE=01-JAN-1983 DELXXXXX*.TXT;*"9$ Text="Delete the named files created since 01-Jan-1983"$ Return="QUAL_3"$ GOTO Do_Command$Qual_3:6$ WRITE SYS$OUTPUT "" ! reset scrolling region $ EXIT !$!$Reset_Terminal:5$ WRITE SYS$OUTPUT "" ! reset scrolling region0$ WRITE SYS$OUTPUT "[?4l" ! Back to jump scroll$ EXIT $Do_command:'$ WRITE SYS$OUTPUT "''EraseL05'''Text'"$ WRITE SYS$OUTPUT ->"''Erasel07'Execute the command: ''Bold'''Command'''No_Bold'"$ WRITE SYS$OUTPUT -$"''EraseL11' ===================="($ WRITE SYS$OUTPUT "''EraseL12'[?4h",$ WRITE SYS$OUTPUT "''EraseL12'$ ''Command'"$ ON ERROR THEN CONTINUE $ 'Command'9$ INQUIRE/NOPUN TMP "''EraseL23'Press RETURN when ready"%$ WRITE SYS$OUTPUT "''EraseL23'[?4l"$ GOTO 'Return'ww­@˜ÊE‹($ IF P1 .NES. "" THEN GOTO DO_SUBROUTINE$ PAGE5$ WRITE SYS$OUTPUT "KMSCAI -- No subroutine specified$ WAIT 00:00:03$ EXIT$Do_Subroutine:$ GOTO 'P1' !$ EXIT$!$Menu:$ PAGE$ TYPE SYS$INPUT.#4 8#3  The VAX/VMS Directory Command  8#4  The VAX/VMS Directory Command  .#3  Type ^Y to Exit at any timeYou may choose:= Intro - Indroduction to the Directory Command3 Output - Directory output qualifiers1 Qualifiers - File attribute qualifiers1 Selection - File selection qualifiers" Final - Final exam& Exit - Exit this menu$ EXIT$Select: $ Test:=="F"$ Result:=="OK" $ ZTmp=P2 $ ZTMP1=P3+$ IF ZTmp .EQS. "E" THEN Result:=="DONE" $ IF ZTmp .EQS. "E" THEN EXIT0$ IF ZTmp .EQS. "I" THEN GOTO Do_Introduction.$ IF ZTmp .EQS. "Q" THEN GOTO Do_Qualifiers*$ IF Ztmp .EQS. "S" THEN GOTO Do_Select*$ IF ZTmp .EQS. "O" THEN GOTO Do_Output+$ IF Ztmp .EQS. "F" THEN GOTO Final_Exam$ Result:=="BAD"$ EXIT$!______________$ EXIT $Final_Exam:$ PAGE$ TYPE SYS$INPUT The Final Exam4Now lets see if you remember what the qualifiers do.$Will the following directory command$!______________ $ Nmax==8 $ Test=="T"$ Question==""7$ Question_1=="Display files modified after 1-Jan-1982"$$ Example_1=="DIR /SINCE=1-JAN-1982"$ Answer_1=="N"@$ Reason_1=="To list modified files must also include /MODIFIED"0$ Question _2=="Display all files on a directory""$ Example_2=="DIR/VERSION=1 *.*;*"$ Answer_2=="N"C$ Reason_2=="Only the highest version of each file will be listed."C$ Question_3=="Display the work done today on fortran source files"$ Example_3=="DIR/SINCE *.FOR"$ Answer_3=="Y"D$ Reason_3=="/SINCE defaults to files created today since midnight."@$ Question_4=="Display the total block usage on the system disk"0$ Example_4=="DIR SYS$SYSDEVICE:[000000...]/TOT"$ Answer_4=="Y"I$ Reason_4=="The c ommand starts with the index directory and works down."B$ Question_5=="Display the file owner and the date of last backup"3$ Example_5=="DIR/FULL/EXCLUDE=(*.LIS,*.MAR) FOO.*"$ Answer_5=="Y"<$ Reason_5=="The /FULL qualifier lists all file attributes."<$ Question_6=="Display a single column listing of all files",$ Example_6=="DIR/COLUMN=2/OWNER/DATE *.*;*"$ Answer_6=="Y"C$ Reason_6=="The /COL switch only works for simple, /BRIEF format."<$ Question_7=="Send a directory to the printer for listing."0$ Example_7=="DIR/OUTPUT=PRINTER.LIS/OWNER/DATE"$ Answer_7=="N"M$ Reason_7=="Printer.LIS will not get automatically get sent to the printer."A$ Question_8=="Display the number of blocks allocated to a file."$ Example_8=="DIR/SIZE"$ Answer_8=="N"C$ Reason_8=="The /SIZE displays blocks used, not blocks allocated."$ EXIT$Do_Introduction: $ Test=="F"$ Page$ Type SYS$INPUT- Introduction to the VMS DIRectory CommandM The VMS DIRectory command is used to show  which files are in a directoryFand display certain characteristics about them. The command (normally,abreviated as DIR) has the following syntax.< $ DIR/qualif1..../qualifN filspec1,filespec2.....,filespecNIwhere the file specifiers can include wild cards (*) for directory, name,Otype, or extension. The qualifiers are used for producing selective directory Iformatting, or extended informational display. One or more qualifiers or6file specifiers may be present but neither is required-$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUTN The DIRectory command assumes certain defaults if partial file specifiers!or no filespecifiers are present.8 - If no file specification is present, all versions of8 all files in your current directory are displayed. 9 - If you specify only a device name as part of the file9 specifier, DIR uses your current default directory. @ - Whenever the file specification omits a file name and type, =  all versions of all files in the directory are displayed.< - If a file specification contains a file name and/or file8 type and no version number, all versions are listed.: - If a file specification contains only a file name, all& file type and versions are listed.-$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUTB Now let us observe the effects of certain DIRectory commands.'$ ON CONTROL_Y THEN GOTO Reset_Terminal7$ WRITE SYS$OUTPUT "" ! S!croll bet lines 11-24$ Return="Command_1K$ Text="The current directory is displayed if there are no file specifiers"$ Command="DIR"$ GOTO Do_Command $Command_1:$$ Command="DIR SYS$SYSROOT:[SYSUPD]"C$ Text="Only specify a directory and all files on it are displayed"$ Return="Command_2"$ GOTO Do_Command $Command_2:'$ Command="DIR SYS$SYSROOT:[SYSEXE]SYS">$ Text="All file types are displayed if file type is omitted."$ Return="Command_3"$ GOTO Do_Command $Command_3:+$ Co"mmand="DIR SYS$SYSROOT:[SYSEXE]SYS.EXE"A$ Text="Use a complete file specifier to select a specific file."$ Return="Command_4"$ GOTO Do_Command $Command_4:)$ Command="DIR SYS$SYSROOT:[SYSEXE]*.COM"=$ Text="Use wild cards to display all files of a given type."$ Return="Command_5"$ GOTO Do_Command $Command_5:)$ Command="DIR SYS$SYSROOT:[SYSEXE]SYS.*"D$ Text="Use wild cards to display all file types with a given name."$ Return="Command_6"$ GOTO Do_Command $Command_6:6$ WRIT#E SYS$OUTPUT "" ! reset scrolling region$ PAGE$ TYPE SYS$INPUT? Remember the DIRectory command is simple to use. Whenever youFwant to see what files are present on your current directory just type $ DIRBto the DCL prompt ($). Often you will see that unneeded files areGaccumulating (old versions). Use the PURge or DELete command to remove:these files so you do not run out of allocated disk space. $ Test="F"9$ INQUIRE/NOPUN TMP "''EraseL23'Press RETURN when ready"$ $EXIT$!______________$ EXIT$Do_Qualifiers: $ Test=="F"$ PAGE$Do_Qualifiers_1:$ Qualif_Return="Do_Qualifiers"$ TYPE SYS$INPUT Directory QualifiersYou may choose:= Intro - Indroduction to DIRectory qualifiers+ /DATE - Date display 2 /FULL - Complete file information/ /OWNER - File owner information4 /PROTECTION - File protection information. /Size - File size information/ [%1m/Total - Print file size totals' Exit - Exit this menu$Qualif_Select:$ INQUIRE Z "''Erasel15'Choice"$ Z1[0,1]:='Z'$ Z2[0,2]:='Z' $ IF Z1 .EQS. "E" THEN EXIT,$ IF Z2 .EQS. "/D" THEN GOTO Qualif_Date,$ IF Z2 .EQS. "/F" THEN GOTO Qualif_Full-$ IF Z2 .EQS. "/O" THEN GOTO Qualif_Owner/$ IF Z2 .EQS. "/P" THEN GOTO Qualif_Protect,$ IF Z2 .EQS. "/S" THEN GOTO Qualif_Size-$ IF Z2 .EQS. "/T" THEN GOTO Qualif_Total-$ IF Z1 .E &QS. "I" THEN GOTO Qualif_IntroO$ WRITE SYS$OUTPUT "''EraseL22'KMSCAI -- ''Choice' is not an allowed qualifier"$ GOTO QUALIF_SELECT$Qualif_Intro:$ PAGE$ TYPE SYS$INPUTC The DIRectory command has a wealth of qualifiers which can be usedIfor extracting specific information about the files on a given directory.GBy default, the DIRectory command produces a display with the followingqualifiers active.8 /BRIEF Only file name, type and version listed6 /COLUMNS=4 Display d 'irectory in 4 column format.1 /NODATE Do not display date information.? /HEADING Display Directory header before listing files.- /NOOWNER No display of file ownership. /NOPROTECTION No display of file protection) /NOSIZE No display of file sizesA /TRAILING Display disk space allocation and # files at endCAll the information that one can obtain about a file may be seen byusing the /FULL qualifier.-$ INQUIRE/NOPUN TMP "Press RETURN when ready"($ GOTO Do_Qualifiers $Qualif_Full:$ PAGE$ TYPE SYS$INPUT The /FULL QualifierE All the information available about a file can be obtained using9the /FULL qualifier. The information available includes;B File Name Date of creation Date of last back-up@ File Type Date of last modification Date of expiration= Version # File Owner's UIC File Protection? # Blocks Used File Id # (FID) File Organization; # Blocks Alloc.) Record Attributes Record formatEObserve the difference in display as we issue both a DIR/BRIEF and a "DIR/FULL command on the same file.-$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE)$ ON CONTROL_Y THEN GOTO Reset_Terminal !7$ WRITE SYS$OUTPUT "" ! Scroll bet lines 11-241$ Command="DIR/BRIEF SYS$SYSROOT:[SYSEXE]SYS.EXE"6$ Text="Use the /BRIEF qualifier for a brief display."$ Return="QUAL_1"$ GOTO Do_Command$Qual_1:0$ Command="DIR/FULL SYS$SYSROOT:*[SYSEXE]SYS.EXE"4$ Text="Use the /FULL qualifier for a Full display."$ Return="QUAL_2"$ GOTO Do_Command$Qual_2:6$ WRITE SYS$OUTPUT "" ! reset scrolling region$ GOTO Do_Qualifiers$Qualif_Size: $ PAGE$ TYPE SYS$INPUTD Various file attributes displayed by the /FULL qualifier can beCindividually displayed. For example the /SIZE qualifier is used toDdisplay the amount of disk space files are using. The format of the/SIZE qualifier is /SIZE[=option]Fwhere the '=+option' is optional, and can be any of ALL, ALLOCATION, orCUSED. When a file is created so many disk blocks are allocated forEits use. It may or may not use all of these disk blocks. Disk spaceAis allocated in clusters of 'n' blocks, where 'n' is set when theFdisk is initialized. The value of 'n' is called the Cluster Factor ofCthe disk. If the space a file is Using differs from its allocationEby more than its cluster factor, you may be waisting space and should:consider truncating th,e file (SET FILE/TRUNCATE filespec).-$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUTB Now let us observe the DIR/SIZE display with various options.'$ ON CONTROL_Y THEN GOTO Reset_Terminal7$ WRITE SYS$OUTPUT "" ! Scroll bet lines 11-240$ Command="DIR/SIZE SYS$SYSROOT:[SYSEXE]SYS.EXE"1$ Text="Use the /SIZE qualifier with no options."$ Return="QUAL_3"$ GOTO Do_Command$Qual_3:4$ Command="DIR/SIZE=ALL SYS$SYSROOT:[SYSEXE]SYS.EXE"G$ Text="Display Us-ed and Allocated space with the /SIZE=ALL qualifier."$ Return="QUAL_4"$ GOTO Do_Command$Qual_4:5$ Command="DIR/SIZE=USED SYS$SYSROOT:[SYSEXE]SYS.EXE"9$ Text="Display Used space with the /SIZE=USED qualifier.$ Return="QUAL_5"$ GOTO Do_Command$Qual_5:;$ Command="DIR/SIZE=ALLOCATION SYS$SYSROOT:[SYSEXE]SYS.EXE"C$ Text="Display Allocated space with the /SIZE=ALLOCATED qualifier.$ Return="QUAL_6"$ GOTO Do_Command$QUAL_6:6$ WRITE SYS$OUTPUT "" ! reset scrolling regi.on$ GOTO Do_qualifiers$Qualif_Owner:$ PAGE$ TYPE SYS$INPUTG The file's owner (UIC) can easily be displayed by using the /OWNERqualifier. For example;1$ Command="DIR/OWNER SYS$SYSROOT:[SYSEXE]SYS.EXE"'$ Text="Display the file and its owner"$ Return="QUAL_7"$ GOTO Do_Command$QUAL_7:6$ WRITE SYS$OUTPUT "" ! reset scrolling region$ GOTO DO_QUALIFIERS$Qualif_Total:$ PAGEF The /TOTAL qualifier inhibits the listing of all individual file information and pr/ints only; # of files listed% Total # of blocks used per directory Total # of blocks allocated2 Total number of directories and total blocks used) and/or allocated in all directories * (if multiple directories are listed).&By default the output format is /BRIEF9$ INQUIRE/NOPUN Tmp "''EraseL15'Press RETURN to continue"$ GOTO Do_Qualifiers$Qualif_Protect:$ PAGE6$ WRITE SYS$OUTPUT "" ! reset scrolling region$ TYPE SYS$INPUTF File protection is broken down in0to four protection levels based Ion the user's UIC. The levels are SYSTEM, OWNER, GROUP, and WORLD. The Kfile's OWNER is the person who's UIC matches the UIC of the file. A SYSTEMIUIC is any UIC with a group number of 10 or less. A user's GROUP are allOusers sharing the same group code in the UIC. The WORLD represents all others.IEach level can individually be granted READ(R), WRITE(W), EXECUTE(E), andIDELETE(D) privileges for a file. The protection mask for the file can be Cdisplaye 1d with the /PROTECTION qualifier. File protection is codedHfor display as [S:RWED,O:RWED,G:RWED,W:RWED] where the letters followingIthe S:, O:, G: and W: signify the access level to the file. If the levelNis RWED, all forms of access is permitted and the file is totally unprotected.-$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE'$ ON CONTROL_Y THEN GOTO Reset_Terminal7$ WRITE SYS$OUTPUT "" ! Scroll bet lines 11-24$ TYPE SYS$INPUT) For an example of the /PROT qualifi2er:6$ Command="DIR/OWNER/PROT SYS$SYSROOT:[SYSEXE]SYS.EXE"@$ Text="Display the file and its owner and its protection level"$ Return="QUAL_8"$ GOTO Do_Command$QUAL_8:6$ WRITE SYS$OUTPUT "" ! reset scrolling region$ GOTO DO_Qualifiers $Qualif_date:$ PAGE6$ WRITE SYS$OUTPUT "" ! reset scrolling region$ TYPE SYS$INPUTE The /DATE qualifier displays the four dates associated with each"file. The form of this option is  /DATE[=option]/where '=option' is opt3ional and can take values% /DATE=ALL Displays all four dates. =BACKUP Displays date of last backup( =CREATED Displays creation date. =EXPIRED Displays the expiration date1 =MODIFIED Displays the date last modified5If no option is specified /DATE=CREATED is defaulted.-$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE'$ ON CONTROL_Y THEN GOTO Reset_Terminal7$ WRITE SYS$OUTPUT "" ! Scroll bet lines 11-24$ TYPE SYS$INPUT* For an ex4amples of the /DATE qualifier:0$ Command="DIR/DATE SYS$SYSROOT:[SYSEXE]SYS.EXE"4$ Text="Display the file creation date (by default)"$ Return="QUAL_9"$ GOTO Do_Command$QUAL_9:4$ Command="DIR/DATE=ALL SYS$SYSROOT:[SYSEXE]SYS.EXE".$ Text="Display all dates related to the file"$ Return="QUAL_10"$ GOTO Do_Command $QUAL_10:6$ WRITE SYS$OUTPUT "" ! reset scrolling region$ GOTO Do_Qualifiers$! $Do_Output: $ Test=="F"6$ WRITE SYS$OUTPUT "" ! reset scrolling region5$ PAGE1$ WRITE SYS$OUTPUT "[?4h" ! Force smooth scroll$ TYPE SYS$INPUTK A number of qualifiers are used to control the format of the directory0display and to direct the output of the display.0 /BRIEF Only display the file names. Uses a ( multi-column output format display.4 /COLUMNS=n Lists files using the specified number' of columns. Only valid for /BRIEF format.9 /OUTPUT[=filespec] Directs output to the specified file' rather than the current S6YS$OUTPUT3 /PRINTER The output is directed to DIRECTORY.LIS( which is spooled to the printer and then deleted./ /NOHEADING By default a directory heading is& displayed prior to file listings.' /NOHEADING suppresses this output.1 /NOTRAILING Supresses display of the number of' files listed, the number of blocks) used, and the totals for directories' and blocks if multiple directories specified.'$ ON CONTROL_Y THEN GOTO Reset_Terminal74$ WRITE SYS$OUTPUT "" ! set scrolling region8$ INQUIRE/NOPUN TMP "''EraseL23'Press RETURN when ready"$ page$ TYPE SYS$INPUT Now for some examples;1$ Command="DIR/NOHEADING/NOTRAILING SYS$ERRORLOG"?$ Text="Display files without heading and trailing information"$ Return="Out_1"$ GOTO Do_Command$Out_1:%$ Command="DIR/COLUMN=2 SYS$ERRORLOG"D$ Text="Display using two columns instead of the standard 4 columns"$ Return="Out_2"$ GOTO Do_Command$Out_2:6$ WRITE SYS$OU8TPUT "" ! reset scrolling region$ EXIT $Do_Select: $ Test=="F"6$ WRITE SYS$OUTPUT "" ! reset scrolling region$ PAGE$ TYPE SYS$INPUTG Certain qualifiers are used to select certain classes of files forJdisplay based on dates or versions of files, or based on excluding certainfiles.A /SINCE [=time] Displays all files which were CREATED, MODIFIED,@ /BEFORE[=time] which EXPIRED or which were backed up SINCE or5 BEFORE the specified time. If no time specified9,1 then the current date at 00:00 is used. Also7 by default, if none of /CREATED, /MODIFIED,/BACKUP 1 or /EXIRED is specified, /CREATED is assumed. B /EXCLUDE=(fspec,...) Excludes the listed file specifications from the directory listing. < /BACKUP /CREATED Used with the /SINCE or /BEFORE switch to9 /EXPIRED /MODIFIED select the type of date to select on. 9 /VERSIONS=n Lists the latest 'n' versions of each file.$ WRITE SYS$OUTPUT " "-$ INQUIRE/NOPUN TMP "Pre:ss RETURN when ready"$ PAGE$ TYPE SYS$INPUT+ Some examples of file selection qualifiers'$ ON CONTROL_Y THEN GOTO Reset_Terminal3$ WRITE SYS$OUTPUT "[?4h" ! Back to smooth scroll5$ WRITE SYS$OUTPUT "" ! set scrolling regionL$ Command="DIR/EXCLUDE=(*.EXE,*.SYS,*.COM,*.DAT,*.STB) SYS$SYSROOT:[SYSEXE]"H$ Text="Exclude *.EXE, *.SYS, *.COM, *.DAT and *.STB files from listing"$ Return="Do_select_2"$ GOTO Do_Command $Do_Select_2:$ Command="DIR/SINCE"9$ Text="Display all ;files created on this account today."$ Return="Do_Select_3"$ GOTO Do_Command $Do_Select_3:*$ Command="DIR/SINCE/MODIFIED SYS$MANAGER"7$ Text="Display files modified since today at midnight"$ Return="Do_Select_4"$ GOTO Do_Command $Do_Select_4:5$ WRITE SYS$OUTPUT "" ! reset scrolling region0$ WRITE SYS$OUTPUT "[?4l" ! Back to jump scroll$ EXIT$!$Reset_Terminal:5$ WRITE SYS$OUTPUT "" ! reset scrolling region0$ WRITE SYS$OUTPUT "[?4l" ! Back to jump scroll$ <EXIT $Do_command:'$ WRITE SYS$OUTPUT "''EraseL05'''Text'"$ WRITE SYS$OUTPUT ->"''Erasel07'Execute the command: ''Bold'''Command'''No_Bold'"$ WRITE SYS$OUTPUT -$"''EraseL11' ===================="($ WRITE SYS$OUTPUT "''EraseL12'[?4h",$ WRITE SYS$OUTPUT "''EraseL12'$ ''Command'" $ 'Command'9$ INQUIRE/NOPUN TMP "''EraseL23'Press RETURN when ready"%$ WRITE SYS$OUTPUT "''EraseL23'[?4l"$ GOTO 'Return'ww­`e‡;HþŠ($ IF P1 .NES. "" THEN GOTO DO_SUBROUTINE$ PAGE5=$ WRITE SYS$OUTPUT "KMSCAI -- No subroutine specified$ WAIT 00:00:03$ EXIT$Do_Subroutine:$ GOTO 'P1' !$ EXIT$!$Menu:$ PAGE$ TYPE SYS$INPUT. #4 8 #3  The VAX/VMS File Specifier  8 #4  The VAX/VMS File Specifier  . #3  Type ^Y to Exit at any timeYou may choose:= Intro - Indroduction to the VMS file specifier0 DE>vice - Learn/test on Device Name3 DIrectory - Learn/test on Directory Name. NAme - Learn/test on File Name. NOde - Learn/test on Node Name. Type - Learn/test on File type8 Version - Learn/test on File Version Number! Final - Final Exam% Exit - Exit this menu$ EXIT$Select: $ Test:=="F"$ Result:=="OK" $ ZTmp=P2 $ ZTMP1=P3*$ IF ZTmp1 .EQS. "DE" THEN GOTO Do_Device-$ IF ZTmp1 .E?QS. "DI" THEN GOTO Do_Directory+$ IF ZTmp .EQS. "E" THEN Result:=="DONE" $ IF ZTmp .EQS. "E" THEN EXIT+$ IF ZTmp .EQS. "F" THEN GOTO Final_Exam0$ IF ZTmp .EQS. "I" THEN GOTO Do_Introduction($ IF ZTmp1 .EQS. "NA" THEN GOTO Do_Name($ IF ZTmp1 .EQS. "NO" THEN GOTO Do_Node($ IF ZTmp .EQS. "T" THEN GOTO Do_Type+$ IF ZTmp .EQS. "V" THEN GOTO Do_Version$ Result:=="BAD"$ EXIT $Do_Device:$ PAGE$ TYPE SYS$INPUT The VAX/VMS Device SpecifierG Files reside on phy@sical devices; disks and tapes in general. TheIdevice name is used to reference these devices. The device name consistsMof three parts the device mnemonic, the controler index, and the unit number.'The general form of the device name is DDCUU:!where: DD - The device mnemonic " C - The controler index (A - Z) UU - The unit number (0 - 7)" : Terminates the device name &The device mnemonics on our system are. DM RK07 disk (Controler A, Unit 1 only)9 DR RAM03 disk drive (Controler A, Unit 0 and 1 only) MS TS11 Tape Drive4 TT Terminals (Controlers A, B, C. Units 0 - 7).$ INQUIRE/NOPUN Tmp "Press RETURN to continue"$ PAGE$ TYPE SYS$INPUT, The general form of the device specifier is& DDCUU:&Now let's see if you learned the rules$!______________ $ Nmax==86$ Question=="Is the above example a valid device name" $ Test=="T"$ Example_1=="DRA0:"$ Answer_1=="Y"'$ Reason_1=="DRA0: is our syBstem disk."$ Example_2=="D?A0:"$ Answer_2=="N".$ Reason_2=="A ? can not be in a device name."$ Example_3=="DR0"$ Answer_3=="N"=$ Reason_3=="Both the controler index and the : are missing."$ Example_4=="DRA:"$ Answer_4=="N"0$ Reason_4=="The unit number must be specified."$ Example_5=="DA1:"$ Answer_5=="N"6$ Reason_5=="The device mnemonic must be two letters."$ Example_6=="MSA0:$ Answer_6=="Y"7$ Reason_6=="MSA0: is the name of our TS11 tape drive."$ Example_7=="TTC9C:"$ Answer_7=="N"8$ Reason_7=="Terminal unit numbers run from 0 - 7 only."$ Example_8=="OPA0:"$ Answer_8=="Y"6$ Reason_8=="OPA0: is the name of the system console."$ EXIT$Do_Directory:$ PAGE$ TYPE SYS$INPUT& The VAX/VMS Directory SpecifierF Directories are named areas of the disk (like file drawers) whereHfiles can be located. Each directory name consists of 1-9 alpha-numericIcharacters. The entire directory name is enclosed in brackets. VMS alsoBsupports dir Dectory/subdirectory combinations. A subdirectory nameGalso consists of 1-9 alpha-numeric characters. Subdirectories may themCselves have subdirectories. A total of 8 levels of directories andGsubdirectories are possible. The general form of a directory string isD [ Directory . Subdirectory1 . Subdirectory2 . .... Subdirectory8 ]Dwhere the spaces are for clarity and should not be present. In the Btotal directory specifier, each subdirectory is seperated from itsDadjoining directorie Es or subdirectories by a ".". When a directory-Dsubdirectory string is specified for locating a file specifier, eachEdirectory and subdirectory must be correctly accessed in sequence forthe system to find the file.9$ INQUIRE/NOPUN Tmp "Press RETURN when ready to continue"$ PAGE$ TYPE SYS$INPUTl [ Directory . Subdirectory1 . Subdirectory2 . .... Subdirectory8 ]K To simplify the problem of searching through multiple directories for Ja fi Fle the wild card (*) and the elipsis (...) may be used. The wild cardFwill match any directory/subdirectory name at that level. The elipsisFmeans that starting with the toplevel directory one should search downHthrough all in-line directories. Either [ ] or < > pairs may be used todelimit the directory names.%Now lets see if you learned the rules$!______________ $ Nmax==8>$ Question=="Is the above example a valid directory specifier" $ Test=="T"$ Example_1=="[DOWNWARD]"$ AnswerG_1=="Y"3$ Reason_1=="[DOWNWARD] is a legal directory name."$ Example_2=="[SMITH.RUNOFF"$ Answer_2=="N"7$ Reason_2=="The Directory is not terminated with a ]."$ Example_3=="[ALLMYFILES]"$ Answer_3=="N"J$ Reason_3=="A directory can have a maximum of 9 alpha-numeric characters"$ Example_4=="[ROY$SMITH]"$ Answer_4=="N"K$ Reason_4=="Only alpha numeric characters are allowed in directory names."$ Example_5=="[VAVRA...]"$ Answer_5=="Y"H$ Reason_5=="All files in all subdirectoriHes of VAVRA will be searched."$ Example_6=="[MARKB..GRAPH]"$ Answer_6=="N"H$ Reason_6=="A single . seperates subdirectories, a ... is the elipsis."$ Example_7=="MARKB.GRAPH.DATA"$ Answer_7=="N"/$ Reason_7=="Both the [ and the ] are missing."$ Example_8=="[310310]"$ Answer_8=="Y"3$ Reason_8=="Numbers are valid in directory names."$!______________$ EXIT $Do_Name:$ PAGE$ TYPE SYS$INPUT The VAX/VMS File NameF A file name consists of from 1 - 9 alpha-numeric charIacters. TheEfile name is seperated from the file type by a period. The file nameCis seperated from a directory by a ]. If no directory is specifiedDand a device or node name is specified, the ":" seperates the device*specifier or node name from the file name.%Now lets see if you learned the rules$!______________ $ Nmax==8,$ Question=="Is the above a vaild file name" $ Test=="T"$ Example_1=="MYFILE"$ Answer_1=="Y"*$ Reason_1=="MYFILE is a legal file name."!$ Example_2=="MYVEJRYLONGFILENAME"$ Answer_2=="N"A$ Reason_2=="The filename length is more than 9 characters long."$ Example_3=="MY_FILE"$ Answer_3=="N"K$ Reason_3=="A file name can contain only the letters A-Z and numbers 1-9."$ Example_4=="MY FILE"$ Answer_4=="N"<$ Reason_4=="Embedded spaces are not allowed in file names."$ Example_5=="DBA0:Myfile;Typ"$ Answer_5=="N"E$ Reason_5=="File names must be seperated from file types with a . "#$ Example_6=="[DirectoryMyfile.Typ"$ Answer_6=="N"EK$ Reason_6=="File names must be seperated from directories with a ]."$ Example_7=="DRA0Myfile.Typ"$ Answer_7=="N"E$ Reason_7=="Device names and file names must be seperated with a :."$ Example_8=="DRA0:SN1234.DAT"$ Answer_8=="Y"0$ Reason_8=="Numbers are allowed in file names."$!______________$ EXIT $Do_Node:$ PAGE$ TYPE SYS$INPUT! The VAX/VMS Node Name SpecifierI The VMS node name designates which computer on a network to reference.DA VMS node name consists of 1 - 6 Lalpha-numeric characters seperatedDfrom the rest of the file specifier with a ::. Optionally, the nodeEname may contain a access control string enclosed in quotes which is Hrequired to gain access to a file on a remote network node. This generalform for the node specifier is$ Node_Name"Account_name Password"::%Now lets see if you learned the rules$!______________ $ Nmax==6:$ Question=="Is the above an example of a valid node name" $ Test=="T"$ Example_1=="FUSION::"$ Answer_1M=="Y"5$ Reason_1=="FUSION:: is the node name of the 11/45."!$ Example_2=="VERYLONGNODENAME::"$ Answer_2=="N"=$ Reason_2=="The node name length is more than 6 characters."$ Example_3=="MY_NODE"$ Answer_3=="N"K$ Reason_3=="A node name can contain only the letters A-Z and numbers 1-9."$ Example_4=="DMS 34::"$ Answer_4=="N"C$ Reason_4=="Embedded spaces are not allowed in simple node names."$ Example_5=="STAR"$ Answer_5=="N"J$ Reason_5=="Node names need a trailing :: when usNed in a file specifier.".$ Example_6=="FUSION""""Myname Password""""::"$ Answer_6=="Y"E$ Reason_6=="An access control string is specified in the node name."$!______________$ EXIT $Do_Type:$ PAGE$ TYPE SYS$INPUT The VMS File TypeG The file type consists of 1 - 3 alpha numeric characters seperatedFfrom the file name with a ".". It is used to designate the file type.FFor example .BAS files are BASIC source files, .FOR are fortran source.files and .EXE are executable prograOms to RUN.%Now lets see if you learned the rules$!______________ $ Nmax==6:$ Question=="Is the above an example of a valid file name" $ Test=="T"$ Example_1==".DAT"$ Answer_1=="Y"'$ Reason_1==".DAT is a valid VMS type."$ Example_2==".FORT"$ Answer_2=="N"8$ Reason_2=="The file type is longer than 3 characters."$ Example_3=="123"$ Answer_3=="Y"+$ Reason_3=="Numbers are legal file types."$ Example_4==";LIS"$ Answer_4=="N"K$ Reason_4=="A ; can not be used to seperateP the file name from file type."$ Example_5==".D"$ Answer_5=="Y"J$ Reason_5=="File types can be shorter than 3 characters, but not longer."$ Example_6=="FOR"$ Answer_6=="N"P$ Reason_6=="When used as part of a file specifier, a . must preceed file type."$!______________$ EXIT $Do_Version:$ Page$ TYPE SYS$INPUT VAX File Version NumbersK The first time a file is created it is assigned a version number of 1.LEach time the file is revised (edited), a new version of theQ file is createdLwith one higher version number. The previous version number file is usuallyIretained unless deleted by the user. File version numbers may range fromF1 to 32767 decimal. Version numbers must be seperated from file types with a ";".&Now lets see if you learned the rules.$!______________ $ Nmax==6>$ Question=="Is the above example a valid file version number" $ Test=="T"$ Example_1==";2"$ Answer_1=="Y"I$ Reason_1=="The second version of the file, the previous Rversion is ;1."$ Example_2==";77777"$ Answer_2=="N"2$ Reason_2=="The largest version number is 32767."$ Example_3==";-1"$ Answer_3=="Y"L$ Reason_3=="Negative version numbers are relative the the most recent one."$ Example_4==".10"$ Answer_4=="N"@$ Reason_4=="The . makes this a file type not a version number."$ Example_5==";abc"$ Answer_5=="N"6$ Reason_5=="Version numbers must be decimal numbers."$ Example_6==";1600"$ Answer_6=="Y"/$ Reason_6=="A huge version number, buSt legal."$!______________$ EXIT $Final_Exam:$ PAGE$ TYPE SYS$INPUT The Final ExamB If you have taken the previous modules, you have seen examples ofJ the various components of a file specifier. Before seeing if you canI recognize a good from a bad file specifier, here is your opportunityH to enter a file specifier and see if the system likes it. When youM are ready to go on to the final test, just type RETURN. File specifiersK will not be accepted unle Tss specified directories exist on the system.$Ask:I$ READ/PROMPT="''Erasel12'Input a file specifier (RETURN ->Continue): " - SYS$COMMAND RECORD $ WRITE SYS$OUTPUT "''ERASEL20'"$$ IF Record .EQS. "" THEN GOTO Ask_20$ tmp=F$PARSE(Record,"SYS$SYSDEVICE:",,"DEVICE")*$ IF Tmp .EQS. "" THEN GOTO Bad_Specifier5$ IF .NOT. F$GETDVI(TMP,"EXISTS") THEN GOTO NO_DEVICE"$ tmp1=f$parse(record,,,"VERSION")3$ ver=F$INTEGER(f$extract(1,F$LENGTH(TMP1)-1,TMP1)))$ IF VER .GT. 32767 THEN GOTO Bad_VersioUn$ WRITE SYS$OUTPUT -? "''ERASEL20'Right. ''Record' is a valid VMS file specifier." $ GOTO Ask $No_Device:$ WRITE SYS$OUTPUT -D "''ERASEL20'Wrong. The specified device, ''Tmp', does not exist." $ GOTO ASK $Bad_Version:$ WRITE SYS$OUTPUT -E "''Erasel20'Wrong. The version number for ''Record' is not valid." $ GOTO ASK$Bad_Specifier:$ WRITE SYS$OUTPUT -D "''EraseL20'Wrong. ''Record' is not a valid VMS file specifier." $ GOTO ASK$Ask_2:$ PAGE$ TYPE SYS$INPUTG V As you learned earlier, the standard VAX/VMS file specifier looks likep Node_Name::Device_Name:[Directory]File_Name .File_Type;Version%Now lets see if you learned the rules$!______________ $ Nmax==99$ Question=="Is the above example a valid file specifier" $ Test=="T"5$ Example_1=="FUSION:DRA0:[DOWNWARD.RUNOFF]FOO.RNO;4"$ Answer_1=="N"J$ Reason_1=="Node names must be seperated with a :: from the device name.".$ Example_2=="DRA0 W:[DOWNWARD.RUNOFF]FOO.RNO.1"$ Answer_2=="N"L$ Reason_2=="Version numbers must be separated with a ; from the file type."=$ Example_3=="FUSION::DRA0:[DOWNWARD.DEANZA.TASKS]TAKPIX.EXE"$ Answer_3=="Y".$ Reason_3=="All required rules are observed."D$ Example_4=="DMS34::DMA1:[DOWNWARD.DEANZA.SUBROUTINE.MACRO]TMP.MAR"$ Answer_4=="N"D$ Reason_4=="The subdirectory name SUBROUTINE exceeds 9 characters.""$ Example_5=="DR:FOOBAR.DAT;32767"$ Answer_5=="N"M$ Reason_5=="The device name must incl Xude a Controler index and unit number.".$ Example_6=="DRA0:DOWNWARD.PICTURE]IMAGE.EXE"$ Answer_6=="N":$ Reason_6=="The [ is missing in the directory specifier."1$ Example_7=="FUSION::[SYSTEM..CMDFIL]TERM.COM;0"$ Answer_7=="N"6$ Reason_7=="The .. in the directory name is illegal."&$ Example_8=="[VAVRA.ADMIN]MEMO;tmp.0"$ Answer_8=="N"/$ Reason_8=="The ; and the . are interchanged.")$ Example_9=="FUSION::[SYSTEM...]FOO.COM"$ Answer_9=="Y"Q$ Reason_9=="FOO.COM will be searched for Ystarting in [SYSTEM] and working down."$ EXIT$Do_Introduction:$ Page$ Type SYS$INPUT* Introduction to the VMS File SpecifierM The file is the basic unit of storage for VAX/VMS. All user informationKis stored in files, usually on tapes or disks. In order to retrieve a fileIfrom storage, or create and store a new one, you must be able to identifythe file to the system.K The VAX/VMS file specifier is used to name a file on a disk or tape inGsuch a way that it can b Ze uniquely identified for use by the system andGusers. It is composed of a number of distinct parts. The general formof the file specifier isx Node_Name :: Device_Name : [Directory] File_Name . File_Type ; VersionOThe spaces in the above example are for clarity only and should not be present.MAny or all of the file specifier may be used. In general, all that is neededJto reference a file on a users account is to specify the File_Name a[nd the File_Type. File_Name.File_Type-$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUT} Node_Name :: Device_Name : [Directory] File_Name . File_Type ; Version?Several rules should be noted about the general file specifier.G 1) The Node_Name must be separated from Device_Name by a ::F 2) The Device_Name must be separated from Directory by a :/ 3) The Directory must be enclosed \in [ ]F 4) The File_Name must be separated from File_Type by a .F 5) The File_Type must be separated from File_Version by a ;N 6) Only the letters A-Z and the numbers 0-9 may be in a legal file specifier.%Now lets see if you learned the rules$!______________ $ Nmax==89$ Question=="Is the above example a valid file specifier" $ Test=="T"%$ Example_1=="Dev:Myfile.Typ;Version"$ Answer_1=="Y"G$ Reason_1=="Device, name, type and version all had proper seperator ]s."/$ Example_2=="Dev:Directory]Myfile.Typ;Version"$ Answer_2=="N"7$ Reason_2=="The Directory was not preceeded with a [."/$ Example_3=="Dev:[Directory]MyfileTyp;Version"$ Answer_3=="N"D$ Reason_3=="The file name and file type must be seperated with a ."0$ Example_4=="Dev:[Directory]Myfile;Typ;Version"$ Answer_4=="N"H$ Reason_4=="The file name and file type may not be seperated with a ;."0$ Example_5=="Dev:[Directory]Myfile.Typ.Version"$ Answer_5=="N"J$ Reason_5=="The file type^ and file version may not be seperated with a ."$ Example_6=="Myfile.Typ"$ Answer_6=="Y"C$ Reason_6=="Device, directory, and version need not be specified."-$ Example_7=="Node:Dev:[Directory]Myfile.Typ"$ Answer_7=="N"=$ Reason_7=="The Node must be seperated from device with ::."$$ Example_8=="[Directory]Myfile.Typ"$ Answer_8=="Y">$ Reason_8=="The directory name is correctly enclosed in [ ]."$!______________$ EXITww­:‘8=G‹($ IF P1 .NES. "" THEN GOTO DO_SUBROUTINE_$ PAGE5$ WRITE SYS$OUTPUT "KMSCAI -- No subroutine specified$ WAIT 00:00:03$ EXIT$Do_Subroutine:$ GOTO 'P1' !$ EXIT$!$Menu:$ PAGE$ TYPE SYS$INPUT- #4 7 #3  The VAX/VMS PURGE Command  7 #4  The VAX/VMS PURGE Command  - #3  Type ^Y to Exit at any timeYou may choose:) Intro - The PURGE Command, Qualifiers -` The PURGE qualifiers" Final - Final exam& Exit - Exit this menu$ EXIT$Select: $ Test:=="F"$ Result:=="OK" $ ZTmp=P2 $ ZTMP1=P3+$ IF ZTmp .EQS. "E" THEN Result:=="DONE" $ IF ZTmp .EQS. "E" THEN EXIT0$ IF ZTmp .EQS. "I" THEN GOTO Do_Introduction.$ IF ZTmp .EQS. "Q" THEN GOTO Do_Qualifiers+$ IF Ztmp .EQS. "F" THEN GOTO Final_Exam$ Result:=="BAD"$ EXIT$!______________$ EXIT $Final_Exam:$ PAGE$ TYPE SYS$INPUT The Fainal Exam:Now lets see if you remember how to use the PURGE command. Will the following PURGE command$!______________ $ Nmax==6 $ Test=="T"$ Question==""C$ Question_1=="Purge all but the most recent version of FOOBAR.FOO" $ Example_1=="PUR FOOBAR.FOO;11"$ Answer_1=="N"6$ Reason_1=="Explicit version numbers are not allowed")$ Question_2=="Prompt for files to purge"$ Example_2=="PURGE"$ Answer_2=="N"P$ Reason_2=="PURge without a file specifier, purges all files in your dibrectory"3$ Question_3=="Purge all files with the prefix FOO"$ Example_3=="PUR FOO*.*"$ Answer_3=="Y"7$ Reason_3=="Wild cards are allowed in file specifiers"+$ Question_4=="Log deleted files to a file"&$ Example_4=="PUR/LOG=LOGFILE.TXT *.*"$ Answer_4=="N"?$ Reason_4=="Purged files are listed to the current SYS$OUTPUT"%$ Question_5=="Recover a purged file""$ Example_5=="PUR/RECOVER FOO.TXT"$ Answer_5=="N"9$ Reason_5=="Once a file is deleted is is gone for good.".$ Question_6==c"Purge files across the network",$ Example_6=="PUR FUSION::[7,250]VECTOR.TXT"$ Answer_6=="N"U$ Reason_6=="To purge files on a remote node requires an account and password string"$ EXIT$Do_Introduction: $ Test=="F"$ Page$ Type SYS$INPUT) Introduction to the VMS PURge CommandI Every time you edit a file, compile a program, or link a task, a newMoutput file with a version number one higher than the previous version numberHis created. This creation of new files will d continue untill either all Javailable disk space is used up, or VMS disk accounting refuses to let youKuse more disk space. So that you have adequate available disk space to do Eyour work, it is important to periodically remove old, obsolete, and #unneeded files from your directory.L The VMS PURge command is used to delete obsolete versions of files fromIyour directory. The command may be abbreviated as "PUR". Once a file isLPurged from your directory, it is gone for good. Howeveer, the purge commandIwill never delete the most recent version of a file. If your most recentJversions are valid, using the PURge command rather than the DELete command1protects these files against accidental deletion.9$ INQUIRE/NOPUN TMP "''EraseL23'Press RETURN when ready"$ PAGE$ TYPE SYS$INPUT0 The PURge command has the following syntax:< $ PUR/qualif1..../qualifN filspec1,filespec2.....,filespecNIwhere the file specifiers can include wild cards (*) for directory f, name,Gtype, or extension. Qualifiers are used to produce a listing of purgedDfiles and for setting the number of files to keep. If more than oneHfile is specified, the file specifiers must be seperated with commas ","For plus signs "+". If no file specification is given all files in the%current default directory are purged.J The PURge command does not provide file name or file type defaults toLuse if the file name or type is omitted. Version numbers are not allowed. 9$ INQUIRgE/NOPUN TMP "''EraseL23'Press RETURN when ready"$ PAGE$ TYPE SYS$INPUT@ Now let us observe the effects of using the PURge command.'$ ON CONTROL_Y THEN GOTO Reset_Terminal7$ WRITE SYS$OUTPUT "" ! Scroll bet lines 11-24$ Return="Command_1.$ Text="You are warned if a file is not found"$ Command="PUR PURXXXXX1.TXT"$ GOTO Do_Command $Command_1:$ CREATE PURXXXXX1.TXT$ CREATE PURXXXXX1.TXT$ CREATE PURXXXXX1.TXT$ CREATE PURXXXXX1.TXT$ Command="PUR PURXXXXX1.TXT;1h"1$ Text="Explicit version numbers are not allowed"$ Return="Command_2"$ GOTO Do_Command $Command_2:$ CREATE PURXXXXX1.TXT$ CREATE PURXXXXX1.TXT$ CREATE PURXXXXX1.TXT$ CREATE PURXXXXX1.TXT$ Command="DIR PURXXXXX1.TXT"=$ Text="Here we have many versions of the file PURXXXXX1.TXT"$ Return="Command_3"$ GOTO Do_Command $Command_3:$ Command="PUR PURXXXXX1.TXT";$ Text="Delete all but the most recent version of the file"$ Return="Command_4"$ GOTO Do_Command $Command_4i:$ Command="DIR PURXXXXX1.TXT"G$ Text="Only the most recent version of the file remains after purging"$ Return="Command_5"$ GOTO Do_Command $Command_5:+$ Command="PUR PURXXXXX1.TXT PURXXXXX2.TXT"@$ Text="Multiple files must be seperated with commas or + signs"$ Return="Command_6"$ GOTO Do_Command $Command_6:$ DELETE PURXXXXX*.TXT;*6$ WRITE SYS$OUTPUT "" ! reset scrolling region$ PAGE$ TYPE SYS$INPUT8 Remember, once a file is purged, it is GONE FOR GOOD. j$ Test="F"9$ INQUIRE/NOPUN TMP "''EraseL23'Press RETURN when ready"$ EXIT$Do_Qualifiers: $ Test=="F"$ PAGE$ TYPE SYS$INPUT. PURGE Command QualifiersI Two qualifiers exist for the PURge command, /KEEP and /LOG (/NOLOG).GThe /KEEP qualifier controls how many versions of a file to retain. ByHdefault, it it is not specified, the PURge command retains ONLY the mostHrecent version of a file. However, if /KEEP=n is used as a qualifier toGthe PURge command, t khe "n" most recent versions of a file will be kept.O By default, when files are deleted with the PURge command, no notificationGis given as to which files have been purged. If you wish to see which Dfiles have been deleted, use the /LOG qualifier. The /LOG qualifierFwill cause the file specifications of each file to be displayed as theAfiles are deleted. By default, the PURge command assumes /NOLOG.9$ INQUIRE/NOPUN TMP "''EraseL23'Press RETURN when ready"$ PAGE$ TYPE SYS$INPlUT7 Now let us observe the effects of PURge qualifiers)$ ON CONTROL_Y THEN GOTO Reset_Terminal !7$ WRITE SYS$OUTPUT "" ! Scroll bet lines 11-24$ CREATE PURXXXXX1.TXT$ CREATE PURXXXXX1.TXT$ CREATE PURXXXXX1.TXT$ CREATE PURXXXXX1.TXT#$ Command="PURGE/LOG PURXXXXX1.TXT"/$ Text="Display all files purged to SYS$OUTPUT"$ Return="QUAL_1"$ GOTO Do_Command$Qual_1:$ CREATE PURXXXXX1.TXT$ CREATE PURXXXXX1.TXT$ CREATE PURXXXXX1.TXT$ CREATE PURXXXXX1.TXT$ CREATE PURmXXXXX1.TXT$ CREATE PURXXXXX1.TXT$ CREATE PURXXXXX1.TXT$ CREATE PURXXXXX1.TXT$$ Command="PUR/KEEP=3 PURXXXXX1.TXT"6$ Text="Keep the most recent three versions of a file"$ Return="QUAL_2"$ GOTO Do_Command$Qual_2:$ Command="PUR PURXXXXX1.TXT".$ Text="Purge all but the most recent version"$ Return="QUAL_3"$ GOTO Do_Command$Qual_3:$ DELETE PURXXXXX1.TXT;*6$ WRITE SYS$OUTPUT "" ! reset scrolling region $ EXIT !$!$Reset_Terminal:5$ WRITE SYS$OUTPUT "" !n reset scrolling region0$ WRITE SYS$OUTPUT "[?4l" ! Back to jump scroll$ EXIT $Do_command:'$ WRITE SYS$OUTPUT "''EraseL05'''Text'"$ WRITE SYS$OUTPUT ->"''Erasel07'Execute the command: ''Bold'''Command'''No_Bold'"$ WRITE SYS$OUTPUT -$"''EraseL11' ===================="($ WRITE SYS$OUTPUT "''EraseL12'[?4h",$ WRITE SYS$OUTPUT "''EraseL12'$ ''Command'"$ ON ERROR THEN CONTINUE $ 'Command'9$ INQUIRE/NOPUN TMP "''EraseL23'Press RETURN when ready"%$ WRITE SYS$OUTPUT "''EraseLo23'[?4l"$ GOTO 'Return'ww­à¤$>½L‹($ IF P1 .NES. "" THEN GOTO DO_SUBROUTINE$ PAGE5$ WRITE SYS$OUTPUT "KMSCAI -- No subroutine specified$ WAIT 00:00:03$ EXIT$Do_Subroutine:$ GOTO 'P1' !$ EXIT$!$Menu:$ PAGE$ TYPE SYS$INPUT1 #4 ; #3  Document Formatting with RUNOFF  ; #4  Document Formatting with RUNOFF  1 #3  Type p^Y to Exit at any timeYou may choose:. Intro - Introduction to RUNOFF1 Basic - Basic Formatting commands1 Qualifiers - RUNOFF Command qualifiers& Exit - Exit this menu$ EXIT$Select: $ Test:=="F"$ Result:=="OK" $ ZTmp=P2 $ ZTMP1=P3+$ IF ZTmp .EQS. "E" THEN Result:=="DONE" $ IF ZTmp .EQS. "E" THEN EXIT0$ IF ZTmp .EQS. "I" THEN GOTO Do_Introduction)$ IF Ztmp .EQS. "B" THEN GOTO Do_Basic.$ IF ZTmp .EQS. q"Q" THEN GOTO Do_Qualifiers+$ IF Ztmp .EQS. "F" THEN GOTO Final_Exam$ Result:=="BAD"$ EXIT$!______________$ EXIT $Final_Exam:$ PAGE$ TYPE SYS$INPUT The Final Exam NOT AVAILABLE YET$EXIT;Now lets see if you remember how to use the DELETE command.!Will the following delete command$!______________ $ Nmax==6 $ Test=="T"$ Question==""6$ Question_1=="Delete files modified after 1-Jan-1983".$ Example_1=="DEL /SINCE=1-JAN-1982 FOO.TXT;*"$ Answer_1=="N"B$ rReason_1=="To DELETE modified files must also include /MODIFIED"4$ Question_2=="DELETE all text files on a directory"$ Example_2=="DEL *.TXT"$ Answer_2=="N"<$ Reason_2=="An explicit version number is always required."=$ Question_3=="DELETE all Fortran source files created today".$ Example_3=="DEL/CREATED/SINCE=TODAY *.FOR;*"$ Answer_3=="Y"/$ Reason_3=="TODAY is also a valid date string".$ Question_4=="Prompt for each file to delete""$ Example_4=="DEL/CONFIRM *.txt;*"$ Answer_4=="Y"sB$ Reason_4=="VMS will prompt to confirm the deletion of each file"&$ Question_5=="Recover a deleted file""$ Example_5=="DEL/RECOVER *.TXT;*"$ Answer_5=="N"9$ Reason_5=="Once a file is deleted is is gone for good."0$ Question_6=="Delete a file across the network".$ Example_6=="DEL FUSION::[7,250]VECTOR.TXT;*"$ Answer_6=="N"V$ Reason_6=="To delete files on a remote node requires an account and password string"$ EXIT$Do_Introduction: $ Test=="F"$ Page$ Type SYS$INPUT< t Introduction to Using RUNOFF to Format DocumentsG The VMS RUNOFF command is used to take the input from a text file Icreated with an editor and output a nicely formatted document. Many wordJprocessors operate in a "What you see is what you get" mode. At this timeMwe do not have such a word processor for the VAX. However, RUNOFF is capableKof taking ragged, totally unformatted input created from a editor, and turnIout a professionally appearing document. Moreover, RUNOFF allows grueaterKcontrol over the output format of a document than is probably possible withany word processor.J To format a document using RUNOFF, you insert document format controlKcommands within the text file you are creating. All RUNOFF document formatLcontrol commands consist of a period (".") in column 1 followed by a commandNname. Any line not preceeded by a period (".") is considered to be text whichRUNOFF will format.    5$ INQUIRE/NOPUN TMP "Press RETURN when v ready"$ PAGE$ Type SYS$INPUTK RUNOFF's inherent capabilities allow it to tackle both large and smallGformatting jobs ranging from a single page memo, to an entire book withHchapters and indexing of key words, footnoting, and reserving space for Lfigures. Because of the breadth of RUNOFF's capabilities, there are a greatMmany possible commands. However, for general use, a small number of commandsshould suffice.I Users desiring to utilize all of RUNOFF's capabilities would wdo wellFto get a copy of the RUNOFF user's manual. Other serious users shouldJobtain a mini reference guide. For users with very basic needs, however, 6this CAI course should provide sufficient information.J Users using the Vax Professional Workstation Word Processing facilityGwill find that RUNOFF commands are automatically inserted into documentHfiles it creates. By the end of this course, you should understand whatCthose commands mean, and be able to modify them to suit your needsx.    5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ Type SYS$INPUTK Once format control commands are embedded within a text file, creatingMa formatted document is easy using the VAX RUNOFF command. The format of the command is $ RUNOFF/qualifiers File_nameJIf no file type is specified, the type automatically defaults to .RNO. IfHno output qualifiers are specified, entering the command RUNOFF FilenameEwill result in a formatted document output to thye file Filename.MEM.JIf you want to preview the file prior to creating a document file on disk,@you can direct RUNOFF's output to your terminal by including the/OUTPUT=TT: qualifier.N RUNOFF has a number of other qualifiers for special purpose use and these2are covered in a different section of this course.     5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ EXIT$Do_qualifiers:$ PAGE$ TYPE SYS$INPUT#The format of the RUNOFF command is $ RUNOFF/q zualifiers File_name"The most important qualifiers are:' /BOLD=Number_of_Overstrikes Default=1- /OUTPUT=filespec Default is Input_file.MEM /PAGES="start:end"NThe Vax Professional Workstation ordinarily will handle the RUNOFF qualifiers.FAbout 28 additional qualifiers exist but these are unneeded except forHvery heavy and serious use of RUNOFF. In that event you should get, andFread the DSR (Digital Standard RUNOFF) manual. Information on all the9various qualifiers can be obtain{ed by typing HELP RUNOFF.5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ EXIT $Do_Basic: $ Test=="F"$ PAGE $Do_Basic_1:$ Basic_Return="Do_Basic"$ TYPE SYS$INPUT RUNOFF Formatting CommandsYou may choose:8 Intro - Indroduction to RUNOFF commands< Fill - Setting word fill and justification' LIST - Creating lists9 LITeral - Bypassing fill and justification1 Margins - Setting documen|t margins+ Paragraphs - Setting paragraphs2 Special - Special RUNOFF characters3 Title - Setting a document's title' Exit - Exit this menu$Basic_Select:$ INQUIRE Z "''Erasel15'Choice"$ Z1[0,1]:='Z'$ Z2[0,2]:='Z'$ Z3[0,3]:='Z'!$ IF Z1 .EQS. "E" THEN EXIT,$ IF Z1 .EQS. "F" THEN GOTO Basic_Fill,$ IF Z3 .EQS. "LIS" THEN GOTO Basic_List/$ IF Z3 .EQS. "LIT" THEN GOTO Basic_Literal/$ IF Z1 .EQS. "M" } THEN GOTO Basic_Margins2$ IF Z1 .EQS. "P" THEN GOTO Basic_Paragraphs/$ IF Z1 .EQS. "S" THEN GOTO Basic_Special-$ IF Z1 .EQS. "T" THEN GOTO Basic_Title-$ IF Z1 .EQS. "I" THEN GOTO Basic_IntroO$ WRITE SYS$OUTPUT "''EraseL22'KMSCAI -- ''Choice' is not an allowed qualifier"$ GOTO Basic_SELECT $Basic_Intro:$ PAGE$ TYPE SYS$INPUTD A RUNOFF format control command must begin with a period (".") and :start in column 1. For example if your screen looks like:)0 ~: lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk< x.Right Margin 72 x< xText .... text .... text ..... x< x .Right Margin 50 x< xText2 .... text2 .... text2 .... x: mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjMIn this case the first ".Right Margin 72" is interpreted as a RUNOFF command Ibut the second ".Right Margin 50" command is interpreted as text. RUNOFFAformat commands must preceed the text they are going to format.        5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUTM By default RUNOFF will format text in such a way to try and justify textLagainst the right margin by inserting spaces between words. This means thatJRUNOFF will change spacing between words, and their location in the outputMto make the text fit. If explicit spaces are needed between words or €lettersJyou can use the "#" to represent an explicit space which may not be moved,Iexpanded, or contracted. If you need to use the "#" as part of text, youHcan either preceed it by a "_" (the accept flag), disable recognition ofH"#" as an explicit space character (.NOFLAGS SPACE), or enclose the textin a litteral field.N If output is set for Justification and Fill, the exact format of the textIinput is generally not important, as RUNOFF will attempt to make the textM"pretty". An exception to this is that text should begin in column 1. If itNis necessary to have text which begins in columns other than the first column,Neither change margins, use a LITERAL field, or disable justification and word fill.     5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUT=An example of what the start of a document might look like is: lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk< x.Right Margin 30 ‚ x< x.Left Margin 5 x< x.AP x< x x< xThis sample paragraph is in x< xragged format, but RUNOFF will justify and x< xfill the text to make it pretty. x; mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj'The output from RUNOFF might look like.: ƒ lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk< x x< x This sample paragraph is in ragged x< x format, but RUNOFF will justify and fill x< x the text to make it pretty. x; mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUTK RUNOFF commands generally have both long and short forms. „ For exampleIthe command to set the right margin at column 72 can either be written as' .RIGHT MARGIN 72 or .RM 72KIf RUNOFF encounters what it thinks should be a command but isn't, it will Hproduce an error message. For example, if the .RIGHT MARGIN command is Fspelled incorrectly as .RGIHT MARGIN 72, RUNOFF will issue the message4 %RUNOFF-W-ILC, Illegal command: ".RGIHT MARGIN 72"E on output page xx; on input line yy of page zz of file "file_name"Jwhere "file_na…me" is the name of the file with the invalid command and theAvalues of "xx", "yy", and "zz" reflect where the error was found.5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ GOTO Do_Basic $Basic_Fill:$ PAGE$ TYPE SYS$INPUTH By default FILL and JUSTIFY modes are set in RUNOFF. To enable or $disable these modes use the commandsA .F or .FILL Enables fill mode. Adds sords to each output2 line until the addition of one more word would cross the right marg†in.@ .NF or .NO FILL Disables fill mode. Ragged lines of text. will not be merged to fill as much of each line as possible.D .J or .JUSTIFY Inserts enough additional space between words/ on a line so that the last word reaches the right margin.B .NF or .NO JUSTIFY Inserts no additional spaces. Creates a  ragged right margin.5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUT- This is ‡an example of5 ragged text that is input. We .NOFILL/.NOJUSTIFY want6 to see the effect of using the- RUNOFF .FILL/.NOFILL ; and .JUSTIFY/.NOJUSTIFY commands on1 how the text will appear.; This is an example of ragged text: .FILL/.JUSTIFY that is input. We want to see the9 effect of using the RUNOFF) ˆ .FILL/.NOFILL and; .JUSTIFY/.NOJUSTIFY commands on how- the text will appear.; This is an example of ragged text; .FILL/.JUSTIFY that is input. We want to see the; effect of using the RUNOFF; .FILL/.NOFILL and; .JUSTIFY/.NOJUSTIFY commands on how- the text will appe‰ar.5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ GOTO Do_Basic $Basic_List:$ PAGE$ TYPE SYS$INPUTD One often wants to create formatted, numbered lists. RUNOFF allowsLthis to be done easliy with the commands .LIST,.LIST ELEMENT, and .END LIST.+.LS or .LIST Start a List BlockA.LE;text or .LIST ELEMENT;text Set a new element in the list8.ELS or .END LIST End a List BlockKThe .LE command is followed by a ";" which is followed by the Štext which isOsupposed to be part of the list. This text may continue for one or more lines.NEach list element will be sequentially numbered and the text will be indented.BBy default the numbers are numeric, and a "." follows each number.5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUTF Lists can be contained within lists by starting a new list block.? lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkA x.‹text...text...text...text xA x.LIST xA x.LE;List 1 item 1 xA x.LIST xA x.LE;List 2 item 1 xA x.le;List 2 item 2 xA x.END LIST xA x.LE;List 1 item Œ xA x.END LIST x@ mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj Will produce? lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkA xtext...text...text...text xA x1. List 1 item 1 xA x 1. List 2 item 1 xA x 2. List 2 item 2 xA x2. List 1 item 2 x@ mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUTG The format of a list can be changed by following the .LIST commandwith a .DISPLAY ELEMENT command@ .DISPLAY ELEMENT list-format-code or .DLE list-format-code"where list-format-code is one of List-format-code Effect D Decimal Numbers O OŽctal Numbers H Hexadecimal Numbers# RU Roman Uppercase numerals# RL Roman Lowercase numerals# RM Roman Mixedcase numerals LU Letters, Uppercase LL Letters, Mixedcase LM Letters, Mixedcase5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUTL The format of the list can further be changed with the .DSIPLAY ELEMENTJbecause the element number can have both a preceeding and following singleJcharacter specified (instead of a single trailing "."). In this event theformat of the command is0 .DISPLAY ELEMENT ["l",]list-format-code[,"r"] Iwhere the items enclosed in brackets ("[]") are optional. The preceedingJcharacter if present is enclosed in "" and followed with a comma (",") andGthe following character if present is preceeded with a comma (",") and enclosed in quotes. For example .DISPLAY ELEMENT "(",LL,")"Ewould produce a list indexed with lower case letters enclosed in "()"as seen in the next example5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUT@  lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkA xtext...text...text...text xA x.LIST xA x.LE;List 1 item 1 xA x.LIST xA x.DLE "(",LL,")" ‘ xA x.LE;List 2 item 1 xA x.le;List 2 item 2 xA x.END LIST xA x.LE;List 1 item xA x.END LIST x@ mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj Will produce? lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq ’qqqqkA xtext...text...text...text xA x1. List 1 item 1 xA x (a) List 2 item 1 xA x (a) List 2 item 2 xA x2. List 1 item 2 x@ mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ GOTO Do_Basic$Basic_Literal:“$ PAGE$ TYPE SYS$INPUTD There are times one wishes to place text on a page and not haveEthe positions of the words in that text moved by JUSTIFY or FILL modeAor margin settings. To accomplish this use Litteral fields. Thecommands to do this are5 .LITERAL Start a literal block. No RUNOFF commands' except .END LITERAL are recognized.$ .END LITERAL Stop a literal block.>For example the words MEMO:, TO:, FROM:, SUBJECT: contained in .LITERAL MEMO: TO: FROM”: SUBJECT: .END LITERALLwould wind up in the same line if they were not enclosed in a literal field.5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ GOTO Do_Basic$Basic_Margins:$ PAGE$ TYPE SYS$INPUTF RUNOFF is just like a typewritter in that you have to set the marginsLbefore using it. Of course if you don't set the margins, RUNOFF will assumeIdefault values which may or may not be what you want. Both the right andKleft margins are setable to occur at any column. • However, the right marginImust be greater than the left margin. You can also set the size of paper?to be output to (ie the number of lines printed on each page). K .LM mmm or .LEFT MARGIN mmm Set left margin to column "mmm"> (Default column 0)L .RM nnn or .RIGHT MARGIN nnn Set right margin to column "nnn"G (Default set to page width)K .PAGE SIZE length, width – Set the length and width of the3 paper. J (Default 58 lines, 60 columns)5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUTI The settings for the margins can be changed anywhere within the bodyGof the text. Each command will affect all subsequent text. SpecifyingFthat a page has a given length does not necessarily mean that text youFenter goes there. B—y default, RUNOFF will number pages at the top andDinsert a title if specified. Pages numbers can also be selected forGprinting at the bottom of a page. At the end of each page, a new page ,will be correctly positioned on the printer.H If you do not like the way RUNOFF decides when to start a new page,1you can force a new page to start by inserting a  .PAGE2at the point where you want the new page to occur.5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ GO ˜TO Do_Basic$Basic_Paragraphs:$ PAGE$ TYPE SYS$INPUTE RUNOFF is most conveniently used if you let it handle the formattingCof paragraphs. This is called "auto-paragraph" mode. The commands9 .AP or .AUTOPARAGRAPH Turns on auto-paragraph mode= .NAP or .NO AUTOPARAGRAPH Turns off auto-paragraph modeKIf autoparagraph mode is set, a paragraph will be started each time a blankIline is left in the body of a text. When RUNOFF encounters a blank line,Lit skips a line, and i™ndents the text to start a new paragraph. If you wishFto insert blank lines without starting a new paragraph, either use theI.LITERAL/.END LITERAL commands to enclose a field of text RUNOFF will notformat, or use the command> .B nn or .BLANK nn To insert "nn" blank lines of text.5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ GOTO Do_Basic$Basic_Special:$ PAGE$ TYPE SYS$INPUTN RUNOFF has a number of special characters whose action may be controlledšNwith "FLAG" commands. A "flag" is a signal, which if set tells RUNOFF to takeHsome special action if it encounters the character. To use the special Icharacter, the flag recognition must be first turned on and then the flagenabled.1ACCEPT Take the next character following a "_"* as a literal. The "_" is the default  ACCEPT flag character. .FLAGS ACCEPT .ENABLE ACCEPT1BOLD BOLDS the next character following a "*".. Also requires the /BOLD:n qualifier on the › RUNOFF command line.2 .FLAGS BOLD * -- Bold next character6 .ENABLE BOLDING ^* -- Bold all following textB \* -- Turn off bolding of all text5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUT:UNDERLINE Allows text to be underlined using the & flag.2 .FLAGS UNDERLINE & -- Underline next character.= .ENABLE UNDERLINING ^& __ Underline all following text., \& -- Turn off underlining of all text.œ5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ GOTO Do_Basic $Basic_Title:$ PAGE$ TYPE SYS$INPUTL A title can be inserted on every page of text using the .TITLE command.Its format is; .TITLE title1A subtitle can be set with the .SUBTITLE command. .SUBTITLE sub-titleGA title on a cover page can be set with the .FIRST TITLE command. The I.FIRST TITLE command must preceed any text. This command will output theBpage number, title and subtitle on the first page of the document. .FIRST TITLE first-title5$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ GOTO Do_Basic$!$Reset_Terminal:5$ WRITE SYS$OUTPUT "" ! reset scrolling region0$ WRITE SYS$OUTPUT "[?4l" ! Back to jump scroll$ EXIT $Do_command:'$ WRITE SYS$OUTPUT "''EraseL05'''Text'"$ WRITE SYS$OUTPUT ->"''Erasel07'Execute the command: ''Bold'''Command'''No_Bold'"$ WRITE SYS$OUTPUT -$"''EraseL11' ===================="($ WRITE SYS$OUTPUT "ž''EraseL12'[?4h",$ WRITE SYS$OUTPUT "''EraseL12'$ ''Command'"$ ON ERROR THEN CONTINUE $ 'Command'9$ INQUIRE/NOPUN TMP "''EraseL23'Press RETURN when ready"%$ WRITE SYS$OUTPUT "''EraseL23'[?4l"$ GOTO 'Return'ww­€ºô­E‹($ IF P1 .NES. "" THEN GOTO DO_SUBROUTINE$ PAGE5$ WRITE SYS$OUTPUT "KMSCAI -- No subroutine specified$ WAIT 00:00:03$ EXIT$Do_Subroutine:$ GOTO 'P1' !$ EXIT$!$Menu:$ PAGE$ TYPE SYS$INPUT. #4 Ÿ8 #3  The VAX/VMS TYPE Command  8 #4  The VAX/VMS TYPE Command  . #3  Type ^Y to Exit at any timeYou may choose:8 Intro - Indroduction to the TYPE Command" Final - Final exam& Exit - Exit this menu$ EXIT$Select: $ Test:=="F"$ Result:=="OK" $ ZTmp=P2 $ ZTMP1=P3+$ IF ZTmp .EQS. "E" THEN Result:=="DONE" $ IF ZTmp .EQS. "E" T HEN EXIT0$ IF ZTmp .EQS. "I" THEN GOTO Do_Introduction+$ IF Ztmp .EQS. "F" THEN GOTO Final_Exam$ Result:=="BAD"$ EXIT$!______________$ EXIT $Final_Exam:$ PAGE$ TYPE SYS$INPUT The Final Exam4Now lets see if you remember what the qualifiers do.Will the following TYPE command$!______________ $ Nmax==6 $ Test=="T"$ Question==""7$ Question_1=="Display all text files at your terminal"$ Example_1=="TYPE *.TXT"$ Answer_1=="Y"@$ Reason_1=="TYPE accepts ¡wild cards as part of file specifiers"@$ Question_2=="Display FILE1.TXT and FILE2.TXT at your terminal"#$ Example_2=="T FILE1.TXT FILE2.TXT$ Answer_2=="N"L$ Reason_2=="Multiple file names must be seperated with commas, not spaces."<$ Question_3=="Output a text file to the line printer TTA1:"+$ Example_3=="TYPE/OUTPUT=TTA1: MYFILE.TXT"$ Answer_3=="N"C$ Reason_3=="VMS only allows you to output to allocated terminals."D$ Question_4=="Type the first file the terminal, the second to file"8 ¢$ Example_4=="TYPE FILE1.TXT,FILE2.TXT/OUTPUT=FILE3.TXT"$ Answer_4=="Y"H$ Reason_4=="The /OUTPUT qualifier may also be attached to a file name."9$ Question_5=="Type all text files in a given directory."$ Example_5=="TYPE *.*;*"$ Answer_5=="N"K$ Reason_5=="Wildcard file type will allow non-text files to be displayed."F$ Question_6=="Output text from within a command file to another file"+$ Example_6=="TYPE/OUTPUT=FOO.TXT SYS$INPUT$ Answer_6=="Y"O$ Reason_6=="All text until the next £ line starting with a "$" goes to FOO.TXT""$ EXIT$Do_Introduction: $ Test=="F"$ Page$ Type SYS$INPUT# Using the VMS TYPE CommandL The VMS TYPE command is used to display the contents of a file or groupMof files to the current output device. The files should be ASCII text files.KTyping a binary file (object module, executable image or the like) to one'sHterminal produces very unsatisfactory results. The TYPE command can beKabreviated with the single letter "T". Th¤e command (normally abreviated asTYP) has the following syntax: + $ TYPE filspec1[,filespec2.....,filespecN]Owhere the file specifiers can include wild cards (*) for directory, name, type,or extension. -$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ Type SYS$INPUTN A single qualifier is allowed to direct the output of the TYPE command toFan output device other than one's current terminal. This qualifier is /OUTPUT=file-spec. JThe qualifier may be pla ¥ced immediately after TYPE or after any given fileFspecifier. The /OUTPUT qualifier directs the output to go to the fileNspecifier specified by "file-spec". This may be a terminal or any other valid"VMS file specifier. For example,  $ TYPE /OUTPUT=TTn: FOO.COM Idisplays FOO.COM on terminal TTn:. Remember, however, VMS will not allowLyou to output to physical devices which you do not own. To own a device youEmust allocate it, and for terminals this requires special privileges.I ¦ If you enter the command TYPE with no files, VMS will prompt you forKthe file specifier. Enter a file specifier, or type Control-Z or Control-Yto cancel the request.-$ INQUIRE/NOPUN TMP "Press RETURN when ready"$ PAGE$ TYPE SYS$INPUT6 Now let us observe the effects of a TYPE command.'$ ON CONTROL_Y THEN GOTO Reset_Terminal7$ WRITE SYS$OUTPUT "" ! Scroll bet lines 11-24$ Command="T FOO123456.XYZ"E$ Text="VMS produces a warning message if the file can not be fo §und."$ Return="Command_2"$ GOTO Do_Command $Command_2:%$ TYPE/OUTPUT=TYPEXXXX1.TXT SYS$INPUTG This is a short text file containing many lines which you can practiceJusing control-O (^O) on. Control-O is simple to use. Type it and furtherHoutput is disgarded. Type it again and output resumes to your terminal.JYou can use the VT100 NOSCROLL key to HALT/RESUME output to your terminal.KOn Non-VT100 terminals use control-S to halt output and control-Q to resumeoutput.J* ¨ * *J* * *J* * *J* Type ^O, Please * Type ^O, Please *J* * *J* * *J* * © *J* * *J**************************************************************************J* * *J* * *J* * *J* Type ^O, Please * Type ^O, Please *J* *ª *J* * *J* * *J* * *J**************************************************************************J* * *J* * *J* « * *J* Type ^O, Please * Type ^O, Please *J* * *J* * *J* * *J* * *J************************************************************¬**************J* * *J* * *J* * *J* Type ^O, Please * Type ^O, Please *J* * *J* * *J* ­ * *J* * *J**************************************************************************J* * *J* * *J* * *J* Type ^O, Please * Type ^O, Please *J* ® * *J* * *J* * *J* * *J**************************************************************************J* * *J* * ¯ *J* * *J* Type ^O, Please * Type ^O, Please *J* * *J* * *J* * *J* * *J********************************°******************************************J* * *J* * *J* * *J* Type ^O, Please * Type ^O, Please *J* * *J* * *J* ± * *J* * *J**************************************************************************J* * *J* * *J* * *J* Type ^O, Please * Type ^O, ² Please *J* * *J* * *J* * *J* * *J**************************************************************************$ Command="T TYPEXXXX1.TXT";$ Text="Type ^O (control-O) to discard output to terminal."$ Return="Comm³and_3"$ GOTO Do_Command $Command_3:$ Command="TYPE TYPEXXXX1.TXT"I$ Text="Press NOSCROLL to halt output. NOSCROLL again to restart output."$ Return="Command_4"$ GOTO Do_Command $Command_4:$ DELETE TYPEXXXX1.TXT;*.$ Command="TYP /OUTPUT=TYP123456.COM TYPE.SUB"D$ Text="Capture the output from the text file in another text file."$ Return="Command_5"$ GOTO Do_Command $Command_5:$ DELETE TYP123456.COM;*$$ Command="TYP /OUTPUT=NL: TYPE.SUB">$ Text="Output the data to a device ´other than your terminal."$ Return="Command_6"$ GOTO Do_Command $Command_6:6$ WRITE SYS$OUTPUT "" ! reset scrolling region$ PAGE9$ INQUIRE/NOPUN TMP "''EraseL23'Press RETURN when ready"$ EXIT$!______________$ EXIT $Do_command:'$ WRITE SYS$OUTPUT "''EraseL05'''Text'"$ WRITE SYS$OUTPUT ->"''Erasel07'Execute the command: ''Bold'''Command'''No_Bold'"$ WRITE SYS$OUTPUT -$"''EraseL11' ===================="($ WRITE SYS$OUTPUT "''EraseL12'[?4h",$ WRITE SYS$OUTPUT "''EraseL12'$ ''Command'"$ ON ERROR THEN CONTINUE $ 'Command'9$ INQUIRE/NOPUN TMP "''EraseL23'Press RETURN when ready"%$ WRITE SYS$OUTPUT "''EraseL23'[?4l"$ GOTO 'Return'ww