1 READ Loads the global symbols contained in the specified file into the SDA symbol table. Format READ {/EXECUTIVE [directory spec] | /FORCE filespec [/RELOCATE =expression | /SYMVA=expression] | /IMAGE filespec | filespec} [ /[NO]LOG] 2 Parameters directory-spec Name of the directory containing the loadable images of the executive. This parameter defaults to SDA$READ_DIR, which is a search list of SYS$LOADABLE_IMAGES, SYS$LIBRARY, and SYS$SYSTEM. filespec Name of the device, directory, and file from which you want to read global symbols. The filespec defaults to SYS$DISK:[default- dir]filename.type, where SYS$DISK and [default-dir] represent the disk and directory specified in your last DCL command SET DEFAULT. If no type has been given in filespec, SDA first tries .STB and then .EXE. If no device or directory is given in the file specification, and the file specification is not found in SYS$DISK:[default_dir], then SDA attempts to open the file SDA$READ_DIR:filename.type. If no type has been given in filespec, SDA first tries .STB and then .EXE. If the file name is the same as that of an execlet or image, but the symbols in the file are not those of the execlet or image, then you must use the /FORCE qualifier, and optionally /RELOCATE and /SYMVA qualifiers, to tell SDA how to interpret the symbols in the file. The READ command accepts quoted filenames for access to images on ODS-5 disks with lowercase or compound characters in their names. 2 Qualifiers /EXECUTIVE /EXECUTIVE directory-spec Reads into the SDA symbol table all global symbols and global entry points defined within all loadable images that make up the executive. For all the execlets in the system, SDA reads the .STB or .EXE files in the requested directory. /FORCE /FORCE filespec Forces SDA to read the symbols file, regardless of what other information or qualifiers are specified. If you do not specify the /FORCE qualifier, SDA may not read the symbols file if the specified filespec matches the image name in either the executive loaded images or the current processes activated image list, and one of the following conditions is true: o The image has a symbols vector (is a shareable image), and a symbols vector was not specified with the /SYMVA or /IMAGE qualifier. o The image is sliced, and slicing information was not provided with the /IMAGE qualifier. o The shareable or executive image is not loaded at the same address it was linked at, and the relocation information was not provided with either the /IMAGE or /RELOCATE qualifier. The use of /FORCE [/SYMVA=addr][/RELOCATE=addr] filespec is a variant of the /IMAGE qualifier and avoids fixing up the symbols to match an image of the same name. /IMAGE /IMAGE filespec Searches the executive loaded image list and the current process activated image list for the image specified by filespec. If the image is found, the symbols are read in using the image symbol vector (if there is one) and either slicing or relocation information. This is the preferred way to read in the .STB files produced by the linker. These .STB files contain all universal symbols, unless SYMBOL_TABLE=GLOBAL is in the linker options file, in which case the .STB file contains all universal and global symbols. /LOG /LOG /NOLOG (D) The /LOG qualifier causes SDA to output the %SDA-I-READSYM message for each symbol table file it reads. By default, these messages are suppressed. You can specify /LOG and /NOLOG with any other combination of parameters and qualifiers. /RELOCATE /RELOCATE=expression Changes the relative addresses of the symbols to absolute addresses by adding the value of expression to the value of each symbol in the symbol table file to be read. This qualifier changes those addresses to absolute addresses in the address space into which the dump is mapped. The relocation only applies to symbols with the relocate flag set. All universal symbols must be found in the symbol vector for the image. All constants are read in without any relocation. If the image is sliced (image sections are placed in memory at different relative offsets than how the image is linked), then the /RELOCATE qualifier does not work. SDA compares the file name used as a parameter to the READ command against all the image names in the executive loaded image list and the current processes activated image list. If a match is found, and that image contains a symbol vector, an error results. At this point you can either use the /FORCE qualifier or the /IMAGE qualifier to override the error. /SYMVA /SYMVA=expression Informs SDA whether the absolute symbol vector address is for a shareable image (SYS$PUBLIC_VECTORS.EXE) or base system image (SYS$BASE_IMAGE.EXE). All symbols found in the file with the universal flag are found by referencing the symbol vector (that is, the symbol value is a symbol vector offset). 2 Description The following MACRO program can be used to obtain symbols in addition to those in SYS$BASE_IMAGE.EXE: .TITLE GLOBALS $PHDDEF GLOBAL ; Process header definitions $DDBDEF GLOBAL ; Device data block $UCBDEF GLOBAL ; Unit control block $VCBDEF GLOBAL ; Volume control block $ACBDEF GLOBAL ; AST control block $IRPDEF GLOBAL ; I/O request packet ; More can be inserted here .END Use the command below to generate an object module file containing the globals defined in the program. $MACRO GLOBALS+SYS$LIBRARY:LIB/LIBRARY /OBJECT=GLOBALS.STB SDA can also read symbols from an image .EXE or .STB produced by the linker. The STB and EXE files only contain universal symbols. The STB file, however, can be forced to have global symbols for the image if the SYMBOL_TABLE=GLOBAL option is used in the linker options file. If you do not specify a file type, .STB is used by default. If a .STB file is not found, SDA then tries a .EXE file. A number of ready-built symbol table files ship with OpenVMS Alpha. They can be found in the directory SYS$LOADABLE_IMAGES, and all have names of the form xyzDEF.STB. Of these files, SDA automatically reads REQSYSDEF.STB on activation. The symbols in the other files can be added to SDA's symbol table using the READ command.