PING
0.9
Statistical data handling and processing in production environment
|
Currently, SAS macros in PING
library are made available through the autocall
functionality, i.e. they are retrieved by providing SAS with their actual location. In the future, they will be saved as stored processes (/ store
option) and, therefore, will be retrieved through the MSTORED
option.
There are then different ways to set your environment so as to be able to load and run available PING
macros, depending whether you are already running a SAS session, e.g. employing:
or not, e.g. launching SAS:
Hence, depending on your context, you can follow any of the methods described in the instructions below. Note that our preference for the settings goes to the last two methods. In particular, the last one being preferred for users running on SAS EG.
autocall
directlyYou will first need to set the path of your install, then you will be able to configure the SASAUTOS
environment (defining where to look for macros) using the corresponding keyword with options
as follows:
This way you will be able to run PING
macros. However, this command alone will not allow you to load/set all default configuration parameters (e.g. global variables) associated to the PING
library.
_default_setup_
) macroIn order to load all PING macros, as well as associated default configuration parameters, we provide a configuration file named _setup_.sas
(documentation here; file is located in the directory library/autoexec
). You can then set your SAS environment with something similar to the following command:
Note however that this will work only if you have not already set your SASAUTOS
environment using (e.g. using the options SASAUTOS
command like above) since SASAUTOS
can be set once only. So as to avoid launching the options SASAUTOS
several times, you can put the setup commands above inside a conditional macro as follows, and launch it during your SAS session (or every time you use a PING
macro, since it will have no effect, though it will not be very elegant), e.g.:
Note moreover that you can implement your own default configuration and load it similarly.
autoexec
file to launch your SAS sessionThe commands above can be inserted into a file that will be automatically loaded (and ran) by SAS at launch time. This feature is enabled by the so-called autoexec
option (see "Customizing Your SAS Session by Using Configuration and Autoexec Files"). In practice, a file (named cfg_SAS_PING.sas
with SAS version 9.2) shall be saved in your HOME
directory (or any other location), or created on-the-fly, so as to contain the following settings (similar to what is described above), e.g.:
Then, SAS can be launched by specifying this file in the -autoexec
option of the inline command, _.e.g._ (in general, you will need to be on the SAS server for this command to run):
granted that the location of SAS software has been added to your PATH
(otherwise, in our case we would run <SAS_SERVER>/sas/bin/SAS92/SASFoundation/9.2/sas
), and considering the configuration file has been saved as library/autoexec/cfg_SAS_PING.sas
.
Further, we provide the bash script sas_ping.sh
(located in practice in library/bin/`) as an alias for this operation to be performed on-the-fly (hence, no need to create the configuration file beforehand), e.g.:
will launch your SAS session with all desired settings.
autoexec
workflow with your SAS EG sessionThe autoexec
feature of SAS EG can be used to load all PING
settings, _.e.g_ by creating an autoexec
workflow in your project, and either:
cfg_SAS_PING.sas
(recommended), or _setup_.sas
(located in library/autoexec
) and linking to an embedded program that runs (only) %_default_setup_;
. SAS EG will then submit the programs associated to the autoexec
workflow when your Workspace Server session is created on the SAS Server (see "Writing code in SAS Enterprise Guide"). This occurs at launch time of SAS EG.
To be developed...