Getting Environmental Information |
L$UENVR
is a routine called by the SAS/C Library as part of initialization every time
the
main
function of a
C program executes. L$UENVR returns information about the operating system
and the current environment.
This description of L$UENVR has two objectives:
A sample version of L$UENVR source code is provided
on the installation tape (in member L$UENVR).(footnote 1) This sample returns information about the standard systems (OS/390
and CMS) under which the compiler runs. The sample is included so that L$UENVR
can be modified by a site to indicate special environments. Comments in the
code describe how to make any necessary modifications.
Your site normally does not need to change L$UENVR unless
you are running programs in a nonstandard environment. For example, changes
in the L$UENVR source code are needed to run C programs under a system (such
as ROSCOE) that is different from the systems for which the compiler was developed.
Note that the operation of the library in such special environments is not
guaranteed, but if the environment resembles a normal OS/390 or CMS environment
closely enough, execution is possible.
The L$UENVR routine stores information about the operating
system in an environment descriptor block. L$UENVR is called using standard
IBM linkage. Register 1 addresses an area in which the environment descriptor
block will be built. (This block is mapped by the ENVDB DSECT, which is present
in the sample macro library.) Fifty-six bytes that can be used for work space
follow the standard 72-byte save area addressed by register 13.
The environment descriptor block is 48 bytes and contains
the information shown in the following table.
Any undefined or meaningless items in the environment
descriptor block should be stored as
0
s. If you modify L$UENVR, a new set of information is created for
the special environment in which compiled programs will run.
Note:
If you modify L$UENVR, do not change the information in the descriptor block
for the standard systems (OS/390 and CMS) because the library may malfunction.
The information may be unavailable or incorrect unless
the L$UENVR source code is examined and changed as necessary by a systems
programmer familiar with the local operating systems.
Local operating system conventions or modifications
may cause these functions to return incorrect or misleading values. Contact
your SAS Software Representative for C Compiler products to confirm that L$UENVR
provides the information required.
FOOTNOTE 1:
See your SAS Software Representative for SAS/C software products for the location
of this member.
Copyright © 2001
by SAS Institute Inc., Cary, NC, USA. All rights reserved.