Chapter Contents

Previous

Next
unloadm

unloadm



Discard a Previously Loaded Module

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
CAUTION
EXAMPLE


SYNOPSIS

#include <dynam.h>

void unloadm(__remote /* type */ (*fp)());


DESCRIPTION

unloadm unloads the executable module containing the function addressed by the argument fp . If the module is no longer in use, unloadm deletes it from memory. Note that fp may reference a function ruturning any valid type of data.

unloadm may be used to unload a module that has been built by buildm , but unloadm will not delete the module from memory.


RETURN VALUE

None


ERRORS

If the argument to unloadm is invalid, a user 1211 ABEND is issued. Various other ABENDs, such as 1215 or 1216, may occur during unloadm if library areas used by dynamic loading have been overlaid.


CAUTION

If an attempt is made to call a function in the unloaded module, the results are undefined but probably disastrous.


EXAMPLE

The following example, which is not system-specific, illustrates the general use of unloadm :

#include <dynam.h>

int (*fp)(); 
   /* Load a load module named "IEFBR14", */  
   /* call it, and unload it.             */ 
loadm("iefbr14",&  fp); 
(*fp)(); 
unloadm(fp);


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.