14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 4 <strong>Scripting</strong> Tools 65<br />

Debug Scripts<br />

4. Click Run again.<br />

The script runs until it hits the breakpoint. The results are shown in Figure 4.12.<br />

– stringFunction() is called, evaluated, and returns to the loop.<br />

– i is incremented and determined to be less than or equal to 9.<br />

– In the Globals list, i is now 1 and str is now “0”.<br />

Figure 4.12 Global Variables at First Breakpoint<br />

5. Click Run again.<br />

The script runs until it hits a breakpoint. The results are shown in Figure 4.13.<br />

– stringFunction() is called, evaluated, and returns to the loop.<br />

– i is incremented and determined to be less than or equal to 9.<br />

In the Globals list, i is now 2, and str is now “01”.<br />

Figure 4.13 Global Variables at Second Breakpoint<br />

You can continue to click Run and watch i and str change with each iteration of the loop. Or, click Run<br />

without breakpoints to complete running the script and exit the Debugger.<br />

Stepping Into, Over, and Out<br />

Step Into, Step Over, and Step Out offer flexibility when your script contains expressions, functions, or<br />

includes other JSL files.<br />

1. Open the scriptDriver.jsl sample script and click the Debug Script button.<br />

2. This script writes information to the log, so select the Log tab at the bottom of the Debugger to view the<br />

messages.<br />

3. Click Step Over.<br />

The first line in the script is evaluated.<br />

4. Click Step Over again.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!