Chapter Contents |
Previous |
Next |
loadd |
Portability: | SAS/C extension |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
ERRORS | |
CAUTION | |
PORTABILITY | |
IMPLEMENTATION | |
EXAMPLE |
SYNOPSIS |
#include <dynam.h> void loadd(const char *name, char **dp, MODULE *mp);
DESCRIPTION |
loadd
is similar to
loadm
(load executable module) except that it is intended for data modules.
loadd
loads the module
named by the argument
name
and stores the address of the load module's entry point in the location pointed
to by the second argument
dp
.
The third argument addresses a location where a value
is stored that can be used later to remove the module from memory via
unloadd
.
loadd
should be used only to load modules that
contain data (for example, translation tables) rather than executable code.
RETURN VALUE |
loadd
indirectly returns a value that is stored in the location addressed
by the third argument
mp
.
This value can be used later to remove the module from memory via
unloadd
. If the module to be loaded cannot be
found,
0
is returned.
ERRORS |
CAUTION |
The first argument string may be no more
than eight characters long, not counting a leading asterisk. Also note that
a module coded with
loadd
must contain at least 16 bytes of data following the entry point, or library
validation of the module may fail.
PORTABILITY |
loadd
is not portable. As with other dynamic-loading functions, be
aware of system-specific requirements for the location of modules to be loaded.
IMPLEMENTATION |
The implementation of
loadd
necessarily varies from operating system
to operating system. Under OS/390, modules to be loaded must reside in STEPLIB
or the system link list. Under CMS, modules to be loaded may reside in DYNAMC
LOADLIB or in other locations defined by use of the
addsrch
routine.
EXAMPLE |
The following example illustrates a general
case of using
loadd
:
#include <dynam.h> #include <lcstring.h> char *table; char *str; MODULE tabmod; /* Load a translate table named LC3270AE. */ loadd("LC3270AE",& table,& tabmod); str = strxlt(str, table); unloadd(tabmod); /* Unload module after use.*/
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.