Table of Contents (exploded view)
Abstract for Metal C Programming Guide and Reference
Summary of changes for z/OS Version 2 Release 2
About IBM z/OS Metal C
Metal C environment
Programming with Metal C
Metal C and MVS linkage conventions
Compiler-generated HLASM source code
Characteristics of compiler-generated HLASM source code
Structure of a compiler-generated HLASM source program
Prolog and epilog code
Supplying your own prolog and epilog code
Compiler-generated global SET symbols
SCCNSAM(CCNZGBL) macro
SCCNSAM(MYPROLOG) macro
SCCNSAM(MYEPILOG) macro
Compiler-generated default prolog and epilog code
Supplying your own HLASM statements
Inserting HLASM instructions into the generated source code
Using the __asm statement
Treatment of the code format string
C expressions as __asm operands
C expressions as read-write __asm operands
Specifying and using the list form of a macro
Inserting non-executable HLASM statements into the generated source code
Reserving a register for a global variable
AMODE-switching support
RENT mode support
argc argv parsing support
AR-mode programming support
Defining an alternative name for function "main"
Building Metal C programs
Examples of building Metal C programs
C source file
Building Metal C programs using z/OS UNIX System Services
Building Metal C programs using JCL
Building Metal C programs with IPA
Generation of debugging information
IDF debugger invocation
Summary of useful references for the Metal C programmer
Header files
builtins.h
ctype.h
float.h
inttypes.h
limits.h
math.h
metal.h
stdarg.h
stddef.h
stdio.h
stdint.h
stdlib.h
string.h
C functions available to Metal C programs
Characteristics of Metal C runtime library functions
System and static object libraries
User-replaceable heap services
abs() — Calculate integer absolute value
atoi() — Convert character string to integer
atol() — Convert character string to long
atoll() — Convert character string to signed long long
calloc() — Reserve and initialize storage
__cinit() - Initialize a Metal C environment
__cterm() - Terminate a Metal C environment
div() — Calculate quotient and remainder
free() — Free a block of storage
isalnum() to isxdigit() — Test integer value
isalpha() — Test for alphabetic character classification
isblank() — Test for blank character classification
iscntrl() — Test for control classification
isdigit() — Test for decimal-digit classification
isgraph() — Test for graphic classification
islower() — Test for lowercase
isprint() — Test for printable character classification
ispunct() — Test for punctuation classification
isspace() — Test for space character classification
isupper() — Test for uppercase letter classification
isxdigit() — Test for hexadecimal digit Classification
labs() — Calculate long absolute value
ldiv() — Compute quotient and remainder of integral division
llabs() — Calculate absolute value of long long integer
lldiv() — Compute quotient and remainder of integral division for long long type
malloc() — Reserve storage block
__malloc31() — Allocate 31–bit storage
memccpy() — Copy bytes in memory
memchr() — Search buffer
memcmp() — Compare bytes
memcpy() — Copy buffer
memmove() — Move buffer
memset() — Set buffer to value
qsort() — Sort array
rand() — Generate random number
rand_r() — Pseudo-random number generator
realloc() — Change reserved storage block size
snprintf() — Format and write data
sprintf() — Format and Write Data
srand() — Set Seed for rand() Function
sscanf() — Read and Format Data
strcat() — Concatenate Strings
strchr() — Search for Character
strcmp() — Compare Strings
strcpy() — Copy String
strcspn() — Compare Strings
strdup() — Duplicate a String
strlen() — Determine String Length
strncat() — Concatenate Strings
strncmp() — Compare Strings
strncpy() — Copy String
strpbrk() — Find Characters in String
strrchr() — Find Last Occurrence of Character in String
strspn() — Search String
strstr() — Locate Substring
strtod — Convert Character String to Double
strtof — Convert Character String to Float
strtok() — Tokenize String
strtok_r() — Split String into Tokens
strtol() — Convert Character String to Long
strtold — Convert Character String to Long Double
strtoll() — Convert String to Signed Long Long
strtoul() — Convert String to Unsigned Integer
strtoull() — Convert String to Unsigned Long Long
tolower(), toupper() — Convert Character Case
va_arg(), va_copy(), va_end(), va_start() — Access Function Arguments
vsnprintf() — Format and print data to fixed length buffer
vsprintf() — Format and Print Data to Buffer
vsscanf() — Format Input of a STDARG Argument List
Function stack requirements
CICS programming interface examples
Runtime environment adapter
CICS application programming interface example
Data structures
Example description
Example code
CICS exit programming interface example
Example code
CICS definitions
JCL example