![]() Chapter Contents |
![]() Previous |
![]() Next |
| SAS/C Software: Changes and Enhancements, Release 6.50 |
Indicate a location from which modules may be loaded
#include <dynam.h>
SEARCH_P addsrch(int type,
const char *loc,
const char *prefix);addsrch adds a location to the list of locations from which modules can be loaded. This list controls the search order
for modules loaded from a call to
loadm.
addsrch does not verify the existence of the location.
The first argument,
type, must be a module type defined in
<dynam.h>. The module type defines what type of module is loaded and can vary from operating system to operating system. The character string
specified by the second argument,
loc, names the location. All location strings may have leading and trailing blanks, and all characters are converted
to an uppercase format. The format of this string depends on the module type.
The search order can be described additionally by the third argument,
prefix. The
prefix argument is a character string of no more than eight characters.
prefix may be null (""), but if it not, then it specifies that the location indicated is searched only if the load module name (as specified by the
type argument to
loadm) begins with the same character or characters specified in
prefix.
Under MVS, the module type,
type, controls the format of the second argument,
loc, which names the location to be searched by
loadm. The module type may be either
MVS_DD or
MVS_DSN:
MVS_DD - The location parameter must be a previously allocated DDname, either through JCL or dynamically.
MVS_DSN - The location parameter must be a fully qualified dataset name.
Under CMS, the defined module types
for the first argument,
type, are the following:
CMS_NUCX - Specifies that the module is a nucleus extension. The module has been loaded (for example, by the CMS command NUCXLOAD) before
loadm is called.
CMS_LDLB - Specifies that the module is a member of a CMS LOADLIB file. The LOADLIB file must be on an accessible disk when
loadm is called.
CMS_DCSS - Specifies that the module resides in a named segment that has been created using the GENCSEG utility, as documented in "The CMS
GENCSEG Utility" in Appendix 3, of the SAS/C Compiler and Library User's Guide.
The module type also controls the format of the second argument,
loc. The
loc argument identifies the location to be searched by
loadm. For the following the module types, the
loc argument is:
CMS_NUCXCMS_LDLB LOADLIB file in the form filename filemode, for example, DYNAMC A1 specifies the file, DYNAMC LOADLIB A1. The filemode may be
an asterisk (*).CMS_DCSS At the C program's initialization, a default location is in effect. The default location is defined by the following call:
sp = addsrch(CMS_LDLB, "DYNAMC *","")
addsrch returns a value that can be passed to
delsrch to delete the input source. This is a value of the defined type
SEARCH_P, which can be passed to
delsrch to remove the location from the search order. If an error occurs, a value of 0 is returned.addsrch does not verify that a location exists or that load modules may be loaded from that location. The
loadm function searches in the location only if the load module cannot be loaded from a location higher in the search order.
addsrch fails only if its parameters are ill-formed. #include <dynam.h>
SEARCH_P mylib;
.
.
.
/* Search for modules in a CMS LOADLIB. */
mylib=addsrch(CMS_LDLB, "PRIVATE *", "");
/* Search for modules in a MVS dataset. */
mylib=addsrch(MVS_DSN, "SYS1.LINKLIB", "");
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © Mon Mar 9 09:11:22 EST 1998 by SAS Institute Inc., Cary, NC, USA. All rights reserved.