SORTOC 5R3B -- Program File Table of Contents Sorter
SORTOC is a utility for perusing the table of contents of one or more program files from a demand terminal. A specially formatted listing, one element per line, will be output. In addition, various sorting and selection options are available to specify particular elements to list.
SORTOC is "read-only" in that it does not directly modify any input files.
To use SORTOC, type: @SORTOC filename.
This will default to an alphabetical listing of all elements in the file, both deleted and undeleted. The listing will pause about every 20 elements; press XMIT to continue, or type X to exit. If filename is omitted, TPF$ is assumed.
Any combination of the S, R, A, or O options may be used to select only source, relocatable, absolute, or omnibus elements for the listing.
The U option may be included to select only undeleted elements.
Add the Q option to have the elements listed in their original unsorted order; that is, the same order an '@PRT,T' would list them.
The B option will cause elements to be listed in reverse alphabetic or sequential order, depending on whether the Q option is present.
A number of selectors are available for listing after the filename to modify the output display for each element:
@SORTOC filename.,EP . List entry points
@SORTOC filename.,PR . List procedures
@SORTOC filename.,MS . Show sector address
The table of contents of the named file (TPF$ if omitted) will be read into storage. It will be sorted, and elements selected, according to options and other specifications. In most cases, the sorted elements will then be listed.
Finally, the sorted table of contents will be written out to the scratch file SORTOC$PRT-T. This scratch file may be input to SSG or the utility CRUN to process the selected elements from the original file in the sorted order. (This is possible because SSG and CRUN require only the table of contents of the scratch file and not any element text.) Example:
Before terminating, SORTOC prints a count of the elements selected during execution, followed by their total size. If any relocatable elements with preambles were selected, the total preamble size in [brackets] will follow the total element size. If zero elements were selected, there will be no display.
SORTOC will revise the procedure and entry point tables written to the scratch file, so that a @PRT,TL will show only those procedure and entry point names that correspond to the selected elements. The sequence number links for these items will reflect the sequence numbers in the sorted scratch file, rather than the original file.
SORTOC can read any type of program file (standard, LPF, LEPF, LPLE), and can accommodate close to 27,600 element entries, enough for a fully populated Large Program File or extensive Multi-File operations. LPLE is used here as shorthand for Large LEPF, a file that is both LPF and LEPF.
An element name and/or version, with optional masking, may be specified after the filename. If version masking is desired, the masking character used in the version must be A-Z, 0-9, $, -, or space, since an '*' would be rejected by the Exec. The 'MASK' parameter is then set to the octal value of the Fieldata mask character being used (6 for 'A', 61 for '1', etc. -- no leading 0). If MASK is 0 thru 4, '$' will be assumed. If the mask character is '-', MASK may be either 41 or an actual '-'. Examples:
MASK may be 5 (space) only if the mask characters are all trailing, rather than leading or embedded. Example:
The above example will select from the file all elements whose element name is PROG1 and whose version begins with ABC. To select blank versions, use a MASK other than 5, as in:
Finally, a "floating" mask may be used to search for the given string of characters anywhere in the version. This is accomplished by preceding the mask character with a plus. The example below will list all elements with element name 'UPDATE-PROG' that have the characters 'X9' anywhere in the version name (such as in '/X9', '/TEST-X9', or '/LEVX9B'):