SRD is a do-all directory utility. There is so much to know about it that you SHOULD read the SRD V6.4 User's Manual before using it. Type HELP SRD NEW for switches which are new in V6.4. Available switches: /00 Wild UFD [0,0] /MI:n Middle Directory (2 types) /AE:xx Select on/after date(/time) /MU Select Multi-Header Files /AF:xx Select after date(/time) /NA Sort by name first /AT Attach output dev if TTY /NE Select Files not Specified /BE:xx Select on/before date(/time) /NV:n Select most recent versions /BF:xx Select before date(/time) /OV:n Select Obsolete Versions /BK File names preceded by 2 blanks /PA Pack file names (remove blanks) /CM:xx:xx Generate command file format /PU:n Purge the directory /CO Select Contiguous Files /RD Use Revision Date /DA:xx Select on date(/time) /SD:xx Selectively Delete Files /DE Delete Files /SE:xx Use special wildcards /ER Files with header read errors /SI Print available Buffer Size /FI:n Select file with File ID n /SM Include Summary lines /FO:[g,m] Select files by file owner /SP Spool the Output File /FU:n Full Directory /SR:x:x:x Sort the Directory /GT:n Select files of size >= n /SV:n Select Most Recent Versions /HD Cmd line shown in Header /SY Wild system UFD's /HE Give brief help /TB Include block total in summary /HV:n Select by Version Number /WB Write Back the Directory /ID Print current Version of SRD /WD Implicit wild delete /LI:n Brief directory /WI Implicit wildcard /LO Select Locked Files /ZE Select zero-blocks-used files /M2 Type 2 middle directory For help on a given switch type HELP SRD For help on switch defaults type HELP SRD SWITCH DEFAULTS or HELP SRD DEFAULTS 2 SWITCHES SRD V6.4 Switches /00 Wild UFD [0,0] /MI:n Middle Directory (2 types) /AE:xx Select on/after date(/time) /MU Select Multi-Header Files /AF:xx Select after date(/time) /NA Sort by name first /AT Attach output dev if TTY /NE Select Files not Specified /BE:xx Select on/before date(/time) /NV:n Select most recent versions /BF:xx Select before date(/time) /OV:n Select Obsolete Versions /BK File names preceded by 2 blanks /PA Pack file names (remove blanks) /CM:xx:xx Generate command file format /PU:n Purge the directory /CO Select Contiguous Files /RD Use Revision Date /DA:xx Select on date(/time) /SD:xx Selectively Delete Files /DE Delete Files /SE:xx Use special wildcards /ER Files with header read errors /SI Print available Buffer Size /FI:n Select file with File ID n /SM Include Summary lines /FO:[g,m] Select files by file owner /SP Spool the Output File /FU:n Full Directory /SR:x:x:x Sort the Directory /GT:n Select files of size >= n /SV:n Select Most Recent Versions /HD Cmd line shown in Header /SY Wild system UFD's /HE Give brief help /TB Include block total in summary /HV:n Select by Version Number /WB Write Back the Directory /ID Print current Version of SRD /WD Implicit wild delete /LI:n Brief directory /WI Implicit wildcard /LO Select Locked Files /ZE Select zero-blocks-used files /M2 Type 2 middle directory For help on a given switch type HELP SRD For help on switch defaults type HELP SRD SWITCH DEFAULTS or HELP SRD DEFAULTS 3 DEFAULTS @SRDDEF 2 DEFAULTS @SRDDEF 2 NEW New SRD switches for V6.4 are: /CM:xx:xx Generate command file format /ER Files with header read errors /FI:n Select file with File ID n /FO:[g,m] Select files by file owner /GT:n Select files of size >= n /NV:n Select most recent versions /PA Pack file names (remove blanks) /SR:x:x:x Sort the Directory /TB Include block total in summary Type HELP SRD for details on any switch. 2 /LI Produce a BRIEF Directory Listing (/LI:n) This just lists the filename, extension and version of the files that meet the specification given. The output is sorted, by default, into the order:- Ascending on File Extension then Ascending on File Name then Descending on File Version In addition a header and trailer line are output for each UFD. The header line contains the name of the UFD, the current date and time, and the command line that was originally used. The trailer line contains the number of files selected, and the total number of files in the directory. If one of the switches /MI, /FU, /AE, /AF, /BE, /BF or /DA is specified the total number of blocks used/allocated (for those files selected) is also listed. This switch can be negated and used to suppress the listing that usually accompanies some of the other switches (e.g. /WB or /PU) - in which case just the header and trailer lines are printed. If n is specified, it defines the width of the listing (72 to 132) - if not it defaults to the device buffer size. 2 /MI #M2 2 /M2 Produce a MIDDLE Directory Listing (/MI:n, /M2) This acts similarly to the /LI switch, except that it lists out more information. The extra information listed out depends on the setting of the /M2 switch and is either (/M2 not specified):- Creation Date and Time Revision Date and Time Revision Number or (/M2 specified):- Number of Blocks Allocated to File End of File Block Number (C)ontiguous/(L)ocked/(M)ultiheader Flags File ID Revision Date and Time (Creation Date if /-RD specified) 2 /FU Produce a FULL Directory Listing (/FU:n) This acts similarly to the /LI switch, except that it lists out yet more information, i.e. Number of Blocks allocated to File End of File Block Number (C)ontiguous/(L)ocked/(M)ultiheader Flags File ID Owner UIC Protection Codes Creation Date and Time Revision Date and Time Revision Number Note that while a file is being created SRD will list the blocks allocated as 0, rather than the value PIP produces, because the header is not yet set up properly. n, if specified, has the same effect as that for the /LI switch. 2 /NA Change the Sort Order (/NA) If this switch is specified the output sort order is altered to be:- Ascending on File Name then Ascending on File Extension then Descending on File Version 2 /NE Select Files not Specified (/NE) If this switch is specified then all files that do not meet the given specification are listed out. 2 /HV Select Files by Version Number (/HV:n) This switch lists out all files which meet the given specification whose version number is greater than or equal to n. If not specified, n defaults to 2. 2 /SV #/NV 2 /NV Select Most Recent Versions of Files (/NV:n or /SV:n) This switch lists out the latest n versions of all files that meet the given specification. If not given, n defaults to 1. If n is -1 then this lists out the oldest version of the file. 2 /OV Select Obsolete Versions of Files (/OV:n) This switch restricts the listing of file names to all versions except the "n" highest versions. The default value for "n" is 1. For a given "n", /OV:n lists file names not listed by /SV:n, and the files listed are those that would be deleted if /PU:n were specified. As indicated by the definition, if n is -1 then all but the oldest version are listed out. 2 /AE #DA 2 /AF #DA 2 /BE #DA 2 /BF #DA 2 /DA Select Files by Date/Time (/AE,/AF,/BE,/BF,/DA) Each of these switches takes an optional date and/or time as parameter, in the form dd-mmm-yy hh:mm, or hh:mm dd-mmm-yy, etc. e.g.: /DA:03-DEC-79 10:30 (In fact the date may be specified as ddmmmyy if desired). If no date is specified, today's date is assumed. If no time is specified, time checks are ignored. Then /AE lists all files created on or after the given date/time /AF lists all files created after (but not on) the given date/time /BE lists all files created on or before the given date/time /BF lists all files created before (but not on) the given date/time /DA lists all files created on the given date/time For these switches the listing includes the Revision Date and time. If the /-RD switch is specified then the Creation Date is used for the checks and the listing includes the Creation Date and Time. 2 /SE Use full wildcards in filename (/SE:filespec) Because of the parsing structure in RSX, it is impossible to have wildcards for letters in the Input Filespec, and so this switch is included to allow the facility. The filespec argument it takes is identical to that defining the Input Filespec with the following additional features:- (i) % (or ?) matches one wildcard character. (ii) * matches any number (including zero) of wildcard characters. Any combination of these characters may be used in any of the filename, extension or version number fields. Note that within each field, if an * is specified somewhere, and the final character is not an * then that final character is assumed to be required as the last character of the field. (e.g. *D will match FRED but not FREDA *D* will match either). Example: Suppose we have the files:- FRED, FREDA, FREDERIK, FEED, FILD, FEEDER, FRIED, FD then /SE:F%%D will match FRED, FREDA, FREDERIK, FEED, FILD,FEEDER (if /WI specified) /SE:F%%D< will match FRED, FEED, FILD (if /WI not specified) /SE:F*D will match FRED, FEED, FILD, FRIED, FD /SE:F*D* will match everything. (Note that /SE cannot be used in combination with a standard Input Filespec). 2 /DE Delete Files (/DE) This switch deletes (and lists) all files that meet the given specification. 2 /PU Purge the directory (/PU:n) This switches purges all but the highest n versions of all files meeting the Input File Specification and lists those purged. If not specified, n defaults to 1. If n is -1 then all but the oldest version of the specified files are purged. 2 /SD Selectively Delete Files (/SD:filespec) This switch lists all the files that meet the given specification, and for each one prompts the user to see if he wants to delete it. The filespec, if given, follows the same rules as for /SE. There are five allowable replies:- Y = Delete this file N = Do Not Delete This File G = Delete the rest of the specified files Q = Exit without deleting any more files CTRL-Z = Terminate the sequence and return to command level Any other response is interpreted as "N" (NO). If "G" (GO) is entered, the question "ARE YOU SURE?" is asked in order to be sure that it is the proper response. 2 /SP Spool the Output File (/SP) If this switch is specified then the output file (if one was specified) is spooled to the Print Spooler (PRT...). In addition, if a multiple-UIC search is being done, SRD inserts a form feed before each new UIC. 2 /WB Write Back the Directory File (/WB) If this switch is specified then as well as producing a listing, SRD writes the file headers back to the UFD in the order of the listing. This means both that the UFD is compressed (which could speed up FCS operations) and that future PIP operations will proceed in the sorted order given. A particularly useful application of this is SRD [0,0]/WB which will sort the UFD files, so that SRD [*,*]/LI will then list files in numeric order of directories as well as sorted on filename, etc. Write Access to the directory is required and Write Failure is usually due to a protection violation. In the event of a write-back failure, the operation is attempted several times. 2 /RD Use Revision Date (/RD) On the date selection, use the revision date (if any). In addition, if this is used for a /MI (/M2) listing the Revision Date will be listed instead of the Creation Date. 2 /SR Sort the Directory (/SR:x:x:x:x) Sort the file names. This option is turned off if the files are not being listed or written back. You can also say /-SR to get the files listed in the order they are in the directory. This is the same order that PIP lists them. If you do not care about the order of files listed, specify /-SR to speed up the directory search. The major and minor keys for the sort may be specified as values in the /SR: switch. The major key appears first. The first letter of each sort key specifies the field to sort: N - File Name; T - File Type; V - File Version; D - File Date A sort key letter followed by the letter D (e.g., TD) specifies a descending sort. The sort will be ascending if no character or any character other than D follows the key letter. If sorting on file date, the creation date is used if /-RD, and the revision date is used if /RD. The default is /SR:T:N:VD for /-NA. It is /SR:N:T:VD for /NA. If only one or two of these three keys are given, the other keys are still used according to the default ordering. For example, /SR:ND implies /SR:ND:T:VD. In order to specify one of the version selection switches (/NV, /SV, /OV, or /PU), Name and Type must be the first two sort keys (either order), and Version must be the third key. 2 /SY Include System UFD's in Wildcard Searches (/SY) If this switch is specified then all system UFD's (i.e. those with a group code between 0 and 10 inclusive) will be included in [*,*] or [*,n] searches. If it is switched off (/-SY) then such UFD's will be ignored. This switch (or it's negation) has no effect unless the group code of the specified UFD is wild. 2 /00 Include [0,0] in Wildcard Searches (/00) If this switch is specified then [0,0] will be included in [*,*], [0,*] or [*,0] searches. If it is switched off (/-SY) then [0,0] will be ignored. [0,0] can always be listed by specifying it directly. 2 /WD #WI 2 /WI Treat all specifications as 'wild-carded' (/WI, /WD) One of the great powers of SRD is the ability to specify just, say, S as a filename and get a listing of all files with a filename beginning with S. It is, however, also desirable at times to be able to specify that you want only files with a filename of S on its own. The switch /WI controls this - with 'implicit wildcarding' assumed if it is specified, but not if it is negated (see /SE for an example). In addition /WD specifies whether the 'implicit wildcarding' indicated by /WI also applies during delete/purge operations (yes if specified, no if negated). Note that if /-WI is specified, FRED will still be read as FRED.*, but FRED. will only look for files (called FRED) with a null extension. 2 /CO Select only Contiguous Files (/CO) This switch causes SRD to select only files which are contiguous. 2 /LO Select only Locked Files (/LO) This switch causes SRD to list only files which are locked. It is useful in combination with a deletion switch (/DE or /SD) to delete locked files from a directory or disk 2 /MU Select only Multi-Header Files (/MU) This switch causes SRD to list only files which have multiple headers. 2 /ZE Select only zero-blocks-used files (/ZE) This switch causes SRD to list only those files which have zero blocks used. It is useful in combination with a deletion switch (/DE or /SD) to delete zero-blocks-used files from a directory or disk. 2 /GT Select only files which have n or more blocks allocated (/GT:n) This switch causes SRD to list only those files which have at least n. blocks allocated. 2 /FI Select file with File ID n (/FI:n) Select files with File IDs n1, n2, n3, n4 (/FI:n1:n2:n3:n4) This switch causes SRD to list the file which has the file IDs specified in the switch. Up to four file IDs may be specified in this command. Only the first part of the file ID should be given, without the sequence number. This may be helpful when a utility such as BRU prints an error message listing a file ID without a file name, or with the name which appears in the header, but which has been renamed since being created. 2 /FO Select files with file owner [g,m] (/FO:[g,m] or /FO:g:m) Select files with file owner other than [g,m] (/-FO:[g,m] or /-FO:g:m) The switch /FO:[g,m] instructs SRD to select files with file owner [g,m]. You may specify a wildcard (as a zero or *) for either the group number g or the member number m. In the alternate form /FO:g:m, a wildcard must be specified as a zero (* is not allowed). When specifying /FO alone without the group and member, the UIC of the directory being listed is used as the default. The switch /-FO:[g,m] selects files with file owner other than [g,m]. Wildcards and the alternate form /-FO:g:m may be used just as when the switch is not negated. Specifying /-FO alone without the group and member selects the files in the directory being listed which are not owned by that directory. Examples: SRD [*,*]/FO:[7,7] lists all files owned by [7,7]. SRD [223,*]/-FO:[223,*] lists all files in group 223 which are not owned by that group. SRD [*,*]/-FO lists all files which are not owned by the directory in which they reside. 2 /ER Select directory entries with file header read errors (/ER) The directory maintenance switch displays the names of files in the directory which cause errors when attempting to read their headers. 2 /ID Print out the current Version of SRD (/ID) This option will display the current version of SRD. 2 /SI Print out the available Buffer Size (/SI) This option will display the size of SRD's buffer which it uses to read the directory files into memory. This switch is for diagnostic purposes only, and can be used to determine how large a directory file can be processed by SRD. On RSX-11M/M+, the buffer size will be that prior to the task's extending itself. SRD on these systems dynamically expands and contracts as required for each directory that it processes. If you have given a wild-card UFD specification, SRD contracts to its original size after processing each directory, then expands as required to process the next directory. 2 /AT Attach output device if terminal (/AT) If this switch is specified then the output device (if it is a terminal) will be attached during the operation. This has the advantage of allowing CTRL-O to be used to suppress any listing, and the disadvantage of tying up the terminal during what could be a long search. 2 /HD Print command line in header (/HD) This switch causes SRD to print the command line issued in the header following the line showing the UIC. (Some special characters do not appear exactly as specified, since SRD changes colons and semi-colons before passing the line to the command string interpreter.) 2 /SM Print summary lines (/SM) This switch causes SRD to print a summary line following the files listed for each directory stating the number of files selected and the total number of files in the directory. If switch /FU, /MI, /DA, /AF, /AE, /BF, or /BE is specified, then and additional summary line will give the number of blocks used and allocated for the files selected. 2 /BK Precede each file name with two blanks (/BK) This switch causes SRD to insert two blank characters ahead of the file name on each file listing line. (Some widely used previous versions of SRD inserted these two blanks, while others did not. This switch gives you a choice.) 2 /TB Include block totals in summary lines (/TB) This switch causes SRD to always calculate and include in the summary lines the number of blocks used/allocated even if it would not otherwise appear. For example, /OV/-LI shows only the number of files, not the total number of blocks. /OV/-LI/TB does show the block total. 2 /PA Pack the file names (/PA) Set this switch to eliminate the blanks from the file names displayed by SRD. Normally SRD lines up the name, type, and version fields by padded the name and type fields with blanks if needed. 2 /CM Generate lines with command format (/CM:xxx:fffff) This switch produces a listing of files in a form suitable for a command file. That is, the output can contain, for each file, a line of the standard form xxx outfile,listfile=infile.typ;ver,infile where "outfile", "listfile", and "infile" are all the same name, that of each of the selected files. The field "xxx" represents the processor name, as provided in the first switch value of the /CM switch. The second switch value controls the actual format of the output line. This switch value can contain any of the letters "O", "L", "T", "V", and "S", in any order. The meaning of these letters is as follows: letter meaning O provide "outfile" field L provide "listfile" field T provide type for first "infile" V provide version number in first "infile" field S provide second "infile" field (always with version ";0") If the second switch value is not specified, then the default form for each output line is "infile" only. For example, if a user account contains only the files MAIN.MAC;10, SUB1.MAC;7, SUB2.MAC;2, SUB2.MAC;3, and SUB3.FOR;6, then the command >SRD MAINBLD.CMD=/SV/CM:MAC would produce file MAINBLD.CMD containing only the lines MAC MAIN MAC SUB1 MAC SUB2 MAC SUB3 and the command >SRD SUBASM.CMD=S*.MAC/SV/CM::TVLO would produce file SUBASM.CMD containing only the lines SUB1,SUB1=SUB1.MAC;7 SUB2,SUB2=SUB2.MAC;3 Such a file could be used in the subsequent command >MAC @SUBASM Any string not containing "/", ":", or "=" can be used for the processor name. That is, the processor name can include "@", or it can be a null string. Note that if /NV (or /SV) is not specified then the "V" should be used in the second switch value to avoid duplicate lines in the output file, for files that have multiple versions.