ILE C/C++ Run-Time Library Functions


Contents

  • Tables

  • About ILE C/C++ Run-time Library Functions (SC41-5607)
  • Who should read this book
  • A note about examples
  • Prerequisite and related information
  • How to send your comments

  • Run-Time Library Functions

  • Include Files
  • <assert.h>
  • <ctype.h>
  • <decimal.h>
  • <errno.h>
  • <except.h>
  • <float.h>
  • <langinfo.h>
  • <limits.h>
  • <locale.h>
  • <math.h>
  • <mallocinfo.h>
  • <monetary.h>
  • <nl_types.h>
  • <pointer.h>
  • <recio.h>
  • <regex.h>
  • <setjmp.h>
  • <signal.h>
  • <stdarg.h>
  • <stddef.h>
  • <stdio.h>
  • <stdlib.h>
  • <string.h>
  • <strings.h>
  • <time.h>
  • <wchar.h>
  • <wcstr.h>
  • <wctype.h>
  • <xxcvt.h>
  • <xxdtaa.h>
  • <xxenv.h>
  • <xxfdbk.h>
  • Machine Interface (MI) Include Files
  • Library Functions
  • The C/C++ Library
  • Error Handling
  • Searching and Sorting
  • Mathematical
  • Time Manipulation
  • Type Conversion
  • Conversion
  • Record Input/Output
  • Stream Input/Output
  • Handling Argument Lists
  • Pseudorandom Numbers
  • Dynamic Memory Management
  • Memory Objects
  • Environment Interaction
  • String Operations
  • Character Testing
  • Multibyte Character Testing
  • Character Case Mapping
  • Multibyte Character Manipulation
  • Data Areas
  • Message Catalogs
  • Regular Expression
  • abort() -- Stop a Program
  • abs() -- Calculate Integer Absolute Value
  • acos() -- Calculate Arccosine
  • asctime() -- Convert Time to Character String
  • asctime_r() -- Convert Time to Character String (Restartable)
  • asin() -- Calculate Arcsine
  • assert() -- Verify Condition
  • atan() - atan2() -- Calculate Arctangent
  • atexit() -- Record Program Ending Function
  • atof() -- Convert Character String to Float
  • atoi() -- Convert Character String to Integer
  • atol() -- atoll() -- Convert Character String to Long or Long Long Integer
  • Bessel Functions
  • bsearch() -- Search Arrays
  • btowc() -- Convert Single Byte to Wide Character
  • _C_Get_Ssn_Handle() -- Handle to C Session
  • calloc() -- Reserve and Initialize Storage
  • catclose() -- Close Message Catalog
  • catgets() -- Retrieve a Message from a Message Catalog
  • catopen() -- Open Message Catalog
  • ceil() -- Find Integer >=Argument
  • clearerr() -- Reset Error Indicators
  • clock() -- Determine Processor Time
  • cos() -- Calculate Cosine
  • cosh() -- Calculate Hyperbolic Cosine
  • ctime() -- Convert Time to Character String
  • ctime_r() -- Convert Time to Character String (Restartable)
  • _C_TS_malloc_debug() -- Determine amount of teraspace memory used (with optional dumps and verification)
  • _C_TS_malloc_info() -- Determine amount of teraspace memory used
  • difftime() -- Compute Time Difference
  • div() -- Calculate Quotient and Remainder
  • erf() - erfc() -- Calculate Error Functions
  • exit() -- End Program
  • exp() -- Calculate Exponential Function
  • fabs() -- Calculate Floating-Point Absolute Value
  • fclose() -- Close Stream
  • fdopen() -- Associates Stream With File Descriptor
  • feof() -- Test End-of-File Indicator
  • ferror() -- Test for Read/Write Errors
  • fflush() -- Write Buffer to File
  • fgetc() -- Read a Character
  • fgetpos() -- Get File Position
  • fgets() -- Read a String
  • fgetwc() -- Read Wide Character from Stream
  • fgetws() -- Read Wide-Character String from Stream
  • fileno() -- Determine File Handle
  • floor() --Find Integer <=Argument
  • fmod() -- Calculate Floating-Point Remainder
  • fopen() -- Open Files
  • fprintf() -- Write Formatted Data to a Stream
  • fputc() -- Write Character
  • _fputchar - Write Character
  • fputs() -- Write String
  • fputwc() -- Write Wide Character
  • fputws() -- Write Wide-Character String
  • fread() -- Read Items
  • free() -- Release Storage Blocks
  • freopen() -- Redirect Open Files
  • frexp() -- Separate Floating-Point Value
  • fscanf() -- Read Formatted Data
  • fseek() -- fseeko() -- Reposition File Position
  • fsetpos() -- Set File Position
  • ftell() -- ftello() -- Get Current Position
  • fwide() -- Determine Stream Orientation
  • fwprintf() -- Format Data as Wide Characters and Write to a Stream
  • fwrite() -- Write Items
  • fwscanf() -- Read Data from Stream Using Wide Character
  • gamma() -- Gamma Function
  • _gcvt - Convert Floating-Point to String
  • getc() - getchar() -- Read a Character
  • getenv() -- Search for Environment Variables
  • _GetExcData() -- Get Exception Data
  • gets() -- Read a Line
  • getwc() -- Read Wide Character from Stream
  • getwchar() -- Get Wide Character from stdin
  • gmtime() -- Convert Time
  • gmtime_r() -- Convert Time (Restartable)
  • hypot() -- Calculate Hypotenuse
  • isalnum() - isxdigit() -- Test Integer Value
  • isascii() -- Test for Character Representable as ASCII Value
  • isblank() -- Test for Blank or Tab Character
  • iswalnum() to iswxdigit() -- Test Wide Integer Value
  • iswctype() -- Test for Character Property
  • _itoa - Convert Integer to String
  • labs() -- llabs() -- Calculate Absolute Value of Long and Long Long Integer
  • ldexp() -- Multiply by a Power of Two
  • ldiv() -- lldiv() -- Perform Long and Long Long Division
  • localeconv() -- Retrieve Information from the Environment
  • localtime() -- Convert Time
  • localtime_r() -- Convert Time (Restartable)
  • log() -- Calculate Natural Logarithm
  • log10() -- Calculate Base 10 Logarithm
  • _ltoa - Convert Long Integer to String
  • longjmp() -- Restore Stack Environment
  • malloc() -- Reserve Storage Block
  • mblen() -- Determine Length of a Multibyte Character
  • mbrlen() -- Determine Length of a Multibyte Character (Restartable)
  • mbrtowc() -- Convert a Multibyte Character to a Wide Character (Restartable)
  • mbsinit() -- Test State Object for Initial State
  • mbsrtowcs() -- Convert a Multibyte String to a Wide Character String (Restartable)
  • mbstowcs() -- Convert a Multibyte String to a Wide Character String
  • mbtowc() -- Convert Multibyte Character to a Wide Character
  • memchr() -- Search Buffer
  • memcmp() -- Compare Buffers
  • memcpy() -- Copy Bytes
  • memicmp() - Compare Bytes
  • memmove() -- Copy Bytes
  • memset() -- Set Bytes to Value
  • mktime() -- Convert Local Time
  • modf() -- Separate Floating-Point Value
  • nl_langinfo() --Retrieve Locale Information
  • perror() -- Print Error Message
  • pow() -- Compute Power
  • printf() -- Print Formatted Characters
  • putc() - putchar() -- Write a Character
  • putenv() -- Change/Add Environment Variables
  • puts() -- Write a String
  • putwc() -- Write Wide Character
  • putwchar() -- Write Wide Character to stdout
  • qsort() -- Sort Array
  • QXXCHGDA() -- Change Data Area
  • QXXDTOP() -- Convert Double to Packed Decimal
  • QXXDTOZ() --Convert Double to Zoned Decimal
  • QXXITOP() -- Convert Integer to Packed Decimal
  • QXXITOZ() -- Convert Integer to Zoned Decimal
  • QXXPTOD() -- Convert Packed Decimal to Double
  • QXXPTOI() -- Convert Packed Decimal to Integer
  • QXXRTVDA() -- Retrieve Data Area
  • QXXZTOD() -- Convert Zoned Decimal to Double
  • QXXZTOI() -- Convert Zoned Decimal to Integer
  • raise() -- Send Signal
  • rand(), rand_r() -- Generate Random Number
  • _Racquire() -- Acquire a Program Device
  • _Rclose() -- Close a File
  • _Rcommit() -- Commit Current Record
  • _Rdelete() -- Delete a Record
  • _Rdevatr() -- Get Device Attributes
  • realloc() -- Change Reserved Storage Block Size
  • regcomp() -- Compile Regular Expression
  • regerror() -- Return Error Message for Regular Expression
  • regexec() -- Execute Compiled Regular Expression
  • regfree() -- Free Memory for Regular Expression
  • remove() -- Delete File
  • rename() -- Rename File
  • rewind() -- Adjust Current File Position
  • _Rfeod() -- Force the End-of-Data
  • _Rfeov() -- Force the End-of-File
  • _Rformat() -- Set the Record Format Name
  • _Rindara() -- Set Separate Indicator Area
  • _Riofbk() -- Obtain I/O Feedback Information
  • _Rlocate() -- Position a Record
  • _Ropen() -- Open a Record File for I/O Operations
  • _Ropnfbk() -- Obtain Open Feedback Information
  • _Rpgmdev() -- Set Default Program Device
  • _Rreadd() -- Read a Record by Relative Record Number
  • _Rreadf() -- Read the First Record
  • _Rreadindv() -- Read from an Invited Device
  • _Rreadk() -- Read a Record by Key
  • _Rreadl() -- Read the Last Record
  • _Rreadn() -- Read the Next Record
  • _Rreadnc() -- Read the Next Changed Record in a Subfile
  • _Rreadp() -- Read the Previous Record
  • _Rreads() -- Read the Same Record
  • _Rrelease() -- Release a Program Device
  • _Rrlslck() -- Release a Record Lock
  • _Rrollbck() -- Roll Back Commitment Control Changes
  • _Rupdate() -- Update a Record
  • _Rupfb() -- Provide Information on Last I/O Operation
  • _Rwrite() -- Write the Next Record
  • _Rwrited() -- Write a Record Directly
  • _Rwriterd() -- Write and Read a Record
  • _Rwrread() -- Write and Read a Record (separate buffers)
  • scanf() -- Read Data
  • setbuf() -- Control Buffering
  • setjmp() -- Preserve Environment
  • setlocale() -- Set Locale
  • setvbuf() -- Control Buffering
  • signal() -- Handle Interrupt Signals
  • sin() -- Calculate Sine
  • sinh() -- Calculate Hyperbolic Sine
  • snprintf() -- Print Formatted Data to Buffer
  • sprintf() -- Print Formatted Data to Buffer
  • sqrt() -- Calculate Square Root
  • srand() -- Set Seed for rand() Function
  • sscanf() -- Read Data
  • strcasecmp() -- Compare Strings without Case Sensitivity
  • strcat() -- Concatenate Strings
  • strchr() -- Search for Character
  • strcmp() -- Compare Strings
  • strcmpi() - Compare Strings Without Case Sensitivity
  • strcoll() -- Compare Strings
  • strcpy() -- Copy Strings
  • strcspn() -- Find Offset of First Character Match
  • strdup - Duplicate String
  • strerror() -- Set Pointer to Run-Time Error Message
  • strfmon() -- Convert Monetary Value to String
  • strftime() -- Convert Date/Time to String
  • stricmp() - Compare Strings without Case Sensitivity
  • strlen() -- Determine String Length
  • strncasecmp() -- Compare Strings without Case Sensitivity
  • strncat() -- Concatenate Strings
  • strncmp() -- Compare Strings
  • strncpy() -- Copy Strings
  • strnicmp - Compare Substrings Without Case Sensitivity
  • strnset - strset - Set Characters in String
  • strpbrk() -- Find Characters in String
  • strptime()-- Convert String to Date/Time
  • strrchr() -- Locate Last Occurrence of Character in String
  • strspn() --Find Offset of First Non-matching Character
  • strstr() -- Locate Substring
  • strtod() -- Convert Character String to Double
  • strtok() -- Tokenize String
  • strtok_r() -- Tokenize String (Restartable)
  • strtol() -- strtoll() -- Convert Character String to Long and Long Long Integer
  • strtoul() -- strtoull() -- Convert Character String to Unsigned Long and Unsigned Long Long Integer
  • strxfrm() -- Transform String
  • swprintf() -- Format and Write Wide Characters to Buffer
  • swscanf() -- Read Wide Character Data
  • system() -- Execute a Command
  • tan() -- Calculate Tangent
  • tanh() -- Calculate Hyperbolic Tangent
  • time() -- Determine Current Time
  • tmpfile() -- Create Temporary File
  • tmpnam() -- Produce Temporary File Name
  • toascii() -- Convert Character to Character Representable by ASCII
  • tolower() - toupper() -- Convert Character Case
  • towctrans() -- Translate Wide Character
  • towlower() -towupper() -- Convert Wide Character Case
  • _ultoa - Convert Unsigned Long Integer to String
  • ungetc() -- Push Character onto Input Stream
  • ungetwc() -- Push Wide Character onto Input Stream
  • va_arg() - va_end() - va_start() -- Access Function Arguments
  • vfprintf() -- Print Argument Data to Stream
  • vfscanf() -- Read Formatted Data
  • vfwprintf() -- Format Argument Data as Wide Characters and Write to a Stream
  • vfwscanf() -- Read Formatted Wide Character Data
  • vprintf() -- Print Argument Data
  • vscanf() -- Read Formatted Data
  • vsnprintf() -- Print Argument Data to Buffer
  • vsprintf() -- Print Argument Data to Buffer
  • vsscanf() -- Read Formatted Data
  • vswprintf() -- Format and Write Wide Characters to Buffer
  • vswscanf() -- Read Formatted Wide Character Data
  • vwprintf() -- Format Argument Data as Wide Characters and Print
  • vwscanf() -- Read Formatted Wide Character Data
  • wcrtomb() -- Convert a Wide Character to a Multibyte Character (Restartable)
  • wcscat() -- Concatenate Wide-Character Strings
  • wcschr() -- Search for Wide Character
  • wcscmp() -- Compare Wide-Character Strings
  • wcscoll() --Language Collation String Comparison
  • wcscpy() -- Copy Wide-Character Strings
  • wcscspn() -- Find Offset of First Wide-Character Match
  • wcsftime() -- Convert to Formatted Date and Time
  • __wcsicmp() -- Compare Wide Character Strings without Case Sensitivity
  • wcslen() -- Calculate Length of Wide-Character String
  • wcslocaleconv() -- Retrieve Wide Locale Information
  • wcsncat() -- Concatenate Wide-Character Strings
  • wcsncmp() -- Compare Wide-Character Strings
  • wcsncpy() -- Copy Wide-Character Strings
  • __wcsnicmp() -- Compare Wide Character Strings without Case Sensitivity
  • wcspbrk() -- Locate Wide Characters in String
  • wcsptime()-- Convert Wide Character String to Date/Time
  • wcsrchr() -- Locate Last Occurrence of Wide Character in String
  • wcsrtombs() -- Convert Wide Character String to Multibyte String (Restartable)
  • wcsspn() -- Find Offset of First Non-matching Wide Character
  • wcsstr() -- Locate Wide-Character Substring
  • wcstod() -- Convert Wide-Character String to Double
  • wcstok() -- Tokenize Wide-Character String
  • wcstol() -- wcstoll() -- Convert Wide Character String to Long and Long Long Integer
  • wcstombs() -- Convert Wide-Character String to Multibyte String
  • wcstoul() -- wcstoull() -- Convert WideCharacter String to Unsigned Long and Unsigned Long Long Integer
  • wcswcs() -- Locate Wide-Character Substring
  • wcswidth() -- Determine the Display Width of a Wide Character String
  • wcsxfrm() -- Transform a Wide-Character String
  • wctob() -- Convert Wide Character to Byte
  • wctomb() -- Convert Wide Character to Multibyte Character
  • wctrans() --Get Handle for Character Mapping
  • wctype() -- Get Handle for Character Property Classification
  • wcwidth() -- Determine the Display Width of a Wide Character
  • wfopen() --Open Files
  • wmemchr() --Locate Wide Character in Wide-Character Buffer
  • wmemcmp() --Compare Wide-Character Buffers
  • wmemcpy() --Copy Wide-Character Buffer
  • wmemmove() -- Copy Wide-Character Buffer
  • wmemset() -- Set Wide Character Buffer to a Value
  • wprintf() -- Format Data as Wide Characters and Print
  • wscanf() -- Read Data Using Wide-Character Format String
  • Run-Time Considerations
  • errno Macros
  • errno Values for Integrated File System Enabled C Stream I/O
  • Record Input and Output Error Macro to Exception Mapping
  • Signal Handling Action Definitions
  • Signal to iSeries Exception Mapping
  • Cancel Handler Reason Codes
  • Exception Classes
  • Data Type Compatibility
  • Run-time Character Set
  • Asynchronous Signal Model
  • Unicode Support
  • Reasons to Use Unicode Support
  • Pseudo CCSID Neutrality
  • Standard Files
  • Considerations
  • Default File CCSID
  • Newline Character
  • Conversion Errors

  • Appendixes

  • Appendix A. Library Functions and Extensions
  • Standard C Library Functions Table, By Name
  • ILE C Library Extensions to C Library Functions Table
  • Appendix B. Notices
  • Programming Interface Information
  • Trademarks
  • Bibliography

  • Index

  • [ Top of Page | Previous Page | Next Page | Table of Contents | Index ]