The Program Component

What is the Program Component?

Application Dispatcher applications consist of program components and input components. The name program component is a convenient name for the part of the Application Dispatcher application that runs on the SAS server. There are four types of Application Dispatcher programs:
The input component is stored on the Web server and is the interface between users and the program component (or SAS). The input component of the Application Dispatcher application must pass a special variable named _PROGRAM. This variable names the program to run and also specifies the program type. The value for _PROGRAM is a three- or four-level name delimited by periods(.). The first level in the name indicates the Application Dispatcher program library where the program is stored. The last level in the name must be sas, source, scl, or macro.

SAS Programs

SAS programs are stored in external files, and these files must
  • have a .sas filename extension on directory-based platforms. The filename must match the combined second and third levels in the value of _PROGRAM.
  • be contained in a partitioned data set (PDS) on z/OS systems. The PDS member name must match the second level in the value of _PROGRAM.
SAS programs can contain a DATA step, procedures, and macro code. This is the only program type not stored in a SAS catalog. The program name is case sensitive if the Application Server platform is case sensitive. The proper query string syntax for specifying a SAS program is
_program=library.program.sas

Source Entries

Source entries are stored in SAS catalog entries with an entry type of SOURCE. They can contain the same code as SAS programs. The program names for source entries are not case sensitive. The proper query string syntax for specifying a program of this type is
_program=library.catalog.program.source

SCL Entries

SCL entries are stored in SAS catalog entries with an entry type of SCL. These entries contain SCL code that must be compiled. The program names for SCL entries are not case sensitive. The proper query string syntax for specifying an SCL entry program is
_program=library.catalog.program.scl
Note: There are many visual functions, objects, and routines in SCL that require a windowing environment. The Application Server normally does not run in an interactive windowing environment and cannot support visual SCL components. Using visual components in Application Server programs can produce unpredictable results and is not supported.

Macro Entries

Macro entries are stored in SAS catalog entries with an entry type of MACRO. They consist of compiled SAS macro language statements. These programs can be created with the STORE option in the %macro statement along with the SAS option SASMSTORE= to indicate a library. Using macro entries can speed up the execution of macro code when compared to SAS programs or source entries. Because the macro code contained within macro entries is stored in compiled form, there is a performance improvement. Names for macro entries are not case sensitive. The proper query string syntax for specifying a macro entry program is
_program=library.catalog.program.macro
SAS software automatically creates stored compiled macros in a catalog named SASMACR. The Application Dispatcher enables you to copy these macro entries to any catalog name and run them. They do not have to be in a catalog named SASMACR for the Application Dispatcher to access them.