Chapter Contents |
Previous |
Next |
Debugger PROFILEs, Configuration Files, and EXECs |
Note:
You cannot use a PROFILE with debugger sessions in OS/390 batch.
abort |
install |
auto |
on |
break |
query |
config file |
set |
define |
system |
disable |
trace |
drop |
undef |
enable |
window off |
exec |
% (TSO only) |
help |
user-installed commands |
ignore |
Note:
The
config
file
command is used to specify your configuration file as
described in Setting Up a Configuration File.
Additional details about using the exec
command
in a PROFILE are provided in Executing EXECs or CLISTs from the Debugger.
When you start your program under the debugger (by
specifying '=d'
), your PROFILE executes automatically.
Next, the debugger passes control to the terminal on entry to main
(or, if the indep
option is used, to
the first function that is called
in your program) and sends the Cdebug: prompt.
When your PROFILE executes, no function is active (including
main
). For this reason, commands such as list
and continue
, which require
a function to be active, do not work in a PROFILE. Similarly, the assign
, copy
, and dump
commands, which
require a variable or object to be visible,
do not work because none have been defined on entry to the debugger. If the
PROFILE contains a user-installed command or an exec
(or %
) command, the same commands can be used
in the called EXEC or CLIST as in the PROFILE itself.
Setting Up a PROFILE under CMS |
PROFILE CDEBUG can be written in REXX or EXEC2. Debugger PROFILE CDEBUG (CMS) illustrates a debugger PROFILE CDEBUG under CMS.
Debugger PROFILE CDEBUG (CMS)
[1] arg filename say '****** Start of Debugger PROFILE' [2] say 'Running file' filename if filename = 'WORDCOUN' then do [3] 'exec wordcoun' else do [4] 'on main return break' 'exec gencmds' end 'break main *' [5] 'query' [6] say '******' rc 'actions active' [7] say '****** End of Debugger PROFILE' exit
/* Sample DEBUGGER PROFILE CDEBUG */ /* */ config file myconfig
The numbers in the previous example correspond to the following items:
exec wordcoun
is executed. WORDCOUN is the name of an EXEC that contains CMS commands.
on
command to break on return to main
; then, the debugger performs another exec
command by using the CMS EXEC GENCMDS.
main
.
query
command
is issued.
rc
variable
displays the number of debugger actions in effect as returned by query
.
Setting Up a PROFILE under TSO |
To set up a PROFILE under TSO, do the following:
address 'CDEBUG'
first_level_qualifier.CDEBUG.CLIST
exec
.
The first line of the CLIST should be the following:
PROC 1 pgmname
where you subsitute the program name for pgmname. This variable is determined by the following guidelines:
myprog
is
the command name and, therefore, it is also the program name:
alloc f(cplib) da(library.name) shr myprog =d
alloc f(cplib) da(library.name) shr c myprog =d
main
function has been compiled with the sname
option, the section name is the program name, as in the following:
call library.name(myprog) '=d'
main
, and _pgmnm
is not defined-then the program name
is UNKNOWN. See the SAS/C Compiler
and Library User's Guide, Third Edition for more information about
how the _pgmnm
variable can
be used.
The following example is a debugger PROFILE for TSO.
Debugger PROFILE CLIST (TSO)
[1] CONFIG FILE 'USERID.MY.CONFIGS(CONFIG1)' [2] WRITE ****** START OF DEBUGGER PROFILE ****** [3] WRITE running program &PGMNAME IF &PGMNAME NE UNKNOWN THEN DO [4] IF &PGMNAME = WRDCNT THEN DO [5] %wrdcnt END ELSE IF &PGMNAME = LINCNT THEN DO [6] %lincnt END ELSE DO [7] on main return break %gencmds END break main * ' [8] query [9] WRITE ****** &LASTCC actions active [10] END WRITE ****** END OF DEBUGGER PROFILE ******
PROC 1 PGMNAME /* Example DEBUGGER PROFILE CLIST (TSO) */ /*---------------------------------------------------------*/ CONTROL NOCAPS
The numbers in the previous example correspond to the following items:
wrdcnt
, the debugger executes
the wrdcnt
CLIST.
lincnt
, the debugger
executes the lincnt
CLIST.
main
, and executes
the gencmds
CLIST.
main
.
query
command
is issued.
Using a PROFILE to Select Full-Screen or Line Mode |
Note:
You can also alternate between full-screen mode and
line mode as described in Switching Between Full-Screen Mode and Line Mode.
Return Codes for Invalid Commands for the PROFILE |
See Setting Up a Debugger PROFILE, for a list of commands that are valid for use in a debugger PROFILE. If you pass an invalid command to the debugger when you enter the debugger, you receive a return code of -3.
Note:
Since the PROFILE is a special-purpose CLIST or EXEC,
return codes for debugger commands that are valid in a PROFILE are the same
as those that are discussed in Return Codes.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.