Previous Page | Next Page


Compiling SCL Programs

You must compile SCL programs before testing or executing an application. The SCL compiler translates your SCL application into an intermediate form that can be executed by the SCL interpreter. In the process of translating your application, the compiler identifies any syntax errors that are present. You should correct these errors and compile the code again until the program compiles without errors. If there are errors in the program, then no intermediate code is produced, and running the entry produces a message stating that the entry has no code.

The compiler produces a list of errors, warnings, and notes in the Log window. A program that compiles with no errors or warnings produces a message like the following in the message line of the Source window:

Code generated for SALES.FRAME. Code size=2649.

Compiling Your SCL Program Interactively

Note:    You must save frames before you can compile them.  [cautionend]

You can compile frames, program screens, and SCL programs by issuing the COMPILE command in the Build window or by selecting Compile from the pull-down menus. In the Build window for frames or SCL programs, select Build [arrow] CompileIn the Build window for program screens, selectRun [arrow] Compile

You can also compile FRAME, PROGRAM, and SCL entries from the SAS Explorer. If your SCL code is associated with a frame or a program screen, then you must compile the FRAME or PROGRAM entry in order for the associated code to be compiled correctly. The SCL code is compiled when you compile the FRAME or PROGRAM entry. If your SCL code is not associated with a FRAME or PROGRAM entry, then you compile the SCL entry. To compile an entry from the Explorer, select the entry, then select Compile from the pop-up menu.

If you compile a FRAME or PROGRAM entry that does not have any associated SCL code, the SCL compiler displays an error message.

Compiling Your SCL Program in Batch

To compile your SCL application in batch, run PROC BUILD with the COMPILE option:

The default entry type is PROGRAM. If you do not specify an entry-type, then all PROGRAM, FRAME, and SCL entries in the catalog are compiled. All PROGRAM, FRAME, and SCL entries in an application must be compiled before the application can be executed.

If you compile a frame in batch, and the compiler cannot find the associated SCL source, the frame will not compile.

The SCL Data Vector

Compiling an SCL program opens a temporary storage area called the SCL data vector (SDV). The SDV holds the values of all window, nonwindow, and system variables that are used in the application.(footnote 1) Areas in the SDV are created automatically for system variables as well as for window variables for all controls in the application window, even if the variables are not used in the SCL program. SCL Data Vector for a Typical Application shows the SDV for an application that uses the window variables NAME, HEIGHT, AGE, and WEIGHT and the nonwindow variables HFACTOR and WFACTOR.

SCL Data Vector for a Typical Application

[SCL Data Vector for a Typical Application]

FOOTNOTE 1:   The SDV is similar to the program data vector (PDV) that is created by base SAS software when it compiles a DATA step. The program data vector holds the values of the variables that are defined in the DATA step. [arrow]

Previous Page | Next Page | Top of Page