Enabling Status Code Handling

Overview of Status Code Handling

When a data integration developer executes a job in SAS Data Integration Studio, notification of the job's success or failure can be handled in many ways:
  • It can be e-mailed to a person.
  • It can be written to a file.
  • It can cause the execution of an autocall macro.
A Status Handling tab is included in the property windows for jobs and for some transformations. Users can select options from a list of code conditions and actions on this tab. For example, a user can select a code condition such as successful and associate it with an action such as Send e-mail.
Before data integration developers can use some of the actions, you must set up the environment properly. Such setup is required for the following actions:
  • E-mail actions: You must set SAS system options for mail for the SAS Application Server that is used to execute jobs.
  • Custom actions: You must make a SAS macro autocall library accessible by the SAS Application Server that is used to execute jobs.
  • Send Entry to a Data Set: You must pre-assign the library that contains the data set to a SAS Application Server before the job or transformation executes.
For information about how to support the first two actions listed above, see the following subsections. For information about libraries, see the “Assigning Libraries” chapter of the SAS Intelligence Platform: Data Administration Guide.

Support the E-mail Action

Setting up the E-mail action is simple. Just add the appropriate SAS system options for e-mail to the configuration file ..\Lev1\appServer\sasv9_usermods.cfg. For example, if you are using the SMTP mail interface, you would add to this file the following options:
-emailsys smtp
-emailhost email-server
In this case, the value of email-server specifies the SMTP server that supports mail access for your site.
Note: The mail system options are documented in SAS Help and Documentation.

Support the Custom Action

Using the Custom action, a data integration developer can execute a macro in a macro autocall library in order to provide user-defined status handling for a job or transformation. On the administrative side, all you need to do is to make sure that the autocall library is known to the SAS Application Server. You do this by editing the file ..\Lev1\appServer\sasv9_usermods.cfg. By default, the file contains a line similar to this:
-sasautos ("SASEnvironment/sasMacro" SASAUTOS)
Add the library to the list of libraries in parentheses. The path to the library can be a full path or a path relative to ..\Lev1\appServer.