Compiling and Testing Applications

Introduction

To compile your SCL program in the build environment, you can select Buildthen selectCompile. You can also enter the COMPILE command or click the Compile icon on the toolbar. If the SCL entry was opened from within the frame, you can issue the COMPILE command with either the FRAME entry or the SCL entry as the active window, and both entries will be compiled.
You should also consider the following when compiling frames and their SCL entries:
  • If your FRAME entry uses an SCL program, you must compile the FRAME entry in order to associate the compiled SCL source with the FRAME entry.
  • The compiler produces a list of errors, warnings, and notes in the Log window. Open the Log window by issuing the LOG command or by selecting Viewthen selectLog.
Although you can compile an SCL program independently of its FRAME entry, the compiled code is associated with the FRAME entry only if you compile the SCL source either through the Source window that was opened from the frame or through the Build window that contains the FRAME entry.
You can also compile FRAME entries in batch or automatically.

Compiling FRAME Entries in Batch

You can use the BUILD procedure statement to compile in batch all of the FRAME entries in a catalog. However, you must use the ENTRYTYPE option to specify that the FRAME entries are to be compiled. When you use the COMPILE option without an ENTRYTYPE option, the BUILD procedure compiles only PROGRAM entries. For example, to compile all of the FRAME entries in the PAYROLL catalog (in the library that was assigned the libref DEPT), use the following statements:
proc build c=dept.payroll batch;
     compile et=frame;
run;

Compiling FRAME Entries Automatically

If you set a frame's automaticCompile attribute to Yes in the Properties window, the FRAME entry is compiled automatically when you issue the SAVE, END, or TESTAF command from that FRAME entry.

Testing Your Application

SAS/AF software provides a testing mode that is available from within the build environment. To test your application while your frame and SCL entry are open, you can select Buildthen selectTest. You can also click the TESTAF toolbar button or enter the TESTAF command.
As long as the SCL entry was opened from within the frame, you can issue the TESTAF command with either the FRAME entry or the SCL entry as the active window.
Note: You cannot use the TESTAF test mode if the FRAME entry is stored in a library that is accessed with SAS/SHARE software. Also, the TESTAF command does not process SUBMIT statements in your SCL code.
To test your application outside the build environment, you can do either of the following:
  • Open the Explorer window, select the frame to test, and then select Run from the pop-up menu.
  • Enter the following command:
    af c=libref.catalog.catalogEntry.entryType
Testing outside the build environment has no restrictions or limitations, and frames perform with complete functionality.