XL C/C For Z/VM: User MJs Guide

Transcription

XL C/C for z/VM User's Guideversion 1 release 2SC09-7625-01

XL C/C for z/VM User's Guideversion 1 release 2SC09-7625-01

Note:Before using this information and the product it supports, read the information in “Notices” on page 127.This edition applies to version 1, release 2, modification 0 of IBM XL C/C for z/VM (product number 5654-A22),and to all subsequent releases and modifications until otherwise indicated in new editions.This edition replaces SC09-7625-00. Copyright International Business Machines Corporation 2003, 2008.US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contractwith IBM Corp.

ContentsFigures. . . . . . . . . . . . . . . . . . . . . . . . . . . viiTables . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixAbout This Document . . . . . .Intended Audience . . . . . . . .Conventions and Terminology . . . .How to Read Syntax Diagrams . . .Where to Find More Information . .How to Send Your Comments to IBM . xi. xi. xi. xii. xiii. xiiiSummary of Changes . . . . . . . . . . . . . . .SC09-7625-01, IBM XL C/C for z/VM, Version 1 Release 2 .IBM XL C/C for z/VM . . . . . . . . . . . . . .Language Environment for z/VM Upgrade . . . . . . .Program Management Binder for CMS Upgrade . . . . .Chapter 1. About IBM XL C/C for z/VM . . . . .Migration Considerations . . . . . . . . . . . .Differences between IBM XL C/C for z/VM and z/OSThe C Language . . . . . . . . . . . . . . .The C Language . . . . . . . . . . . . . .Common Features of the C and C Compilers . . .Class Library . . . . . . . . . . . . . . . .Utilities . . . . . . . . . . . . . . . . . .Language Environment . . . . . . . . . . . .z/VM OpenExtensions . . . . . . . . . . . . .OpenExtensions Services . . . . . . . . . .Applications with OpenExtensions Services . . . .Applications with OpenExtensions Interoperability .Softcopy Examples . . . . . . . . . . . . . . . . . . . .XL C/C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter 2. C Example . . . . . . . . . . . .Example of a C Program . . . . . . . . . . . .CCNUAAM . . . . . . . . . . . . . . . .CCNUAAN . . . . . . . . . . . . . . . .Compiling, Binding, and Running the C Example . . .Non-XPLINK and XPLINK under CMS . . . . . .Non-XPLINK and XPLINK under the OpenExtensions . . . . . . .ShellChapter 3. C Examples . . . . . . . . . . . . .Example of a C Program . . . . . . . . . . . . .CCNUBRH . . . . . . . . . . . . . . . . . .CCNUBRC . . . . . . . . . . . . . . . . . .Compiling, Binding, and Running the C Example . . . .Non-XPLINK and XPLINK under CMS . . . . . . . .Non-XPLINK and XPLINK under the OpenExtensions ShellExample of a C Template Program . . . . . . . . .CCNUTMP . . . . . . . . . . . . . . . . . .Compiling, Binding, and Running the C Template Example .Under CMS . . . . . . . . . . . . . . . . . .Under the OpenExtensions Shell . . . . . . . . . . Copyright IBM Corp. 2003, 5151617181819iii

Chapter 4. Compiler Options . . . . . . . . .Specifying Compiler Options . . . . . . . . . .Specifying Compiler Options Using #pragma optionsCompiler Option Defaults . . . . . . . . . . .Summary of Compiler Options . . . . . . . . .Descriptions of Compiler Options . . . . . . . .Compiler Options Not Supported . . . . . . .Compiler Options with Operational Differences . .Using the C Compiler Listing . . . . . . . . . .Using the C Compiler Listing . . . . . . . . .21212223232323243536Chapter 5. Compiler Options under OpenExtensions .Specifying Compiler Options Using c89/cxx . . . . .c89/cxx Default Compiler Settings . . . . . . . . .c89 Selectable Compiler Settings . . . . . . . . .Format . . . . . . . . . . . . . . . . . .Description . . . . . . . . . . . . . . . .Feature Test Macros . . . . . . . . . . . . . .37373737373839Chapter 6. Runtime Options . . . . . . . . . . . . . . . . . . . 41Specifying Runtime Options . . . . . . . . . . . . . . . . . . . . 41Runtime Options Using Language Environment . . . . . . . . . . . . . 41Chapter 7. Compiling a C/C Program . .Invoking the XL C/C Compiler . . . . .GLOBAL Command for Using the LanguageSyntax of the CC EXEC . . . . . . .Specifying the Input File . . . . . . .Specifying Compiler Options . . . . . .Creating Input Source Files . . . . . .Specifying Output Files . . . . . . . .Valid Input/Output File Types . . . . . .Using Include Files . . . . . . . . .Determining If filename Is In Absolute FormUsing LSEARCH and SEARCH . . . . .Search Sequences for Include Files . . . .With the NOOE option in effect . . . . .With the OE option in effect . . . . . .iv. . . . .Library. . . . . . . . . . . . . . . . . . . . . . . . .434343444446474849495253545455Chapter 8. Binding and Running a C/C Program . . . . .Library Routine Considerations . . . . . . . . . . . . . .Creating an Executable Program . . . . . . . . . . . . .Language Environment Sidedeck Files and TXTLIBs . . . . .CMOD Options . . . . . . . . . . . . . . . . . . .Examples . . . . . . . . . . . . . . . . . . . . .Using the LOAD and GENMOD Commands . . . . . . . . .Using the BIND Command . . . . . . . . . . . . . . .Using the LKED Command . . . . . . . . . . . . . . .Using FILEDEF to Define Input and Output Files . . . . . . .Preparing a Reentrant Program . . . . . . . . . . . . . .Linking Modules for Interlanguage Calls . . . . . . . . . . .Running a Program . . . . . . . . . . . . . . . . . .Making the Runtime Libraries Available for Execution . . . . . .Making the Language Environment Library Available for VM/CMSSearch Sequence for Library Files . . . . . . . . . . . .Specifying Runtime Options . . . . . . . . . . . . . . .5757585959616263646465656666666666XL C/C for z/VM: User's Guide. . . . . . . . .Environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Message Handling. . . . . . . . . . . . . . . . . . . . . . . 67Chapter 9. Compiling a C/C Program under OpenExtensionsCompiling with c89/cxx . . . . . . . . . . . . . . . . .Compiler Selection . . . . . . . . . . . . . . . . .Compiling and Building in One Step with c89/cxx . . . . . . .Using the make Utility . . . . . . . . . . . . . . . . .6969707071Chapter 10. Binding and Running a C/C Program under OpenExtensionsUsing the c89 Utility to Bind and Create Executable Files . . . . . . . . .c89 Binder Options . . . . . . . . . . . . . . . . . . . . . . .Binder Options . . . . . . . . . . . . . . . . . . . . . . . .Specifying Runtime Options under OpenExtensions . . . . . . . . . . .Running under OpenExtensions . . . . . . . . . . . . . . . . . .OpenExtensions Application Program Environments . . . . . . . . . .Placing a CMS Application Program Load Module in the File System . . . .Running a CMS Module from the OpenExtensions Shell. . . . . . . . .Running an OpenExtensions XL C/C Application Executable File from theOpenExtensions Shell . . . . . . . . . . . . . . . . . . . .737373747474747475Chapter 11. Object Library Utility . . .Creating an Object Library under VM/CMS.LINKLOAD EXEC . . . . . . . . .Object Library Utility Map . . . . . . .77777980Chapter 12. Filter Utility . . . . . . .CXXFILT Options . . . . . . . . . .SYMMAP NOSYMMAP . . . . . .SIDEBYSIDE NOSIDEBYSIDE . . .WIDTH(width) NOWIDTH . . . . .REGULARNAME NOREGULARNAMECLASSNAME NOCLASSNAME . . .SPECIALNAME NOSPECIALNAME .Unknown Type of Name . . . . . .Running CXXFILT under VM/CMS . . . .87888888888888898989Chapter 13. DSECT Conversion UtilityDSECT Utility Options . . . . . . .SECT . . . . . . . . . . . .BITF0XL NOBITF0XL . . . . . .COMMENT NOCOMMENT . . . .DEFSUB NODEFSUB . . . . . .EQUATE NOEQUATE . . . . . .HDRSKIP NOHDRSKIP . . . . .INDENT NOINDENT . . . . . .LOCALE NOLOCALE . . . . . .LOWERCASE NOLOWERCASE . .OPTFILE NOOPTFILE . . . . .PPCOND NOPPCOND . . . . .SEQUENCE NOSEQUENCE . . .UNNAMED NOUNNAMED . . . .OUTPUT . . . . . . . . . . .RECFM . . . . . . . . . . .LRECL . . . . . . . . . . . .BLKSIZE . . . . . . . . . . .Generation of C Structures . . . . .75

Chapter 14. Code Set and LocaleCode Set Conversion Utilities . .iconv Utility . . . . . . . .genxlt Utility . . . . . . .localedef Utility . . . . . . .Utilities. . . . . . . . . . . . .103103103104106Chapter 15. OpenExtensions ar and make UtlitiesOpenExtensions Archive Libraries . . . . . . .Creating Archive Libraries . . . . . . . . . .Creating Makefiles . . . . . . . . . . . . .109109110110Appendix A. IBM-Supplied EXECs . . . . . . . . . . . . . . . . . 111Appendix B. XL C/C Compiler Return Codes and Messages. . . . . 113Appendix C. EXEC Error Messages . . . . . . . . . . . . . . . . 115Appendix D. Runtime Error Messages and Return Codes . . . . . . . 117perror Messages . . . . . . . . . . . . . . . . . . . . . . . . 117XL C/C Runtime Return Codes . . . . . . . . . . . . . . . . . 117Appendix E. Utility MessagesDSECT Utility Messages . . .Return Codes . . . . . .Messages . . . . . . .Appendix F. LayoutFILEID Field . . .FILEEND Field . .ERROR Field . . .of.the Events File. . . . . . . . . . . . . . . .119119119119.123123124124Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . 127Programming Interface Information . . . . . . . . . . . . . . . . . 128Trademarks. . . . . . . . . . . . . . . . . . . . . . . . . . 129Glossary. . . . . . . . . . . . . . . . . . . . . . . . . . 131Bibliography . . . . . . . . . . . . . . .IBM XL C/C for z/VM Publications . . . . . .z/OS XL C/C Publications . . . . . . . . .Other IBM C/C Publications . . . . . . . . .IBM Debug Tool . . . . . . . . . . . . . .z/VM Publications . . . . . . . . . . . . .Where to Get z/VM Information . . . . . . .z/VM Base Library . . . . . . . . . . . .Publications for z/VM Optional Features . . . .Publications for Associated IBM Software Products. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .and Hardware Features.159159159159159159159159161161Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163viXL C/C for z/VM: User's Guide

s to Fahrenheit Conversion . . . . . . . . . . . . . . . . . . . . . . . . . 7User #include File for Conversion Program . . . . . . . . . . . . . . . . . . . . . . 8Commands to Compile, Bind, and Run a C Program under VM/CMS . . . . . . . . . . . . 9Commands to Compile, Bind, and Run a C Program under OpenExtensions . . . . . . . . . 10Header File for the Biorhythm Example . . . . . . . . . . . . . . . . . . . . . . . 11z/OS C Biorhythm Example Program . . . . . . . . . . . . . . . . . . . . . . 13Commands to Compile, Bind, and Run a C Program under CMS . . . . . . . . . . . . 15Commands to Compile, Bind, and Run a C Program under OpenExtensions . . . . . . . . 16C Template Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Commands to Compile, Bind, and Run a C Template Program under CMS . . . . . . . . 19Commands to Compile, Bind, and Run a C Template Program under OpenExtensions . . . . 19Specifying a CMS Record Input File under VM/CMS (Example 1) . . . . . . . . . . . . . 45Specifying a CMS Record Input File under VM/CMS (Example 2) . . . . . . . . . . . . . 45Specifying a BFS Input File under VM/CMS (Example 1) . . . . . . . . . . . . . . . . 46Specifying a BFS Input File under VM/CMS (Example 2) . . . . . . . . . . . . . . . . 46Specifying Compiler Options under VM/CMS (Example 1) . . . . . . . . . . . . . . . . 47Specifying Compiler Options under VM/CMS (Example 2) . . . . . . . . . . . . . . . . 47Specifying Compiler Options for BFS Files . . . . . . . . . . . . . . . . . . . . . 47Testing If filename Is In Absolute Form . . . . . . . . . . . . . . . . . . . . . . . 52Determining If LSEARCH/SEARCH opt Is BFS Path . . . . . . . . . . . . . . . . . . 53CMS Commands to Bind and Run a C Program . . . . . . . . . . . . . . . . . . . 57CMS Commands to Bind and Run a C Program . . . . . . . . . . . . . . . . . . 57Example 1 - Using the CMOD EXEC . . . . . . . . . . . . . . . . . . . . . . . 61Example 2 - Using the CMOD EXEC . . . . . . . . . . . . . . . . . . . . . . . 61Example 3 - Using the CMOD EXEC . . . . . . . . . . . . . . . . . . . . . . . 62Example 4 - Using the CMOD EXEC . . . . . . . . . . . . . . . . . . . . . . . 62Using the LOAD and GENMOD commands . . . . . . . . . . . . . . . . . . . . . 63Running under CMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Running the DSECT Utility under CMS . . . . . . . . . . . . . . . . . . . . . . . 91SIMPLE C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123ERR H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Sample SYSEVENT file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Copyright IBM Corp. 2003, 2008vii

viiiXL C/C for z/VM: User's Guide

Tables1.2.3.4.5.6.7.8.9.10.11.c89 Option and Corresponding Compiler Option . . . . . . .Default CMS File Types and BFS Suffixes for Output Files . . .Valid Combinations of Source and Output File Types . . . . .Include Directive and Resulting File Names . . . . . . . . .Examples of Search Order for OpenExtensions . . . . . . .CMOD options . . . . . . . . . . . . . . . . . . . .DSECT Utility Options, Abbreviations, and IBM-Supplied Defaults .Return Codes from the DSECT Utility . . . . . . . . . . .Explanation of the FILEID Field Layout . . . . . . . . . .Explanation of the FILEEND Field Layout . . . . . . . . .Explanation of the ERROR Field Layout . . . . . . . . . . Copyright IBM Corp. 2003, 2008.39484951565992119124124124ix

xXL C/C for z/VM: User's Guide

About This DocumentThis document provides information about using IBM XL C/C for z/VM toimplement (compile, bind, and run) C and C programs with LanguageEnvironment . It contains guidelines for preparing C and C programs to rununder z/VM .This document includes information about the following topics:v Introduction to IBM XL C/C for z/VMv Differences between IBM XL C/C for z/VM and z/OS XL C/C v How to compile, bind, and run a C/C program with IBM XL C/C for z/VM inthe CMS environment of z/VMv How to compile, bind, and run a C/C program with IBM XL C/C for z/VM inthe z/VM OpenExtensions environmentIntended AudienceThis information is intended for programmers who want to write C and C applications on the z/VM platform. To use this information, you must have a workingknowledge of the C and C programming languages, Language Environment forz/VM, and z/VM OpenExtensions.Conventions and Terminology Throughout this document, the following conventions are used:v XL C/C is used to represent IBM XL C/C for z/VM.v z/VM refers to z/VM V5.4 or later.v VM/CMS is used to represent the CMS environment of z/VM.v Language Environment is used to represent Language Environment for z/VM.v OpenExtensions is used to represent the z/VM OpenExtensions environment.The term filename is used to refer to both files in general, regardless of the specificfile system in which they reside, and also more specifically to refer to the namecomponent of a minidisk or shared file system file identifier. The intended usageshould be clear from the context.It is often necessary, however, to make a distinction between files that reside in thebyte file system, and those that reside on minidisks or in the shared file system (butnot in the byte file system). For convenience, the former will be referred to as BFSfiles, and the latter as CMS files.The term ddname is used to refer to a data definition name. The relation of addname to one or more CMS files is achieved by using the FILEDEF command orfor a BFS file by using the OPENVM PATHDEF CREATE command.The term FILEDEF is used to refer to the data definition created by the use of theFILEDEF command.The term PATHDEF is used to refer to the data definition created by the use of theOPENVM PATHDEF CREATE command. Copyright IBM Corp. 2003, 2008xi

The term program module is defined as the output of the binder. It is a collectiveterm for program object and load module.How to Read Syntax DiagramsThis document describes the syntax for commands, directives, and statements,using the following structure:v Read the syntax diagrams from left to right, from top to bottom, following the pathof the line.A double right-arrowhead indicates the beginning of a command, directive, orstatement. A single right-arrowhead indicates that it is continued on the next line.(In the following diagrams, "statement" represents a command, directive, orstatement). statement The following indicates a continuation; the opposing arrowheads indicate the endof a command, directive, or statement. statement Diagrams of syntactical units other than complete commands, directives, orstatements look like this: statement v Required items are on the horizontal line (the main path). statement required item v Optional items are below the main path. statement optional itemv Default items are above the main path.default item statement v If you can choose from two or more items, they are vertical in a stack.If you must choose one of the items, one item of the stack is on the main path. statementrequired choice1required choice2 If choosing one of the items is optional, the entire stack is below the main path. statement optional choice1optional choice2v An arrow that returns to the left above the main line indicates an item that youcan repeat. statement repeatable itemxiiXL C/C for z/VM: User's Guide

A repeat arrow above a stack indicates that you can make more than one choicefrom the stacked items, or repeat a single choice.v Keywords are not italicized, and should be entered exactly as shown. You mustspell keywords exactly as shown in the syntax diagram. Variables are in italics (inhardcopy) and lowercase letters for example, filename). They representuser-supplied names or values.v If the syntax diagram shows punctuation marks, parentheses, arithmeticoperators, or other nonalphanumeric characters, you must enter them as part ofthe syntax.Note: You should include at least one blank space between tokens unlessotherwise specified.Where to Find More InformationThis document is intended to be used in conjunction with the following documents:v z/OS XL C/C documents (included in the IBM XL C/C for z/VM library)v Other IBM C/C programming documents (included in the IBM XL C/C forz/VM library)v z/VM and z/OS Language Environment documents (included in the z/VM library)v z/VM OpenExtensions documents (included in the z/VM library)v z/VM and z/OS Program Management Binder documents (included in the z/VMlibrary)For more information, see “Bibliography” on page 159.Links to Other Online DocumentsIf you are viewing the Adobe Portable Document Format (PDF) version of thisdocument, it may contain links to other documents. A link to another documentis based on the name of the requested PDF file. The name of the PDF file foran IBM document is unique and identifies the edition. The links provided inthis document are for the editions (PDF names) that were current when thePDF file for this document was generated. However, newer editions of somedocuments (with different PDF names) may exist. A link from this document toanother document works only when both documents reside in the samedirectory.How to Send Your Comments to IBMIBM welcomes your comments. You can use any of the following methods:v Complete and mail the Readers’ Comments form (if one is provided at the backof this document) or send your comments to the following address:IBM CorporationMHVRCFS, Mail Station P1812455 South RoadPoughkeepsie, New York 12601-5400U.S.A.v Send your comments by FAX:– United States and Canada: 1-845-432-9405– Other Countries: 1 845 432 9405About This Documentxiii

v Send your comments by electronic mail to one of the following addresses:– Internet: mhvrcfs@us.ibm.com– IBMLink (US customers only): IBMUSM10(MHVRCFS)Be sure to include the following in your comment or note:v Title and complete publication number of the documentv Page number, section title, or topic you are commenting onIf you would like a reply, be sure to also include your name, postal or e-mailaddress, telephone number, or FAX number.When you send information to IBM, you grant IBM a nonexclusive right to use ordistribute the information in any way it believes appropriate without incurring anyobligation to you.xivXL C/C for z/VM: User's Guide

Summary of ChangesThis book contains terminology, maintenance, and editorial changes. Technicalchanges or additions to the text and illustrations are indicated by a vertical line tothe left of the change.SC09-7625-01, IBM XL C/C for z/VM, Version 1 Release 2This edition supports the general availability of IBM XL C/C for z/VM, V1.2, andz/VM V5.4.IBM XL C/C for z/VMIBM XL C/C for z/VM, V1.2, is a z/VM-enabled version of z/OS V1.9 XL C/C . Itis an upgrade to and replacement for IBM C/C for z/VM, V1.1, and includessupport for new and enhanced compiler features and options.Language Environment for z/VM UpgradeThe runtime libraries included with Language Environment for z/VM (function level540, provided with z/VM V5.4) have been upgraded to the same level shipped withz/OS V1.9 Language Environment.Program Management Binder for CMS UpgradeThe Program Management Binder for CMS included with z/VM V5.4 has beenupgraded to the same level shipped with z/OS V1.9. Copyright IBM Corp. 2003, 2008xv

xviXL C/C for z/VM: User's Guide

Chapter 1. About IBM XL C/C for z/VM IBM XL C/C for z/VM is the language-centered C/C application developmentenvironment on the z/VM platform. It is a z/VM-enabled version of z/OS V1.9 XLC/C . IBM XL C/C for z/VM includes a C/C compiler component (referred toas the XL C/C compiler) and some C/C application development utilities.Migration ConsiderationsFor information on migrating from an earlier IBM C or C/C compiler, see the z/OSV1.9 edition of z/OS: XL C/C Compiler and Run-Time Migration Guide for theApplication Programmer, GC09-4913-05:v For IBM AD/Cycle C/370 V1.2 and IBM C for VM/ESA V3.1, see Part 2,“Migration of pre-OS/390 C/C applications to z/OS V1R9 XL C/C ”.Note that the IBM C for VM/ESA V3.1 compiler is equivalent to the IBM C/C for MVS/ESA V3.1 compiler.v For IBM C/C for z/VM V1.1, see Part 4, “Migration of earlier z/OS C/C applications to z/OS V1R9 XL C/C ”.Note that the IBM C/C for z/VM V1.1 compiler is equivalent to the IBM z/OSV1.2 C/C compiler.Differences between IBM XL C/C for z/VM and z/OS XL C/C The following z/OS XL C/C compiler features are not supported in IBM XL C/C for z/VM:v Interprocedural AnalysisThe associated compiler option is IPA.v ASCII supportThe associated compiler option is ASCII.v Host Performance Analyzerv Assembler code generation The associated compiler options are METAL, GENASM, PROLOG, and EPILOG.For the complete list of unsupported compiler options, see “Compiler Options NotSupported” on page 23.Some supported z/OS XL C/C compiler options operate differently in IBM XLC/C for z/VM. See “Compiler Options with Operational Differences” on page 24.The C LanguageThe C language is a general-purpose, function-oriented programming language thatallows a programmer to create applications quickly and easily. C provides high-levelcontrol statements and data types as do other structured programming languages,and it also provides many of the benefits of a low-level language.The C LanguageThe C language is based on the C language, but incorporates support forobject-oriented concepts. For a detailed description of the differences between C and C, see z/OS: XL C/C Language Reference. Copyright IBM Corp. 2003, 20081

The C language introduces classes, which are user-defined data types that maycontain data definitions and function definitions. You can use classes fromestablished class libraries, develop your own classes, or derive new classes fromexisting classes by adding data descriptions and functions. New classes can inheritproperties from one or more classes. Not only do classes describe the data typesand functions available, but they can also hide (encapsulate) the implementationdetails from user programs. An object is an instance of a class.The C language also provides templates and other features that include accesscontrol to data and functions, and better type checking and exception handling. Italso supports polymorphism and the overloading of operators.Common Features of the C and C CompilersThe C and C compilers offer many features to help your work:v Optimization support.The OPTIMIZE compiler option instructs the compiler to optimize the machineinstructions it generates to produce faster-running object code to improveapplication performance at run time.v Dynamic link libraries (DLLs) to share parts among applications or parts ofapplications , and dynamically link to exported variables and functions at runtime.DLLs allow a function reference or a variable reference in one executable to usea definition located in another executable at run time. You can use bothload-on-reference and load-on-demand DLLs. When your program refers to afunction or variable which resides in a DLL, XL C/C generates code to load theDLL and access the functions and variables within it. This is calledload-on-reference. Alternatively, your program can use C library functions to loada DLL and look up the address of functions and variables within it. This is calledload-on-demand. Your application code explicitly controls load-on-demand DLLsat the source level.You can use DLLs to split applications into smaller modules and improve systemmemory usage. DLLs also offer more flexibility for building, packaging, andredistributing applications.v Full program reentrancy.v Locale-based internationalization support derived from the IEEE POSIX1003.2-1992 standard. Also derived from the X/Open CAE Specification, SystemInterface Definitions, Issue 4 and Issue 4 Version 2. This allows programmers touse locales to specify language/country characteristics for their applications.v Year 2000 supportv Support for the Euro currency.Class LibraryIBM XL C/C for z/VM uses the following thread-safe class library:v Standard C Library, including the Standard Template Library (STL), and otherlibrary features of Programming languages - C (ISO/IEC 14882:1998) andProgramming languages - C (ISO/IEC 14882:2003(E)) The Standard C Library includes the following:v Standard C I/O Stream Library for performing input and output (I/O) operationsv Standard C Complex Mathematics Library for manipulating complex numbers2XL C/C for z/VM: User's Guide

v Standard Template Library (STL) which is composed of C template-basedalgorithms, container classes, iterators, localization objects, and the string classUtilitiesIBM XL C/C for z/VM provides the following utilities:v The CXXFILT utility to map C mangled names to the original source.v The DSECT Conversion Utility to convert descriptive assembler DSECTs intoC/C data structures.v The localedef utility to read the locale definition file and produce a locale objectthat the locale-specific library functions can use.Language EnvironmentIBM XL C/C for z/VM exploits the runtime library and common library of baseroutines available with z/VM and the C/C Language Environment for z/VM(referred to as Language Environment in this document).Language Environment establishes a common runtime environment and commonruntime services for language products, user programs, and other products.The common execution environment is made up of data items and servicesperformed by library routines available to a particular application running in theenvironment. The services that Language Environment can provide to yourapplication include:v Services that satisfy basic requirements common to most applications. Theseinclude support for the initialization and termination of applications, allocation ofstorage, support for interlanguage communication (ILC) and condition handling.v Extende

IBM XL C/C for z/VM to implement (compile, bind, and run) C and C programs with Language Environment . It contains guidelines for preparing C and C programs to run under z/VM . This document includes information about the following topics: v Introduction to IBM XL C/C for z/VM v Differences between IBM XL C/C for z/VM and z/OS .