version 2 release 3 z/os - ibm.com · version 2 release 3 z/os - ibm.com ... 2

2178
z/OS Version 2 Release 3 XL C/C++ Runtime Library Reference IBM SC14-7314-30

Upload: others

Post on 30-Oct-2019

22 views

Category:

Documents


0 download

TRANSCRIPT

  • z/OSVersion 2 Release 3

    XL C/C++Runtime Library Reference

    IBM

    SC14-7314-30

  • Note

    Before using this information and the product it supports, read the information in “Notices” on page2091.

    This edition applies to Version 2 Release 3 of z/OS (5650-ZOS) and to all subsequent releases and modifications untilotherwise indicated in new editions.

    Last updated: 2019-06-26© Copyright International Business Machines Corporation 1996, 2017.US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract withIBM Corp.

  • Contents

    Figures............................................................................................................. xxix

    Tables...............................................................................................................xxxi

    About this document........................................................................................ xxxvWhere to find more information........................................................................................................... xxxvii

    z/OS Basic Skills in IBM Knowledge Center....................................................................................xxxvii

    How to send your comments to IBM................................................................. xxxixIf you have a technical problem............................................................................................................ xxxix

    New and updated information in z/OS Version 2 Release 3.................................... xli

    Chapter 1. About IBM z/OS XL C/C++..................................................................... 1AMODE 64 considerations........................................................................................................................... 1

    Chapter 2. Header files.......................................................................................... 3Feature test macros..................................................................................................................................... 3aio.h — Asynchronous I/O operations....................................................................................................... 15arpa/inet.h — Internet operations.............................................................................................................16arpa/nameser.h — Construct and inspect DNS requests..........................................................................16assert.h — Insert diagnostics.................................................................................................................... 16cassert — Enforce assertions.....................................................................................................................16_Ccsid.h — CCSID to codeset name conversion........................................................................................16cctype — Classify characters..................................................................................................................... 16ceeedcct.h — C declarations of Language Environment........................................................................... 17cerrno — Test error codes.......................................................................................................................... 17cfloat — Test floating-point type properties..............................................................................................17cics.h — Verify CICS................................................................................................................................... 17ciso646 — ISO646 variant character sets.................................................................................................17climits — Test integer type properties.......................................................................................................17clocale — Adapt to different cultural conventions.................................................................................... 18cmath — Common mathematical functions.............................................................................................. 18collate.h — Current locale's collating properties...................................................................................... 18complex.h — Complex math functions......................................................................................................18cpio.h — CPIO archive values.................................................................................................................... 19csetjmp — Execute non-local goto statements.........................................................................................19csignal — Exception control.......................................................................................................................19csp.h — Define __csplist macro................................................................................................................. 19cstdarg — Access arguments..................................................................................................................... 19cstddef — Define data types and macros..................................................................................................20cstdio — Perform input and output............................................................................................................20cstdlib — Standard library..........................................................................................................................20cstring — Manipulate strings......................................................................................................................20ctest.h — Debug and diagnostics...............................................................................................................20ctime — Convert time and date formats....................................................................................................21ctype.h — Character classification.............................................................................................................21cwchar — Manipulating wide streams and strings....................................................................................21cwctype — Wide character classification.................................................................................................. 21

    iii

  • decimal.h — Fixed-point decimal operations............................................................................................21dirent.h — POSIX directory access............................................................................................................ 22dlfcn.h — Define macros for use with dlopen()......................................................................................... 22dll.h — DLL functions..................................................................................................................................22dynit.h — Dynamic allocation routines...................................................................................................... 22env.h — Set and clear environment variables........................................................................................... 23errno.h — Symbolic constants for errno.................................................................................................... 23exception — Exception handling................................................................................................................27fcntl.h — POSIX functions for file operations............................................................................................27features.h — Feature test macros..............................................................................................................28fenv.h — Floating-point environment........................................................................................................ 28float.h — ANSI constants for floating-point data types............................................................................ 29fmtmsg.h — Message display structures...................................................................................................31fnmatch.h — Filename matching types..................................................................................................... 31fpxcp.h — Floating-point exception interfaces..........................................................................................31__ftp.h — FTP resolver functions...............................................................................................................32ftw.h — File tree traversal constants......................................................................................................... 32glob.h — Pathname pattern matching types............................................................................................. 32grp.h — Access group databases...............................................................................................................32iconv.h — Code conversion........................................................................................................................ 32_Ieee754.h — IEEE 754 interfaces........................................................................................................... 32ims.h — Invoke IMS facilities.....................................................................................................................32inttypes.h — I/O format of integer types................................................................................................... 33iso646.h —Macros for operators............................................................................................................... 36langinfo.h —Macros for date and time.......................................................................................................36lc_core.h — Locale-related data structures.............................................................................................. 38lc_sys.h — Build references to locale methods in ASCII locales..............................................................39__le_api.h — AMODE 64 C functions in Language Environment...............................................................39leawi.h — Macros for Language Environment Application Writer Interfaces........................................... 39libgen.h — Pattern matching functions..................................................................................................... 39limits.h — Standard values for limits on resources...................................................................................39localdef.h — Data structures for locale objects........................................................................................ 41locale.h — Locale settings..........................................................................................................................41math.h — Floating-point math functions...................................................................................................45memory.h — Memory operations...............................................................................................................50monetary.h — strfmon() function...............................................................................................................50msgcat.h — Message catalog structures and definitions..........................................................................50mtf.h — Multitasking facility functions...................................................................................................... 50_Nascii.h — Bimodal application............................................................................................................... 50ndbm.h — ndbm database operations...................................................................................................... 50netdb.h — Network database operations..................................................................................................50net/if.h — Network interface structures and definitions...........................................................................50net/rtrouteh.h — Network routing structures and definitions.................................................................. 52netinet/icmp6.h — ICMPv6 header options.............................................................................................. 52netinet/in.h — Internet protocol family.....................................................................................................55netinet/ip6.h — IPv6 header options........................................................................................................ 56netinet/tcp.h — Internet Transmission Control Protocol..........................................................................57new — Storage allocation and free............................................................................................................ 57new.h — Storage allocation and free......................................................................................................... 58nlist.h — nlist() fucntion............................................................................................................................. 58nl_types.h — National languages.............................................................................................................. 58poll.h — poll() function...............................................................................................................................59pthread.h — Thread interfaces.................................................................................................................. 59pwd.h — Access user database through password structure...................................................................62re_comp.h — Regular expression matching functions for re_comp()....................................................... 63regex.h — Regular expression functions................................................................................................... 63regexp.h — Regular expression declarations............................................................................................ 63resolv.h — IP Address Resolution..............................................................................................................63

    iv

  • rexec.h — rexec() and rexec_af() functions............................................................................................... 63sched.h — Manipulate and examine process execution scheduling........................................................ 64search.h — Searching tables......................................................................................................................64setjmp.h — Manipulate program state...................................................................................................... 64signal.h — Exception handling................................................................................................................... 64spawn.h — spawn() constants and inheritance structure.........................................................................65spc.h — System library functions and storage allocation......................................................................... 65stdalign.h — Alignment.............................................................................................................................. 66stdarg.h — Access arguments in functions with variable-length argument lists..................................... 66stdbool.h — Macros for bool type.............................................................................................................. 66stddef.h — typedef statements..................................................................................................................66stdefs.h — typedef statements..................................................................................................................67stdint.h — Integer types.............................................................................................................................67stdio.h — Standard input and output.........................................................................................................69stdio_ext.h — stdio extensions.................................................................................................................. 71stdlib.h — Standard library functions........................................................................................................ 72string.h — String manipulation functions.................................................................................................. 73strings.h — String operations.....................................................................................................................73stropts.h — Stream interface..................................................................................................................... 73syslog.h — System error logging................................................................................................................73sys/acl.h — Manipulate ACL.......................................................................................................................73sys/__cpl.h — __cpl() function and symbolic constants........................................................................... 74sys/file.h — File manipulation constants...................................................................................................74sys/__getipc.h — Interprocess communication....................................................................................... 74sys/ioctl.h — System I/O definitions and structures.................................................................................74sys/ipc.h — Interprocess communication access structure..................................................................... 74sys/layout.h — Bidirectional conversion of data between Visual and Implicit formats...........................74sys/mman.h — Memory management.......................................................................................................74sys/__messag.h — __console() and __console2() functions....................................................................74sys/mntent.h — w_getmntent() function and related structures and constants..................................... 75sys/modes.h — Macros for stat structure..................................................................................................75sys/msg.h — Message queue structures................................................................................................... 75sys/ps.h — w_getpsent() function and w_psproc structure..................................................................... 75sys/resource.h — XSI resource operations............................................................................................... 75sys/select.h — Select types....................................................................................................................... 75sys/sem.h — Semaphore facility................................................................................................................75sys/server.h — WorkLoad Manager services............................................................................................. 76sys/shm.h — Shared memory facility........................................................................................................ 76sys/socket.h — Sockets definitions........................................................................................................... 76sys/stat.h — z/OS UNIX files and access...................................................................................................76sys/statfs.h — File system status.............................................................................................................. 76sys/statvfs.h — File system status.............................................................................................................76sys/time.h — Time types............................................................................................................................76sys/timeb.h — Date and time.....................................................................................................................76sys/times.h — Processor times..................................................................................................................76sys/ttydev.h — Terminal I/O functions...................................................................................................... 77sys/types.h — typedef symbols and structures........................................................................................ 77sys/uio.h — Vector I/O operations.............................................................................................................78sys/un.h — UNIX-domain sockets............................................................................................................. 78sys/__ussos.h — Security facility authorization........................................................................................78sys/utsname.h — Operating system name................................................................................................79sys/wait.h — Hold processes..................................................................................................................... 79sys/__wlm.h — WorkLoad Manager functions.......................................................................................... 79tar.h — tar utility......................................................................................................................................... 79terminat.h — Exception handling...............................................................................................................79termios.h — POSIX terminal I/O functions................................................................................................79tgmath.h — Mathematics and complex data type.....................................................................................80time.h — Time and date............................................................................................................................. 81

    v

  • typeinfo — Type identification operator.................................................................................................... 82typeinfo.h — Type identification operator................................................................................................. 83uchar.h — Extended character data types.................................................................................................83ucontext.h — Context related functions.................................................................................................... 83uheap.h — Heap storage............................................................................................................................ 84ulimit.h — ulimit commands...................................................................................................................... 84unexpect.h — Exception handling............................................................................................................. 84unistd.h — Implementation-specific functions.........................................................................................84utime.h — File access and time modification............................................................................................85utmpx.h — User accounting database.......................................................................................................85varargs.h — Handle variable argument lists.............................................................................................. 85variant.h — LC_SYNTAX characters........................................................................................................... 86wchar.h — ISO/C Multibyte Support extensions....................................................................................... 86wcstr.h — Multibyte functions....................................................................................................................87wctype.h — Wide character properties..................................................................................................... 88wordexp.h — Word expansion types..........................................................................................................88xti.h — _XOPEN_SOURCE_EXTENDED feature test macro.......................................................................88

    Chapter 3. Library functions.................................................................................91Names........................................................................................................................................................ 91Unsupported functions and external variables in AMODE 64.................................................................. 91Standards................................................................................................................................................... 92Using C include files from C++...................................................................................................................95Built-in functions........................................................................................................................................95IEEE binary floating-point .........................................................................................................................96IEEE decimal floating-point.......................................................................................................................97External variables...................................................................................................................................... 97The __restrict__ macro........................................................................................................................... 102The __noreturn__ macro.........................................................................................................................102abort() — Stop a program........................................................................................................................ 102abs(), absf(), absl() — Calculate integer absolute value......................................................................... 104accept() — Accept a new connection on a socket...................................................................................106accept_and_recv() — Accept connection and receive first message.....................................................108access() — Determine whether a file can be accessed...........................................................................112acl_create_entry() — Add a new extended ACL entry to the ACL........................................................... 114acl_delete_entry() — Delete an extended ACL entry from the ACL........................................................ 115acl_delete_fd() — Delete an ACL by file descriptor.................................................................................115acl_delete_file() — Delete an ACL by file name.......................................................................................116acl_first_entry() — Return to beginning of ACL working storage............................................................118acl_free() — Release memory allocated to an ACL data object..............................................................118acl_from_text() — Create an ACL from text............................................................................................ 119acl_get_entry() — Get an ACL entry........................................................................................................ 121acl_get_fd() — Get ACL by file descriptor............................................................................................... 122acl_get_file() — Get ACL by file name..................................................................................................... 123acl_init() — Initialize ACL working storage..............................................................................................125acl_set_fd() — Set an ACL by file descriptor........................................................................................... 126acl_set_file() — Set an ACL by file name.................................................................................................128acl_sort() — Sort the extended ACL entries............................................................................................ 130acl_to_text() — Convert an ACL to text....................................................................................................130acl_update_entry() — Update the extended ACL entry.......................................................................... 132acl_valid() — Validate an ACL.................................................................................................................. 133acos(), acosf(), acosl() — Calculate arccosine.........................................................................................134acosd32(), acosd64(), acosd128() - Calculate arccosine...................................................................... 136acosh(), acoshf(), acoshl() — Calculate hyperbolic arccosine................................................................ 137acoshd32(), acoshd64(), acoshd128() - Calculate hyperbolic arccosine..............................................139advance() — Pattern match given a compiled regular expression......................................................... 140__ae_correstbl_query() — Return coded character set ID type (ASCII and EBCDIC)........................... 141

    vi

  • aio_cancel() — Cancel an asynchronous I/O request............................................................................. 142aio_error() — Retrieve error status for an asynchronous I/O operation.................................................144aio_read() — Asynchronous read from a socket..................................................................................... 145aio_return() — Retrieve status for an asynchronous I/O operation........................................................147aio_suspend() — Wait for an asynchronous I/O request........................................................................ 148aio_write() — Asynchronous write to a socket........................................................................................ 150alarm() — Set an alarm............................................................................................................................ 152alloca() — Allocate storage from the stack............................................................................................. 154arm_bind_thread() — Bind the current thread to a given transaction................................................... 155arm_blocked() — Indicate the processing of a transaction is blocked.................................................. 158arm_correlator_get_length() — Get the actual size of the transaction correlator................................. 160arm_end_application() — Undefines an ARM application...................................................................... 161arm_get_correlator_max_length() — Get the max length of the transaction correlator.......................162arm_get_timestamp() — Get the current timestamp............................................................................. 163arm_init_application() — Defines an ARM application........................................................................... 164arm_init_transaction_type() — Defines and initializes an ARM transaction type..................................166arm_start_transaction() — Mark the start of an ARM transaction..........................................................168arm_stop_transaction() — Mark the end of an ARM transaction............................................................169arm_unbind_thread() — Unbind the current thread to a given transaction........................................... 171arm_unblocked() — Indicate the processing of a transaction is no longer blocked..............................172arm_update_transaction() — Update a given transaction...................................................................... 173asctime(), asctime64() — Convert time to character string....................................................................175asctime_r(), asctime64_r() — Convert date and time to a character string...........................................177asin(), asinf(), asinl() — Calculate arcsine............................................................................................... 178asind32(), asind64(), asind128() - Calculate arcsine.............................................................................179asinh(), asinhf(), asinhl() — Calculate hyperbolic arcsine.......................................................................181asinhd32(), asinhd64(), asinhd128() - Calculate hyperbolic arcsine.................................................... 182assert() — Verify condition.......................................................................................................................183atan(), atanf(), atanl(), atan2(), atan2f(), atan2l() — Calculate arctangent............................................ 185atand32(), atand64(), atand128(), atan2d32(), atan2d64(), atan2d128() - Calculate arctangent...... 186atanh(), atanhf(), atanhl() — Calculate hyperbolic arctangent............................................................... 188atanhd32(), atanhd64(), atanhd128() - Calculate hyperbolic arctangent............................................. 189__atanpid32(), __atanpid64(), __atanpid128() - Calculate arctangent(x)/pi....................................... 190atexit() — Register program termination function.................................................................................. 192__atoe() — ISO8859-1 to EBCDIC string conversion............................................................................. 194__atoe_l() — ISO8859-1 to EBCDIC conversion operation.................................................................... 194atof() — Convert character string to double............................................................................................ 195atoi() — Convert character string to integer............................................................................................ 196atol() — Convert character string to long................................................................................................ 197atoll() — Convert character string to signed long long ...........................................................................198__a2e_l() — Convert characters from ASCII to EBCDIC.........................................................................198__a2e_s() — Convert string from ASCII to EBCDIC................................................................................ 199a64l() — Convert base 64 string representation to long integer............................................................ 200basename() — Return the last component of a path name.................................................................... 201bcmp() — Compare bytes in memory......................................................................................................202bcopy() — Copy bytes in memory............................................................................................................ 202bind() — Bind a name to a socket............................................................................................................ 203bind2addrsel() - Bind with source address selection.............................................................................208brk() — Change space allocation............................................................................................................. 209bsd_signal() — BSD version of signal()....................................................................................................210bsearch() — Search arrays....................................................................................................................... 212btowc() — Convert single-byte character to wide-character..................................................................214bzero() — Zero bytes in memory............................................................................................................. 214c16rtomb() — Convert a char16_t character to a multibyte character.................................................. 215c32rtomb() — Convert a char32_t character to a multibyte character.................................................. 217__cabend() — Terminate the process with an abend..............................................................................218cabs(), cabsf(), cabsl() — Calculate the complex absolute value........................................................... 219cacos(), cacosf(), cacosl() — Calculate the complex arc cosine............................................................. 220

    vii

  • cacosh(), cacoshf(), cacoshl() — Calculate the complex arc hyperbolic cosine.....................................221calloc() — Reserve and initialize storage.................................................................................................222carg(), cargf(), cargl() — Calculate the argument.................................................................................... 224casin(), casinf(), casinl() — Calculate the complex arc sine....................................................................225casinh(), casinhf(), casinhl() — Calculate the complex arc hyperbolic sine........................................... 226catan(), catanf(), catanl() — Calculate the complex arc tangent............................................................ 227catanh(), catanhf(), catanhl() — Calculate the complex arc hyperbolic tangent....................................228catclose() — Close a message catalog descriptor...................................................................................229catgets() — Read a program message.....................................................................................................229catopen() — Open a message catalog..................................................................................................... 231cbrt(), cbrtf(), cbrtl() — Calculate the cube root......................................................................................232cbrtd32(), cbrtd64(), cbrtd128() — Calculate the cube root.................................................................. 233cclass() — Return characters in a character class.................................................................................. 234ccos(), ccosf(), ccosl() — Calculate the complex cosine......................................................................... 235ccosh(), ccoshf(), ccoshl() — Calculate the complex hyperbolic cosine.................................................236__CcsidType() — Return coded character set ID type............................................................................ 237cds() — Compare double and swap......................................................................................................... 237cdump() — Request a main storage dump.............................................................................................. 238ceil(), ceilf(), ceill() — Round up to integral value................................................................................... 239ceild32(), ceild64(), ceild128() — Round up to integral value................................................................240__certificate() — Register, deregister, or authenticate a digital certificate............................................ 241cexp(), cexpf(), cexpl() — Calculate the complex exponential............................................................... 243cfgetispeed() — Determine the input baud rate......................................................................................244cfgetospeed() — Determine the output baud rate.................................................................................. 246cfsetispeed() — Set the input baud rate in the termios.......................................................................... 248cfsetospeed() — Set the output baud rate in the termios...................................................................... 250__chattr(), __chattr64() — Change the attributes of a file or directory.................................................. 251chaudit() — Change audit flags for a file by path.................................................................................... 255chdir() — Change the working directory.................................................................................................. 257__check_resource_auth_np() — Determine access to MVS resources..................................................258CheckSchEnv() — Check WLM scheduling environment.........................................................................260chmod() — Change the mode of a file or directory................................................................................. 262chown() — Change the owner or group of a file or directory.................................................................. 264chpriority() — Change the scheduling priority of a process....................................................................267chroot() — Change root directory............................................................................................................ 268cimag(), cimagf(), cimagl() — Calculate the complex imaginary part.....................................................269clearenv() — Clear environment variables.............................................................................................. 270clearerr() — Reset error and end of file (EOF).........................................................................................273clock() — Determine processor time....................................................................................................... 274clog(), clogf(), clogl() — Calculate the complex natural logarithm......................................................... 275close() — Close a file................................................................................................................................276closedir() — Close a directory..................................................................................................................279closelog() — Close the control log........................................................................................................... 280clrmemf() — Clear memory files..............................................................................................................281__cnvblk() — Convert block..................................................................................................................... 282collequiv() — Return a list of equivalent collating elements.................................................................. 283collorder() — Return list of collating elements........................................................................................284collrange() — Calculate the range list of collating elements.................................................................. 285colltostr() — Return a string for a collating element............................................................................... 287compile() — Compile regular expression................................................................................................ 288confstr() — Get configurable variables.................................................................................................... 292conj(), conjf(), conjl() — Calculate the complex conjugate..................................................................... 294connect() — Connect a socket................................................................................................................. 295ConnectExportImport() — WLM connect for export or import use........................................................ 299ConnectServer() — Connect to WLM as a server manager..................................................................... 300ConnectWorkMgr() — Connect to WLM as a work manager................................................................... 301__console() — Console communication services....................................................................................302__console2() — Enhanced console communication services.................................................................305

    viii

  • ContinueWorkUnit() — Continue WLM work unit.................................................................................... 308__convert_id_np() — Convert between DCE UUID and user ID............................................................. 309copysign(), copysignf(), copysignl() — Copy the sign from one floating-point number to another....... 311copysignd32(), copysignd64(), copysignd128() — Copy the sign from one floating-point number to

    another................................................................................................................................................312cos(), cosf(), cosl() — Calculate cosine....................................................................................................313cosd32(), cosd64(), cosd128() — Calculate cosine................................................................................ 315cosh(), coshf(), coshl() — Calculate hyperbolic cosine........................................................................... 316coshd32(), coshd64(), coshd128() - Calculate hyperbolic cosine......................................................... 317__cospid32(), __cospid64(), __cospid128() — Calculate cosine of pi *x ..............................................318__cotan(), __cotanf(), __cotanl() — Calculate cotangent....................................................................... 319__cpl() — CPL interface service............................................................................................................... 320cpow(), cpowf(), cpowl() — Calculate the complex power..................................................................... 321cproj(), cprojf(), cprojl() — Calculate the projection................................................................................322creal(), crealf(), creall() — Calculate the complex real part....................................................................324creat() — Create a new file or rewrite an existing one............................................................................ 325CreateWorkUnit() — Create WLM work unit............................................................................................ 328crypt() — String encoding function.......................................................................................................... 329cs() — Compare and swap....................................................................................................................... 330csid() — Character set ID for multibyte character.................................................................................. 331csin(), csinf(), csinl() — Calculate the complex sine............................................................................... 332csinh(), csinhf(), csinhl() — Calculate the complex hyperbolic sine....................................................... 333__CSNameType() — Return codeset name type..................................................................................... 334csnap() — Request a condensed dump...................................................................................................334__csplist — Retrieve CSP parameters..................................................................................................... 335csqrt(), csqrtf(), csqrtl() — Calculate the complex square root.............................................................. 336ctan(), ctanf(), ctanl()— Calculate the complex tangent.........................................................................337ctanh(), ctanhf(), ctanhl() — Calculate the complex hyperbolic tangent............................................... 338ctdli() — Call to DL/I.................................................................................................................................339ctermid() — Generate path name for controlling terminal..................................................................... 341ctest() — Start debug tool........................................................................................................................342ctime(), ctime64() — Convert time to character string........................................................................... 343ctime_r(), ctime64_r() — Convert time value to date and time character string................................... 345ctrace() — Request a traceback...............................................................................................................346cuserid() — Return character login of the user....................................................................................... 348dbm_clearerr() — Clear database error indicator................................................................................... 349dbm_close() — Close a database............................................................................................................ 350dbm_delete() — Delete database record................................................................................................ 350dbm_error() — Check database error indicator...................................................................................... 351dbm_fetch() — Get database content..................................................................................................... 352dbm_firstkey() — Get first key in database............................................................................................. 353dbm_nextkey() — Get next key in database............................................................................................354dbm_open() — Open a database............................................................................................................. 355dbm_store() — Store database record.................................................................................................... 357decabs() — Decimal absolute value........................................................................................................ 358decchk() — Check for valid decimal types...............................................................................................359decfix() — Fix up a nonpreferred sign variable........................................................................................360DeleteWorkUnit() — Delete a WLM work unit..........................................................................................361difftime(), difftime64() — Compute time difference............................................................................... 363dirname() — Report the parent directory of a path name.......................................................................364__discarddata() — Release pages backing virtual storage..................................................................... 365DisconnectServer() — Disconnect from WLM server.............................................................................. 366div() — Calculate quotient and remainder...............................................................................................367dlclose() — Close a dlopen() object.........................................................................................................368dlerror() — Get diagnostic information....................................................................................................369dlopen() — Gain access to a dynamic link library................................................................................... 370dlsym() — Obtain the address of a symbol from a dlopen() object........................................................ 372dllfree() — Free the supplied dynamic link library.................................................................................. 373

    ix

  • dllload() — Load the dynamic link library and connect it to the application.......................................... 375dllqueryfn() — Obtain a pointer to a dynamic link library function.........................................................377dllqueryvar() — Obtain a pointer to a dynamic link library variable....................................................... 378dn_comp() — Resolver domain name compression................................................................................380dn_expand() — Resolver domain name expansion.................................................................................381dn_find() — Resolver domain name find................................................................................................. 382dn_skipname() — Resolver domain name skipping ............................................................................... 383drand48() — Pseudo-random number generator................................................................................... 384dup() — Duplicate an open file descriptor...............................................................................................385dup2() — Duplicate an open file descriptor to another...........................................................................387dynalloc() — Allocate a data set.............................................................................................................. 389dynfree() — Deallocate a data set........................................................................................................... 396dyninit() — Initialize __dyn_t structure................................................................................................... 397ecvt() — Convert double to string............................................................................................................ 398encrypt() — Encoding function................................................................................................................ 399endgrent() — Group database entry functions........................................................................................401endhostent() — Close the host information data set.............................................................................. 402endnetent() — Close network information data sets.............................................................................. 403endprotoent() — Work with a protocol entry...........................................................................................403endpwent() — User database functions.................................................................................................. 404endservent() — Close network services information data sets.............................................................. 405endutxent() — Close the utmpx database...............................................................................................406erand48() — Pseudo-random number generator................................................................................... 407erf(), erfc(), erff(), erfl(), erfcf(), erfcl() — Calculate error and complementary error functions............ 409erfd32(), erfd64(), erfd128(), erfcd32(), erfcd64(), erfcd128() - Calculate error and

    complementary error functions......................................................................................................... 412__err2ad() — Return address of reason code of last failure................................................................... 413__errno2() — Return reason code information....................................................................................... 413__etoa() — EBCDIC to ISO8859-1 string conversion............................................................................. 415__etoa_l() — EBCDIC to ISO8859-1 conversion operation....................................................................416exec functions..........................................................................................................................................417exit() — End program............................................................................................................................... 424_exit() — End a process and bypass the cleanup....................................................................................426_Exit() — Terminate a process................................................................................................................. 428exp(), expf(), expl() — Calculate exponential function............................................................................429expd32(), expd64(), expd128() — Calculate exponential function ....................................................... 430expm1(), expm1f(), expm1l() — Exponential minus one........................................................................ 431expm1d32(), expm1d64(), expm1d128() — Exponential minus one.................................................... 432ExportWorkUnit() — WLM export service................................................................................................ 433exp2(), exp2f(), exp2l() — Calculate the base-2 exponential.................................................................434exp2d32(), exp2d64(), exp2d128() — Calculate the base-2 exponential............................................. 435extlink_np() — Create an external symbolic link.....................................................................................436ExtractWorkUnit() — Extract enclave service..........................................................................................438__e2a_l() — Convert characters from EBCDIC to ASCII.........................................................................439__e2a_s() — Convert string from EBCDIC to ASCII................................................................................ 440fabs(), fabsf(), fabsl() — Calculate floating-point absolute value...........................................................441fabsd32(), fabsd64(), fabsd128() — Calculate floating-point absolute value....................................... 442fattach() — Attach a STREAMS-based file descriptor to a file in the file system name space...............443__fbufsize() — Retrieve the buffer size of an open stream.....................................................................444__fchattr(), __fchattr64() — Change the attributes of a file or directory by file descriptor...................445fchaudit() — Change audit flags for a file by descriptor..........................................................................447fchdir() — Change working directory....................................................................................................... 449fchmod() — Change the mode of a file or directory by descriptor..........................................................450fchown() — Change the owner or group by file descriptor..................................................................... 451fclose() — Close file..................................................................................................................................454fcntl() — Control open file descriptors.................................................................................................... 455fcvt() — Convert double to string.............................................................................................................465fdelrec() — Delete a VSAM record........................................................................................................... 465

    x

  • fdetach() — Detach a name from a STREAMS-based file descriptor......................................................467fdim(), fdimf(), fdiml() — Calculate the positive difference.................................................................... 468fdimd32(), fdimd64(), fdimd128() — Calculate the positive difference.................................................469fdopen() — Associate a stream with an open file descriptor..................................................................470feclearexcept() — Clear the floating-point exceptions........................................................................... 472fe_dec_getround() — Get the current rounding mode............................................................................473fe_dec_setround() — Set the current rounding mode.............................................................................474fegetenv() — Store the current floating-point environment................................................................... 476fegetexceptflag() — Store the states of floating-point status flags........................................................477fegetround() — Get the current rounding mode......................................................................................477feholdexcept() — Save the current floating-point environment............................................................. 478feof() — Test end of file (EOF) indicator.................................................................................................. 479feraiseexcept() — Raise the supported floating-point exceptions......................................................... 481ferror() — Test for read and write errors..................................................................................................481fesetenv() — Set the floating-point environment....................................................................................483fesetexceptflag() — Set the floating-point status flags.......................................................................... 484fesetround() — Set the current rounding mode...................................................................................... 485fetch() — Get a load module.................................................................................................................... 485fetchep() — Share writable static............................................................................................................ 496fetestexcept() — Test the floating-point status flags..............................................................................498feupdateenv() — Save the currently raised floating-point exceptions................................................... 499fflush() — Write buffer to file................................................................................................................... 500ffs() — Find first set bit in an integer....................................................................................................... 502fgetc() — Read a character.......................................................................................................................502fgetpos() — Get file position.................................................................................................................... 504fgets() — Read a string from a stream..................................................................................................... 506fgetwc() — Get next wide character........................................................................................................ 508fgetws() — Get a wide-character string...................................................................................................509fileno() — Get the file descriptor from an open stream.......................................................................... 512finite() — Determine the infinity classification of a floating-point number............................................ 514__flbf() — Determine if a stream is line buffered.................................................................................... 514fldata() — Retrieve file information......................................................................................................... 516flocate() — Locate a VSAM record........................................................................................................... 520flockfile()— stdio locking......................................................................................................................... 523floor(), floorf(), floorl() — Round down to integral value.........................................................................524floord32(), floord64(), floord128() — Round down to integral value..................................................... 525_flushlbf() — Flush all open line-buffered files.......................................................................................526fma(), fmaf(), fmal() — Multiply then add................................................................................................ 528fmad32(), fmad64(), fmad128() — Multiply then add............................................................................ 529fmax(), fmaxf(), fmaxl() — Calculate the maximum numeric value........................................................530fmaxd32(), fmaxd64(), fmaxd128() — Calculate the maximum numeric value.................................... 531fmin(), fminf(), fminl() — Calculate the minimum numeric value........................................................... 532fmind32(), fmind64(), fmind128() — Calculate the minimum numeric value........................................533fmod(), fmodf(), fmodl() — Calculate floating-point remainder............................................................. 534fmodd32(), fmodd64(), fmodd128() — Calculate floating-point remainder..........................................535fmtmsg() — Display a message in the specified format..........................................................................536fnmatch() — Match file name or path name............................................................................................539fopen() — Open a file............................................................................................................................... 540fork() — Create a new process.................................................................................................................546fortrc() — Return FORTRAN return code................................................................................................. 550fp_clr_flag() — Reset floating-point exception status flag...................................................................... 551fp_raise_xcp() — Raise a floating-point exception..................................................................................552fp_read_flag() — Return the current floating-point exception status.................................................... 553fp_read_rnd() — Determine rounding mode........................................................................................... 554fp_swap_rnd() — Swap rounding mode...................................................................................................555fpathconf() — Determine configurable path name variables..................................................................556fpclassify() — Classifies an argument value............................................................................................559__fpending() — Retrieve number of bytes pending for write..................................................................560

    xi

  • fprintf(), printf(), sprintf() — Format and write data................................................................................562__fpurge() — Discard pending data in a stream......................................................................................574fputc() — Write a character......................................................................................................................575fputs() — Write a string............................................................................................................................ 577fputwc() — Output a wide-character.......................................................................................................579fputws() — Output a wide-character string.............................................................................................581fread() — Read items............................................................................................................................... 582__freadable() — Determine if a stream is open for reading....................................................................584__freadahead() — Retrieve number of bytes remaining in input buffer.................................................586__freading() — Determine if last operation on stream is a read operation............................................ 588free() — Free a block of storage...............................................................................................................589freeaddrinfo() — Free addrinfo storage................................................................................................... 591freopen() — Redirect an open file............................................................................................................592frexp(), frexpf(), frexpl() — Extract mantissa and exponent of the floating-point value........................594frexpd32(), frexpd64(), frexpd128() — Extract mantissa and exponent of the decimal floating-

    point value.......................................................................................................................................... 595fscanf(), scanf(), sscanf() — Read and format data.................................................................................596fseek() — Change file position................................................................................................................. 608fseeko() — Change file position............................................................................................................... 611__fseterr() — Set stream in error.............................................................................................................614__fsetlocking() — Set locking type.......................................................................................................... 615fsetpos() — Set file position.....................................................................................................................617fstat(), fstat64() — Get status information about a file...........................................................................619fstatvfs() — Get file system information..................................................................................................621fsync() — Write changes to direct-access storage.................................................................................. 623ftell() — Get current file position............................................................................................................. 625ftello() — Get current file position........................................................................................................... 627ftime(), ftime64() — Set the date and time............................................................................................. 629ftok() — Generate an interprocess communication (IPC) key................................................................ 630ftruncate() — Truncate a file.................................................................................................................... 631ftrylockfile() — stdio locking.................................................................................................................... 633ftw(), ftw64() — Traverse a file tree.........................................................................................................634funlockfile() — stdio unlocking................................................................................................................ 636fupdate() — Update a VSAM record.........................................................................................................637fwide() — Set stream orientation ............................................................................................................639fwprintf(), swprintf(), wprintf() — Format and write wide characters.................................................... 640__fwritable() — Determine if a stream is open for writing......................................................................642fwrite() — Write items.............................................................................................................................. 643__fwriting() — Determine if last operation on stream is a write operation............................................ 645fwscanf(), swscanf(), wscanf() — Convert formatted wide-character input.......................................... 647gai_strerror() — Address and name information error description........................................................ 648gamma() — Calculate gamma function................................................................................................... 649gcvt() — Convert double to string............................................................................................................ 650getaddrinfo() — Get address information................................................................................................651getc(), getchar() — Read a character.......................................................................................................654getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked() — Stdio with explicit

    client locking.......................................................................................................................................657getclientid() — Get the identifier for the calling application...................................................................658__getclientid() — Get the PID identifier for the calling application........................................................659getcontext() — Get user context..............................................................................................................661__get_cpuid() — Retrieves the system CPUID........................................................................................663getcwd() — Get path name of the working directory.............................................................................. 663getdate(), getdate64() — Convert user format date and time................................................................ 665getdtablesize() — Get the file descriptor table size................................................................................ 669getegid() — Get the effective group ID....................................................................................................670getenv() — Get value of environment variables...................................................................................... 671__getenv() — Get an environment variable.............................................................................................672geteuid() — Get the effective user ID...................................................................................................... 673

    xii

  • getgid() — Get the real group ID..............................................................................................................675getgrent() — Get group database entry...................................................................................................676getgrgid() — Access the group database by ID....................................................................................... 676getgrgid_r() — Get group database entry for a group ID........................................................................ 678getgrnam() — Access the group database by name............................................................................... 679getgrnam_r() — Search group database for a name............................................................................... 680getgroups() — Get a list of supplementary group IDs.............................................................................681getgroupsbyname() — Get supplementary group IDs by user name..................................................... 683gethostbyaddr() — Get a host entry by address......................................................................................685gethostbyname() — Get a host entry by name........................................................................................687gethostent() — Get the next host entry................................................................................................... 689gethostid() — Get the unique identifier of the current host....................................................................690gethostname() — Get the name of the host processor........................................................................... 691getibmopt() — Get IBM TCP/IP image.....................................................................................................692getibmsockopt() — Get IBM specific options associated with a socket.................................................693__getipc(), __getipc64()— Query interprocess communications.......................................................... 694getipv4sourcefilter() — Get source filter................................................................................................. 696getitimer() — Get value of an interval timer............................................................................................ 697getlogin() — Get the user login name...................................................................................................... 699getlogin_r() — Get login name................................................................................................................. 700__getlogin1() — Get the user login name................................................................................................701getmccoll() — Get next collating element from string............................................................................ 703getmsg(), getpmsg() — Receive next message from a STREAMS file.....................................................703getnameinfo() — Get name information..................................................................................................706getnetbyaddr() — Get a network entry by address................................................................................. 708getnetbyname() — Get a network entry by name................................................................................... 710getnetent() — Get the next network entry.............................................................................................. 711getopt() — Command option parsing.......................................................................................................713getpagesize() — Get the current page size..............................................................................................714getpass() — Read a string of characters without echo........................................................................... 715getpeername() — Get the name of the peer connected to a socket.......................................................716getpgid() — Get process group ID........................................................................................................... 718getpgrp() — Get the process group ID.....................................................................................................719getpid() — Get the process ID................................................................................................................. 720getpmsg() — Receive next message from a STREAMS file..................................................................... 721getppid() — Get the parent process ID....................................................................................................721getpriority() — Get process scheduling priority...................................................................................... 723getprotobyname() — Get a protocol entry by name............................................................................... 724getprotobynumber() — Get a protocol entry by number........................................................................ 726getprotoent() — Get the next protocol entry...........................................................................................727getpwent() — Get user database entry................................................................................................... 728getpwnam() — Access the user database by user name........................................................................ 728getpwnam_r() — Search user database for a name................................................................................730getpwuid() — Access the user database by user ID............................................................................... 731getpwuid_r() — Search user database for a user ID............................................................................... 733getrlimit() — Get current or maximum resource consumption...............................................................734getrusage() — Get information about resource utilization......................................................................736gets() — Read a string.............................................................................................................................. 737getservbyname() — Get a server entry by name.....................................................................................739getservbyport() — Get a service entry by port........................................................................................ 740getservent() — Get the next service entry...............................................................................................741getsid() — Get process group ID of session leader.................................................................................743getsockname() — Get the name of a socket........................................................................................... 744getsockopt() — Get the options associated with a socket......................................................................745getsourcefilter() — Get source filter........................................................................................................ 752getstablesize() — Get the socket table size............................................................................................ 754getsubopt() — Parse suboption arguments.............................................................................................754getsyntx() — Return LC_SYNTAX characters........................................................................................... 756

    xiii

  • __get_system_settings() — Retrieves system parameters.................................................................... 757gettimeofday(), gettimeofday64() — Get date and time.........................................................................757getuid() — Get the real user ID................................................................................................................ 759__getuserid() — Retrieve the active MVS user ID................................................................................... 760getutxent(), getutxent64() — Read next entry in utmpx database.........................................................761getutxid(), getutxid64() — Search by ID utmpx database......................................................................763getutxline(), getutxline64() — Search by line utmpx database.............................................................. 764getw() — Get a machine word from a stream..........................................................................................766getwc() — Get a wide character...............................................................................................................767getwchar() — Get a wide character......................................................................................................... 769getwd() — Get the current working directory..........................................................................................770getwmccoll() — Get next collating element from wide string.................................................................771givesocket() — Make the specified socket available...............................................................................772glob() — Generate path names matching a pattern................................................................................775globfree() — Free storage allocated by glob()......................................................................................... 778gmtime(), gmtime64() — Convert time to broken-down UTC time........................................................ 778gmtime_r(), gmtime64_r() — Convert a time value to broken-down UTC time..................................... 780grantpt() — Grant access to the slave pseudoterminal device...............................................................781hcreate() — Create hash search tables................................................................................................... 783hdestroy() — Destroy hash search tables................................................................................................784__heaprpt() — Obtain dynamic heap storage report.............................................................................. 784hsearch() — Search hash tables.............................................................................................................. 786htonl() — Translate address host to network long.................................................................................. 787htons() — Translate an unsigned short integer into network byte order................................................788hypot(), hypotf(), hypotl() — Calculate the square root of the squares of two arguments.................... 789hypotd32(), hypotd64(), hypotd128() — Calculate the square root of the squares of two arguments.791ibmsflush() — Flush the application-side datagram queue....................................................................792iconv() — Code conversion.......................................................................................................................793iconv_close() — Deallocate code conversion descriptor.........................................................................796iconv_open() — Allocate code conversion descriptor............................................................................. 797if_freenameindex() — Free the memory allocated b