Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://xmm.vilspa.esa.es/sas/6.0.0/doc/devel/externdevel.html
Дата изменения: Wed Aug 9 16:29:06 2000
Дата индексирования: Sat Dec 22 12:21:26 2007
Кодировка:
Поисковые слова: р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п р п
|
External SAS packages
Using external packages
It is possible to incorporate in the SAS software packages that are
not part of the official SAS distribution. These we call 'external
packages'. All that is needed is to set the environment variable
SAS_PATH to point to all directories that contain SAS components, in
the form of a colon-separated list. It is required that these
additional component are structured as proper SAS extension, as
explained in the following section.
Assume that a user wants to use the official SAS distribution in
/usr/sas, local additions in /usr/local/sas, and his own additions in
$HOME/sas. He will have to set the SAS_DIR and SAS_PATH environment
variable and call the sas-setup script (preferably in a login script),
e.g. (csh):
setenv SAS_DIR /usr/sas
setenv SAS_PATH $HOME/sas:/usr/local/sas:$SAS_DIR
source /usr/sas/sas-setup.csh
With this setup
- the binaries that are installed in the bin
subdirectories of the directories in SAS_PATH are in the search
path,
-
the executables will look for their config files in the config
subdirectories of SAS_PATH,
-
the documentation will contain links to the HTML pages in the doc
subdirectories of SAS_PATH.
Developing external packages
Packages can be developed outside the official SAS distribution. To develop
packages outside the distribution:
-
Create a directory (e.g. mysas),
-
Add this directory to the environment variable SAS_PATH (preferably in
the login script),
-
Create a subdirectory packages.
The simplest way to fill this with the proper content is to copy the structure
of the SAS distribution. The Makefile in the toplevel directory should
contain:
SUBDIRS = packages
MKDIRS = lib bin include doc config
include $(SAS_DIR)/Make.include
packages/Makefile should contain:
SUBDIRS = <list of all packages>
include ${SAS_DIR}/Make.include
In the packages subdirectory one can develop tasks just as they are developed
within the SAS distribution (see the task development
documentation). This results in packages that are placed in the
subdirectory packages. The Makefiles in all subdirectories set
the appropriate variables and includes $SAS_DIR/Make.include.
Doing a make in the toplevel directory (mysas)
compiles the packages and creates symbolic links. After this the new code
and data is available to the SAS.
To make your local SAS tree compatible with the main SAS one, the
toplevel directory (e.g. mysas) should contain the
subdirectories lib, bin, include,
doc and config.
-
lib should contain all public libraries or symbolic links to them.
-
bin should contain all public executables or symbolic links to
them.
-
include should contain subdirectories that contain the include
files. There should be a subdirectory for each public library and with
the same name as the library, or a symbolic link of that name.
-
doc should contain files with a .ref extension; each of these
files should contain a URL to the associated HTML page.
-
config should contain all the config files, or symbolic links
to them.
These conventions are automatically followed once the make file in the
top directory (mysas) is created as indicated above.
Updated on: August 9, 2000