The SCL Debugger |
Abbreviation: | ENV |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
ENVIRONMENT <<entry-name\><line-num> | RUN> |
sets the developer environment at the first executable statement in the program in the specified entry. If the entry resides in the current catalog, then entry-name can be a one-level name. If the entry resides in a different catalog, then entry-name must be a four-level name, and the entry must already be loaded into the application's execution stack. A backslash must follow the entry name.
Details |
The ENVIRONMENT command enables you to display and modify the source program (that is, it sets a developer debugging environment) for any program in the application's execution stack while another program is active. When a developer environment is set, the debugger generates messages showing both the current program environment and the developer environment. In the developer environment, you can scroll through the source program, set debugging requests, and operate on the variables. For example, while TEST2.SCL is active, the ENVIRONMENT command enables you to display the source code for TEST1.SCL, reset the values of several variables in TEST1.SCL, and then return to TEST2.SCL.
By default, when you issue the ENVIRONMENT command from the current executing program without options, it sets the current program environment as the developer environment. If you issue the ENVIRONMENT command without an argument from a program other than the current program, the developer environment is reset to the program line containing the CALL DISPLAY statement.
Setting a developer environment does not change the way a program executes.
To return control to the active program, use the ENV RUN command to reset the environment to the active program, or use the GO, STEP or JUMP command to leave the developer environment and resume execution.
Example |
Assume that an execution stack looks like this:
TEST3.SCL line 37 TEST2.SCL line 24 TEST1.SCL line 10
The following examples illustrate valid ENVIRONMENT commands and describe their effect on the preceding execution stack:
Display the source of TEST1.SCL with line 10 in reverse video:
DEBUG> env test1.scl\10
The output to the debugger MESSAGE window is
env test1.scl\10 Stop at line 37 in MYLIB.MYCAT.TEST3.SCL Developer environment at line 10 in MYLIB.MYCAT.TEST1.SCL
Display the source of TEST2.SCL with line 45 in reverse video:
DEBUG> env test2\45
Return to the current program environment (TEST3.SCL at line 37):
DEBUG> env run
Attempt to return to the program TEST4.SCL:
DEBUG> env test4\
Because TEST4.SCL is not in the SCL execution stack, the SOURCE window still displays TEST3.SCL. The output to the debugger MESSAGE window is
Program TEST4 is not active
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.