Chapter Contents

Previous

Next
opcmd

Release 7.50 Changes to the SAS/C Library Reference, Volume 1


Updates to Function Categories

In Chapter 2, "Function Categories," update the information for the different types of functions with the following text.

Math Functions

Update the math functions, for example, exp, atan, with the following enhancements.

Other changes or enhancements to existing functions worth noting are:


String Utility Functions

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

Timing Functions

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:

SYNOPSIS

#include <lclib.h>

long long int llmax(long long int s, long long int r);


EXAMPLE

#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:

SYNOPSIS

#include <lclib.h>

long long int llmin(long long int s, long long int r);


EXAMPLE

#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:


Updates to Multi-Volume Seeks Support

In Chapter 3, "I/O Functions," add the following information for multi-volume seeks support.


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.


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.  [cautionend]


Updates to Signal-Handling Functions


Update to USS Supported Signals

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

Updates to Information on Signals

In Chapter 5, "Signal-Handling Functions," add the following information for the new SIGBFPE and SIGOPER signals and for updates to other signals.


New SIGBFPE and SIGOPER Signals

In the section titled, "Signal Descriptions," add the following entries for SIGBFPE and SIGOPERto the list of descriptions.


Chapter Contents

Previous

Next

Top of Page

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