space
Previous Page | Next Page

Adding SAS Component Language Programs to Frames

Debugging and Optimizing Your Applications

You can use the SCL Debugger to debug your frame SCL programs. The SCL Debugger is a powerful interactive utility that can monitor the execution of SCL programs. To use the debugger, issue the DEBUG ON command, selectBuild [arrow] Debug [arrow] Debug On or click the Debug toolbar icon. After you turn on the Debugger, you must recompile your SCL.

See SAS Component Language: Reference for details on using the SCL debugger.


Common SCL Debugger Commands

The following table describes some of the common SCL Debugger commands that you can use to track errors in your SCL programs:

Command Description
BREAK sets a breakpoint at a particular executable program statement. When the Debugger encounters a breakpoint, program execution is suspended and the cursor is placed at the DEBUG prompt in the Debugger's Message window.
DELETE removes breakpoints, tracepoints, or watched variables that were previously set by the BREAK, TRACE, and WATCH commands.
DESCRIBE displays the name, type, length, and class attributes of a variable.
EXAMINE displays the value of a variable or an object attribute.
GO continues program execution until a specified statement or until the next breakpoint or end of program is encountered.
JUMP restarts program execution at a specified executable statement, which may skip intermediate statements.
LIST displays all of the breakpoints, tracepoints, and watched variables that have been set by the BREAK, TRACE, and WATCH commands.
PUTLIST displays the contents of an SCL list.
QUIT terminates the Debugger.
STEP steps through the program, statement by statement. By default, the ENTER key is set to STEP.
TRACE sets a tracepoint. When a tracepoint is encountered, the Debugger displays relevant information in the Message window and continues processing.
WATCH sets a watched variable. If the value of a watched variable is modified by the program, the Debugger suspends execution at the statement where the change occurred. The old and new values of the variable are displayed in the Message window.


Optimizing the Performance of SCL Code

You can optimize the performance of SCL programs in your applications with the SAS/AF SCL analysis tools.

The following table lists the available tools and provides information about when you might want to use each tool.

Use the... when you want to...
Coverage Analyzer monitor an executing application and access a report that shows which lines of SCL code are not executed during testing.
List Diagnostic Utility monitor an executing application and access reports on the use of SCL lists, including any lists that are left undeleted.
Performance Analyzer monitor an executing application and identify any bottlenecks in an application's SCL code.
Static Analyzer access reports that detail SCL code complexity; variable, function, method and I/O usage; and error and warning messages.

To display a menu of the SCL analysis tools, enter sclprof at the command prompt. For detailed information about using these tools, refer to the SAS/AF online Help.

space
Previous Page | Next Page | Top of Page