Chapter Contents |
Previous |
Next |
Command Directory |
se{t}
set
command is best used in the debugger PROFILE
to specify search lists for source, include, and debugger files, as well as
a cache location for your debugger file. However, the
set
command may also be issued on the command line. The following reference section
describes both the
set search
subcommand and the
set cache
subcommand
The
set
command has two subcommands:
search
and
cache
. The
set search
subcommand is
used to control the search templates that are used to access debugger and
source files, and the
set cache
subcommand is used to specify a cache location for debugger files.
The
set cache
subcommand
also uses a template to specify this location.
The
set search
and
set cache
subcommands are described in the following paragraphs.
search
subcommand is used
to establish a search list, control tracing, and add or remove templates from
a search list. The
search
subcommand has the following
forms:
Format | Example |
---|---|
1 |
set search
FILE-TAG
=|+|-
"template1" ["template2" ...] |
2 |
set search
FILE-TAG
=
|
3 |
set search
FILE-TAG
|* ?
|
4 |
set search
FILE-TAG
|* trace
on|trace off
|
Format 1: This format of the
set
command specifies a search list for the type of files designated by FILE-TAG.
Each search list consists of one or more templates that are used by the debugger
to locate debugger or source file types.
The =|+|- argument is used as follows:
You can
include a percent character (
%
) in a template by specifying two percent characters successively
(
%%
).
The filenames generated by the application of the conversion
specifiers in the template are passed to the
fopen
function, which opens
the appropriate file for the debugger to access. If these files are located
on a remote host, the SAS/C Connectivity
Support Library is used to establish an NFS connection between the local and
remote host.
"path:dbgfiledir/%leafname"
If
%leafname
consists of a base and an
extension, a functionally equivalent template could be specified as follows:
"path:dbgfiledir/%basename.%extension"
A similar template could be specified to access files
on OS/390. For example, the following template would access a PDS member that
matches
%basename
:
"dsn:userid.proj4.h(%basename)"
Format 2: The second form of the
set search
subcommand is used
to remove all of the search templates associated with a FILE-TAG. It specifies
a null search list.
Format 3: The question mark (
?
)
character is used to display the search list associated with a FILE-TAG. An
asterisk (
*
) can be used as a wildcard character in place of
a specific FILE-TAG argument. Specifying
set search * ?
will display
the search lists for all debugger and source files, including the cache location,
if it was specified with a
set cache
subcommand.
Format 4: The final form of the
set search
subcommand is used to turn tracing on or off. When tracing is turned
on, the debugger displays a message each time it attempts to open a file,
possibly using a filename generated by a template. The message displays the
name of the file the debugger was looking for and whether or not the search
was successful.
An asterisk (
*
) can be used as a wildcard
character in place of a specific FILE-TAG argument. If an asterisk is specified
for the FILE-TAG, tracing will be affected (either turned on or turned off)
for debug, source, altsource, systeminclude, and userinclude files.
set search
subcommand and
set cache
subcommand.
For details on using search lists in a cross-development environment, see SAS/C Cross-Platform Compiler and C++ Development System: Usage and Reference, First Edition.
When the default search procedure for
a file does not meet your needs, it is possible to change this behavior by
using the debugger's
set search
subcommand.
The
set search
sub command is used to specify filename templates. Filename templates are used to specify the
identity and location of the source, include, or debugger files associated
with the load module being debugged. Multiple filename templates can be defined
for each type of file. So, when necessary, the debugger can search for a file
by more than one name or in multiple locations. Each template is saved in
a search list, and each search list is associated with a specific type of
file.
Filename templates are character strings, which are patterned
after the format argument of the
printf
function. Each filename template
can contain conversion specifiers and characters. A conversion
specifier is a character or a string preceded by the percent (%) character.
The conversion specifier is either replaced by its associated string or it
specifies the format of the conversion specifier that follows it. The resulting
string is used as the name of the file to be opened. If this fails, the next
filename template is processed until either a file is opened or no more filename
templates are in the search list for that type of file.
Note:
If you run the debugger under the UNIX System
Services shell, the filename string is interpreted as an OS/390 filename,
not as a POSIX filename. If you want to specify searching for a file in the
UNIX System Services hierarchical file system, you must begin the filename
with the
hfs:
filename style prefix.
set search
subcommand is issued, followed by a
list
command, the debugger attempts to load any
files that were not previously found, using the modified
set search
templates. For example, if an attempt
to load a source file fails because the source files have been moved to the
data set SASC.APPL.SOURCE, issuing the command
set search source+"dsn:sasc.appl.source(%basename)"followed by a
list
command causes the debugger
to reattempt the search for the source.
The
set
search
issued does not have to correlate directly to the failed search.
For example, a common problem encountered when debugging, is to forget to
allocate the DBGLIB data set definition. When the debugger fails to locate
the debugger file, a command such as
system alloc fi(dglib) dsn(appl.dbglib)shrcould be issued to allocate the Data Definition (DD) statement. A "dummy"
set search
subcommand could then be issued. For
example, the following command is followed by a
list
command that will cause the search to be reattempted:
set search altsource+""
set cache
subcommand is
used to specify a cache location for the debugger file. (In a cross-development
environment, the original debugger file may be located on the host workstation,
and the cache location will be on the target mainframe.) A cache location
is specified to provide faster access to debugging information.
The format for the
set cache
subcommand is
as follows:
Format:
set cache debug =
"template
"
Notice that
debug
is the only valid
type of file for the
set cache
subcommand.
hfs:
filename style prefix instructs the debugger to look for the file
in the HFS file system and open the file if it is found.
dsn:
style filename that
is searched if the user include file is not found on the workstation.
debugger start-up file | yes |
---|---|
command line | yes |
configuration file | no |
Source window prefix | none |
set
command is not affected
by changes in scope.
Successful: 0 | |
Unsuccessful: 1 |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.