SAS/C® Library Reference
Volume 2
Release 6.00
Using This Book
Part 1: Special Features of the SAS/C Library
Chapter 1:
Dynamic-Loading Functions
Introduction
Cautions
Dynamic Load Modules
Function Descriptions
CMS Argument Values
Example 1.1 simple case
Example 1.2 dynamic loading modules with multiple functions
Example 1.3 dynamic loading under CMS
Chapter 2:
CMS Low-Level I/O Functions
Introduction
CMS Low-Level I/O Functions
XEDIT Low-Level I/O Functions
Related Utility Functions
Chapter 3:
MVS Low-Level I/O Functions
Introduction
DCBs and DCB Exit Routines
Direct BSAM Interface Functions
osbdcb
osfind
osbldl
osbopen, osbopenj
osfindc
osbclose, ostclose
osread, oswrite
oscheck
osnote, ospoint
osstow
The Record-Oriented BSAM Interface
Controlling Buffering Using the Record Interface
Using osseak and ostell
Handling Spanned Records
Processing Concatenation with Unlike Attributes
BSAM Record-Oriented Interface Functions
osdcb
osopen, osopenj
osclose
osget
osput
osflush
ostell
osseek
The osdynalloc Function
Chapter 4:
MVS Multitasking and Other Low-Level System Interfaces
Introduction
Multitasking SAS/C Applications
Compatibility Changes
Function Descriptions
Chapter 5:
Inter-User Communications Vehicle(IUCV) Functions
Introduction
IUCV Communications Overview
IUCV Signal Handling, and Message Processing
IUCV Parameter Lists and External Interrupt Data Formats
Message Queues
Return Codes
Function Descriptions
An Example pf IUCV Communication
The SENDER program
The RECEIVER program
Guidelines and Cautions
Chapter 6:
Advanced Program-to-Program Communication/Virtual Machine (APPC/VM) Functions
Introduction
APPC/VM Parameter Lists and External Interrupt data Formats
ident_parms
appc_conn_plist
appc_conn_data
appc_send_plist
Function Descriptions
APPC/VM Communication Example Programs
The APPCSEND Program
The APPCSERV Program
Guidelines and Cautions
Chapter 7:
The Subcommand Interface to EXECs and CLISTs
Introduction
Subcommand Processing in C Programs
Steps in Subcommand Processing
Overview of the SUBCOM Environment
SUBCOM and CMS
SUBCOM and TSO
Accessing REXX under TSO
Attention Handling
SUBCOM and OpenEdition
SUBCOM in Interactive and Noninteractive Environments
Function Descriptions
Examples of SUBCOM Processing
CLIST Example for SUBCOM Processing
TSO REXX Example for SUBCOM Processing
CMS EXEC Example for SUBCOM Processing
Guidelines for Subcommand Processing
Chapter 8:
The CMS REXX SAS/C Interface
Introduction
REXX Concepts and Background
Extending REXX with Function Packages
Functions and subroutines
REXX function packages as nucleus extensions
Function parameter lists and variable values
How the Library Interfaces with REXX
The SAS/C Library REXX Interface Functions
The SAS/C Library Function Package Support
C Function Packages and Nucleus Extensions
The SAS/C Library Interface and the REXX Extended Plist
When REXX Calls a C Function Package
Function Descriptions
An Example of a REXX Function Package
Additional Guidelines and Related Topics
Developing C Function Packages
Linking REXX Function Packages
Using the SAS/C Debugger and the IC Command
Chapter 9:
Coprocessing Functions
Introduction
cocall and coreturn
Coprocess States
Passing Data between Coprocesses
Special Cases
Coprocess Data Types and Constants
Coprocess Identifiers
Restrictions
A Coprocessing Example
Advanced Topics: Program Termination
Exit Processing for Secondary Coprocesses
Exit Processing for the Main Coprocess
Advanced Topics: Signal Handling
Function Descriptions
Chapter 10:
Localization
Introduction
Locales and Categories
The Locale Structure Iconv
The "S370" Locale
The "POSIX" Locale
Library-Supplied Locales
Function Descriptions
User-Added Locales
Creating a New Locale
The <localeu.h> Header File
Example Locales
LOCALE strcoll EQUIVALENT
LOCALE strxfrm EQUIVALENT
Chapter 11:
Multibyte Character Functions
Introduction
SAS/C Implementation of Multibyte Character Sequences
Mixed DBCS Sequences
Pure DBCS Sequences
Converting Sequences
DBCS Support with SPE
Formatted I/O Functions and Multibyte Character Sequences
Locales and Multibyte character Sequences
Function Descriptions
Chapter 12:
User-Added Signals
Introduction
Notes on Handlers for User-Defined Signals
Restrictions on Synchronous and Asynchronous Signals
Summary of Routines for Adding Signals
Initialization Routine and sigdef Function
Signal Generator Rountine
Default Routine
Interrupt Control Routine
Executive Routine
Final Routine
Jump Intercept Routine
SAS/C Library Routines for Adding New Signals
Routine for Synchronous Signals: L$CZSYN
Routine for Asynchronous Signals: L$CZENQ
Chapter 13:
Getting Environmental Information
Introduction
The L$UENVR Routine
L$UENVR Source Code
Environmental Descriptor Block
Cautions
Function Descriptions
Part 2: SAS/C Socket Library for TCP/IP
Chapter 14:
The TCP/IP Protocol Suite
Overview of TCP/IP
Internet Protocol(IP)
User Datagram Protocol(UDP)
Transmission Control Protocol(TCP)
Domain Name System(DNS)
MVS and CMS TCP/IP Implementation
Chapter 15:
The BSD UNIX Socket Library
Introduction
Overview of the BSD UNIX Socket Library
Header Files
<sys/types.h>
timeval
<sys/uio.h>
iovec
<errno.h>
<sys/ioctl.h>
<fcntl.h>
<sys/socket.h>
linger
sockaddr
msghdr
clientid
<netdb.h>
hostent
netent
servent
protoent
rpcent
herror
<netinet/in.h>
in_addr
sockaddr_in
<netinet/in_systm.h>
<netinet/ip_icmp.h>
<netinet/ip.h>
<netinet/udp.h>
<arpa/inet.h>
<arpa/nameser.h>
<resolv.h>
state
Bitwise OR Options
<net/if.h>
<strings.h>
Socket Functions
Addresses and Network Information
Socket Address
Host Name
Address Manipulation
Host Information
Network Information
Protocol Information
Network Services
Database Services
Resolver Routines
Data Conversion
Byte Order Conversion
ASCII-EBCDIC Translation
Choosing a Socket Implementation
Creating a Socket
Binding a Socket
Listening for a Connection
Connecting and Passing a Socket
Accepting a Connection
Sending and Receiving Data Through a Socket
Closing the Connection
Chapter 16:
Porting UNIX Socket Applications to the SAS/C® Environment
Introduction
Integrated and Non-Integrated Sockets
Socket Library Restrictions
Socket Descriptors
Addressing Families
Sockets
Function Names
Header Filenames
errno
BSD Library Dependencies
INETD and BSD Kernel Routine Dependencies
Character Sets
The Resolver
Chapter 17:
Network Administration
Introduction
Configuration Data Sets
Search Logic
Finding the Data Set
/etc/protocols
/etc/services
/etc/hosts
/etc/networks
/etc/resolv.conf
/etc/rpc
Specifying TCPIP_PREFIX for MVS
Specifying TCPIP_MACH
gethostbyname and Resolver Configuration
Configuring for the CMS Environment
Configuring for the MVS Environment
Chapter 18:
Socket Function Reference
Introduction
Part 3: SAS/C POSIX Support
Chapter 19:
Introduction to POSIX
POSIX and OpenEdition Concepts
Process
Permissions
Signals
Files
Directories
Links
Terminals and Sessions
Shells
The errno Variable
POSIX and OpenEdition Error Numbers
Internal Error Numbers
SAS/C OpenEdition Interfaces
MVS Considerations
fork
exec
Standard Types
HFS Files and DDnames
Signal Handling and ABENDs
Multiple Processes in an Address Space
Behavior when OpenEdition is not Available
Chapter 20:
POSIX Function Reference
Introduction
Functions
atfork -- Define Fork Exit
cfgetispeed -- Determine Input Baud Rate
cfgetospeed -- Determine Output Baud Rate
cfsetispeed -- Set Input Baud Rate
cfsetospeed -- Set Output Baud Rate
chaudit -- Change File Audit Flags (Using Pathname)
chown -- Change File Owner or Group (Using Pathname)
execl -- Overlay Calling Process and Run New Program
execle -- Overlay Calling Process and Run New Program
execlp -- Overlay Calling Process and Run New Program
execv -- Overlay Calling Process and Run New Program
execve -- Overlay Calling Process and Run New Program
execvp -- Overlay Calling Process and Run New Program
_exit -- End Process and Skip Cleanup
fchaudit -- Change File Audit Flags (Using File Descriptor)
fchown -- Change File Owner or Group (Using File Descriptor)
fork -- Create a New Process
fpathconf -- Determine Pathname Variables
getegid -- Determine Effective Group ID
geteuid -- Determine Effective User ID
getgid -- Determine Real Group ID
getgrgid -- Access Group Database by ID
getgrnam -- Access Group Database by Name
getgroups -- Determine Supplementary Group IDs
getgroupsbyname -- Determine Supplementary Group IDs for a User Name
getpgrp -- Determine Process Group ID
getpid -- Determine Process ID
getppid -- Determine Parent Process ID
getpwnam -- Access User Database by User Name
getpwuid -- Access User Database by User ID
getuid -- Determine Real User ID
initgroups -- Initialize Supplementary Group IDs for a Process
mknod -- Create a Character or FIFO Special File
mount -- Mount a File System
oeattach -- Create a Child Process as a Subtask
oeattache -- Create a Child Process as a Subtask
__passwd -- Verify or Change a Password
pathconf -- Determine Pathname Variables that Can Be Configured
setegid -- Specify Effective Group ID
seteuid -- Specify Effective User ID
setgid -- Specify Group ID
setgroups -- Set Supplementary Group IDs
setpgid -- Specify Process Group ID for Job Control
setsid -- Create Session and Specify Process Group ID
setuid -- Specify User ID
sysconf -- Determine System Configuration Options
tcdrain -- Wait for Output to Drain
tcflow -- Controls the Flow of Data to a Terminal
tcflush -- Flush Terminal Input or Output
tcgetattr -- Get Terminal Attributes
tcgetpgrp -- Get Foreground Process Group Identification
tcsendbreak -- Send a Break Condition
tcsetattr -- Set Terminal Attributes
tcsetpgrp -- Set Foreground Process Group Identification
times -- Determine Process Times
umask -- Change File Mode Creation Mask
umount -- Unmounts a File System
uname -- Display Current Operating System Name
wait -- Wait for Child Process to End
waitpid -- Wait for a Specific Process to End
w_getmntent -- Get Mounted File System Information
w_getpsent -- Get Process Information
w_ioctl -- Pass Command and Arguments to an I/O Device
w_statfs-- Get File System Status Information
Copyright (c) 1998 SAS Institute Inc.
Cary, NC, USA. All rights reserved.