Chapter Contents |
Previous |
Next |
opcmd |
Updates to Function Categories |
In Chapter 2, "Function Categories," update the information
for the different types of functions with the following text.
Update the math functions, for example, exp
, atan
, with the following
enhancements.
bfp
option.
f
or l
.
fmod
are declared as macros in tgmath.h
, and can
be used in a type-generic fashion if that header file is included.
_matherr
in case of errors
will call _matherb
instead if invoked from a caller compiled with the bfp
option.
bfp
callers from the documented values. In general, a NaN
will be returned for domain errors. Overflow will produce an infinity or
the largest possible finite number, depending on the rounding mode. Underflow
will produce a denormalized result or a zero depending on the magnitude of
the correct answer and the rounding mode. A singularity will produce an infinite
result.
pow(1.0, NaN)
, any function called with an argument that is
a NaN will return a NaN.
Other changes or enhancements to existing functions worth noting are:
sqrt
function is now built-in
if binary floating point is used, or if the compiler option archlevel(c)
is used.
lgamma
is
provided
as a synonym for gamma
. The lgamma
name is preferred because it more accurately describes
the function.
fmax
, fmin
, hypot
,
erf
and erfc
were previously
defined only in lcmath.h
. Because these functions
are defined by the C99 standard, their prototypes are now also in math.h
.
Add the following functions to the list of string functions.
nan |
convert a string to an IEEE double NaN |
nanf |
convert a string to an IEEE float NaN |
nanl |
convert a string to an IEEE long double NaN |
The following paragraph:
The resolution and accuracy of time values vary from implementation
to implementation. Timing functions under traditional UNIX C compilers return
a value of type long
. The library implements time_t
as a double
to allow
more accurate time measurement. Keep this difference in mind for programs
ported among several environments.
Should read:
The resolution and accuracy of time values vary from implementation
to implementation. Timing functions under traditional UNIX C compilers return
a value of type long
. The library implements time_t
and clock_t
as hex format
doubles to allow more accurate time measurement. This is permitted by the
ANSI/ISO standards, but is unusual, as most systems define these types as
integral types. This can lead to problems in programs ported from other environments.
Also note that programs which use the bfp
option may receive diagnostics if they attempt to evaluate expressions with
both a time_t
or clock_t
operand and one or more double operands. Casting the time_t
or clock_t
value to a _ _binfmt
double
is recommended to solve such problems.
Updates to the SAS/C Functions |
The following sections contain updates to the SAS/C functions in Chapter 6, "Function Descriptions."
llmax |
Replace the SYNOPSIS and EXAMPLE sections with the following new sections:
#include <lclib.h> long long int llmax(long long int s, long long int r);
#include <lclib.h> #include <stdio.h> main() { long long int num1, num2; /* numbers to be compared */ long long int result; /* holds the larger of num1 and num2 */ puts("Enter num1 & num2 : "); scanf("%lld %lld", &num1, &num2); result = llmax(num1, num2); printf("The larger number is %lld\n", result); }
llmin |
Replace the SYNOPSIS and EXAMPLE sections with the following new sections:
#include <lclib.h> long long int llmin(long long int s, long long int r);
#include <lclib.h> #include <stdio.h> main() { long long int num1, num2; /* numbers to be compared */ long long int result; /* holds the smaller of num1 and num2 */ puts("Enter num1 & num2 : "); scanf("%lld %lld", &num1, &num2); result = llmin(num1, num2); printf("The smaller number is %lld\n", result); }
storck |
In the "DESCRIPTION" section of the storck
function entry, make the following changes:
DDN:DBGSTG
, to DDN:STGRPT
.
Updates to Multi-Volume Seeks Support |
In Chapter 3, "I/O Functions," add the following information for multi-volume seeks support.
rel
access method Under
OS/390, add the following text after the list:
Under OS/390, datasets are allowed to extend to multiple volumes.
File Type | Restrictions |
---|---|
multivolume disk or tape file | For non-rel datasets: only rewind supported if not opened for append; only seek to the end of file supported if opened for append |
New WTP Function |
In Release 7.50, the WTP
macro has been
changed to a function. Because of this change, several modifications need
to be made to the
SAS/C Library Reference, Volume 1.
WTP
from the list of SAS/C functions implemented as macros.
wto
function description, delete the reference to the WTP
macro, delete the sample showing
the WTP
macro, and add WTP
to the
list of related functions.
WTP
at WTP to the list of functions.
Updates to SAS/C I/O Questions and Answers |
In Chapter 3, "I/O Functions," in the section titled, "SAS/C I/O Questions and Answers," replace the section titled, "Sharing an Output PDS" with the following text.
Q. |
When I open a PDS member for output, the fopen call fails if another user has the PDS allocated, even
if it is allocated as SHR. How can I write to the PDS if it shared with another
user? |
A. |
If more than one user writes to the same PDS at the
same time, the results are unpredictable. Generally, both members will be
damaged. For this reason, when a PDS member, or any other OS/390 data
set, is opened for output, the library allocates the data set to OLD to make
sure that no one else writes to it at the same time. In some cases, this may
be overprotective, but it prevents file damage from unintended simultaneous
access. In cases where the PDS will only be updated via SAS/C or ISPF, or
other applications that conform to the ISPF enqueing mechanism, you can specifiy share=ispf as an amparm when you open the member to force
the library to open the dataset as shared.
Note: With a PDSE, it is
possible to simultaneously write to distinct members. Even with a PDSE, the
effects are unpredictable if the same member is opened by more than one user
for output at the same time. |
Updates to Signal-Handling Functions |
In Chapter 5, "Signal-Handling Functions," in the section titled "Supported Signals," add the following entry to the list of signals managed exclusively by USS:
SIGDUMP |
request for SYSMDUMP |
In Chapter 5, "Signal-Handling Functions," add the following
information for the new SIGBFPE
and SIGOPER
signals and for updates to other signals.
SIGBFPE
to the list of sychronous signals.
SIGOPER
to the list of signals.
SIGBFPE
and
SIGOPER
to the
list of signals managed exclusively by SAS/C.
Signal | Information Returned by siginfo for Signals
Raised Naturally |
---|---|
SIGBFPE |
pointer to structure of type FPE_t |
SIGOPER |
pointer to structure of type OPER_t |
Signal | SAS/C Library Default Action(SIG_DFL
Handler) |
USS Default Action(SIG_DFL
Handler) |
---|---|---|
SIGBFPE |
ABEND with 0C7 | not supported |
SIGOPER |
ABEND with user code 1225 | ends the process |
Signal | SAS/C Library Ignored Signals(SIG_IGN Handler) |
USS Ignored Signals(SIG_IGN
Handler) |
---|---|---|
SIGBFPE |
program continues; result of computation undefined | not supported |
SIGFPDIV
description to read:
The SIGFPDIV
signal is raised when the
second operand of a hexadecimal format floating point division is zero, and
default handling is in effect for SIGFPE
.
SIGFPOFL
description to read:
The SIGFPOFL
signal is raised when the
magnitude of the result of a hexadecimal format floating-point computation
exceeds the maximum supported by the hardware and default handling is in effect
for SIGFPE
.
SIGFPUFL
description to read:
The SIGFPUFL
signal is raised when the
magnitude of the result of a hexadecimal format floating-point computation
exceeds the maximum supported by the hardware and default handling is in effect
for SIGFPE
.
In the section titled, "Signal Descriptions," add the following
entries for SIGBFPE
and SIGOPER
to the list of descriptions.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2004 by SAS Institute Inc., Cary, NC, USA. All rights reserved.