ILE C/C++ Programmer's Guide
- Program Creation in ILE
- ILE C Source to Add Integers and Print Characters
- Structure of Program MYPROG
- Example of a Basic Binder Listing
- Example of Header File (search.h)
- Source File that Contains Constructor Definitions for the Search Class
- File that Contains the Member Function Definition for the Search Class
- Source Code for myproga.cpp
- Calls between Program and Service Program
- Display Module Information Screen for a Sample Module SEARCH
- Example of a Binder Language Source File
- Binder Language Source File Generated for Module SEARCH
- Binder Language Source File Generated by the RTVBNDSRC Command
- Unresolved Import Requests in a Program with Circular References
- m1.cpp -- First Source File for Application with Circular References
- m2.cpp -- Second Source Files for Application with Circular References
- m3.cpp -- Third Source File for Application with Circular References
- Binder Language for Service Program SP1
- Binder Language for Service Program SP2
- Binder Language for Service Program SP1
- Example of Source Code to Create a Dummy C++ Program
- Source Code for Example myprog.cpp
- Exports from Service Program COST
- Import Requests in Programs COSTDPT1 and COSTDPT2
- Source Code for Service Program COST
- T1520REP -- ILE C Source to Pass Parameters to an ILE C Program
- Source File for a Program that Passes the Value 'Hello, World' to Another Program
- Calling Program XRUN2 Using the TFRCTL Command
- Example of Source Code that Transfers Control to Another Program
- Example of Source Code that Receives and Prints a Null-Terminated Character String
- Calling Program CALCOST from a User-Defined Command COST
- Source Code for Command Prompt that Runs the CALCOST Program
- Source Code for Program CALCOST
- Running Programs in a Named Activation Group
- Running Programs in Unnamed Activation Groups
- Running a Service Program in the Activation Groups of Calling Programs
- Example of Dynamic Allocation and De-Allocation of Storage for a Class Object
- Example of Dynamic Allocation and De-Allocation of Storage for an Array of Objects
- T1520XH7 -- ILE C Source for Exception Handling
- Example: Using ISO C Record I/O
- Example: Using ILE C Record I/O
- I/O Feedback Information
- Using the System Buffer
- Example: Opening a File Twice
- Example: Opening a File Once
- Using printf()
- Using printf() to Reduce Function Calls
- Example of a Program that Uses Linked Lists
- Example of Source Code that Uses a short Type Member to End a Linked List
- Example of Minimizing Padding by Rearranging Variables
- Sample Application: High-Level Input/Processing/Output Flow
- ILE Activation Group of the Sample Application
- DDS Source for Audit File T1520DD1
- T1520CL1 -- CL Source to Pass Variables to an ILE C Program
- T1520CM1 -- CL Command Source to Receive Input Data
- ILE C Source to Call Functions in Other Modules
- Sample ILE C Source to Calculate Tax and Format Cost for Output
- ILE C Source to Write an Audit Trail
- T1520IC4 -- ILE C Source to Export Tax Rate Data
- Binder Language Source to Export Tax Rate Data
- Binder Language Source to Export write_audit_trail Procedure
- Example of ILE C Source Data Definitions
- Examples of Using Pointers in Debug Sessions, Screen 1
- Examples of Using Pointers in Debug Sessions, Screen 2
- Examples of Simple Operations Used in Debug Expressions
- Examples of Using Bit Fields in Debug Expressions
- Examples of Using Structures and Unions in Debug Expressions
- Examples of Using Enumerations in Debug Expressions
- System and Space Pointers in ILE C Source Code
- Example of System and Space Pointer Display
- Module Source Display for DEBUGEX
- Module Source Display After Stepping into CPGM
- Using EVAL to Change a Variable
- Sample EVAL Commands for Pointers, Variables, and Bit Fields
- Sample EVAL Commands for C Structures, Unions and Enumerations
- Sample EVAL Commands for System and Space Pointers
- Sample EVAL Commands for C++ Expressions
- Using EVAL with a Class Template
- Using EVAL with a Function Template
- Source for Sample EVAL Commands
- Source for Sample EVAL Commands for Displaying System and Space Pointers
- Source for Sample EVAL Commands for Displaying C++ Constructs
- iSeries Data Management Records Mapping to an ILE C Stream File
- ILE C Source to Open an ILE C Text Stream File
- Writing to a Text Stream File
- ILE C Source to Write Characters to a Text Stream File
- Reading from a Text Stream File
- ILE C Source to Read Characters from a Text Stream File
- ILE C Source to Open a Binary Stream File
- Writing to a Binary Stream File One Character at a Time
- ILE C Source to Write Characters to a Binary Stream File
- Reading from a Binary Stream File One Character at a Time
- ILE C Source to Read Characters from a Binary Stream File
- Updating a Binary Stream File with Data Longer than Record Length
- ILE C Source to Update a Binary Stream File with Data Longer than the Record Length
- Updating a Binary Stream File with Data Shorter than Record Length
- ILE C Source to Update a Binary Stream File with Data Shorter than the Record Length
- Writing to a Binary Stream File One Record at a Time
- ILE C Source to Write to a Binary Stream File by Record
- Reading from a Binary Stream File a Record at a Time
- ILE C Source to Read from a Binary Stream File by Record
- Simple C Program to Clear a C Session
- T1520API -- ILE C Source to Call an ILE C Procedure
- The Integrated File System Interface
- Comparison of a Stream File and a Record-Oriented File
- iSeries Records Mapping to a C/C++ Stream File
- Comparison of Text Stream and Binary Stream Contents
- Header Description
- T1520DD8 -- DDS Source for Customer Records
- T1520EDF -- ILE C Source to Include an Externally Described Database File
- Ouput Listing from Program T1520EDF -- Customer Master Record
- Example of SLTFLD(*LVLCHK) with the Default TYPEDEFPFX(*OBJ)
- Example of SLTFLD(*LVLCHK) with the Default TYPEDEFPFX(*NONE)
- Example of SLTFLD(*LVLCHK) with the Default TYPEDEFPFX value *MYPREFIX
- ILE C Source Using the #pragma mapinc lvlchk Option
- T1520DD3 -- DDS Source for Program
- Ouput Listing from the Program
- DDS Source for a Display File
- Structure Definition for a Display File
- DDS Source for a Device File
- Structure Definitions for a Device File
- DDS Source for Indicators
- Structure Definition for Indicators
- Header Description Showing Comments for Indicators
- Structure Definition for Multiple Formats
- Structure Definitions for a Device File
- Structure Definitions for BOTH Option
- T1520ASP -- ILE C Source to Process a Database Record File in Arrival Sequence
- T1520DD3 -- DDS Source for Database Records
- T1520KSP -- ILE C Source to Process a Database Record File in Keyed Sequence
- T1520DD4 -- DDS Source for Database Records
- T1520REC -- ILE C Source to Process a Database File Using Record I/O Functions
- T1520DD5 -- DDS Source for Daily Transactions
- T1520DD6 -- DDS Source for Monthly Transactions
- T1520DD7 -- DDS Source for a Purchase Order Display
- T1520COM -- ILE C Source to Group File Operations Using Commitment Control
- T1520DD0 -- DDS Source for a Phone Book Display
- T1520ID2 -- ILE C Source to Specify Indicators in a Separate Indicator Area
- T1520DD9 -- DDS Source for a Phone Book Display
- T1520ID1 -- ILE C Source to Specify Indicators as Part of the File Buffer
- T1520DDD -- DDS Source for an I/O Display
- T1520DEV -- ILE C Source to Establish a Default Device
- T1520DDE -- DDS Source for Name and Password Display
- T1520CDV -- ILE C Source to Change the Default Device
- T1520DDF -- DDS Source for a Feedback Display
- T1520FBK -- ILE C Source to Use Feedback Information
- T1520DDG -- DDS Source for a Subfile Display
- T1520SUB -- ILE C Source to Use Subfiles
- T1520DDA -- DDS Source for Password and User ID
- T1520DDB -- DDS Source to Send Password and User ID
- T1520DDC -- DDS Source to Receive Password and User ID
- T1520ICF -- ILE C Source to Send and Receive Data
- T1520TGT -- ILE C Source to Check Data is Sent and Returned
- T1520FCF -- ILE C Source to Use First Character Forms Control
- Sample Source Statements for Program T1520TAP
- T1520TAP -- ILE C Source to Write to a Tape File
- T1520DSK -- ILE C Source to Write Records to a Diskette File
- Error Handling for OPM and ILE
- ILE C Source Code with Unhandled Exceptions
- ILE C Source to Check for the Return Value of fopen()
- ILE C Source to Check the errno Value for fopen()
- _C_Maj_Min_rc Type Definition
- _RIOFB_T Type Definition
- _Sys_Struct_T Type Definition
- _Maj_Min_rc_T Type Definition
- Definition of Structure _INTRPT_Hndlr_Parms_T
- ILE C Source to Scope Direct Monitor Handlers
- ILE C Source to Use Exception Classes
- ILE C Source to Handle Exceptions
- T1520XH1 -- ILE C Source to Use Direct Monitor Handlers -- main()
- T1520ICA -- ILE C Source that Uses Direct Monitor Handlers
- T1520XH2 -- ILE C Source to Use Direct Monitor Handlers -- Service Program
- T1520XH3 -- ILE C Source to Use Direct Monitors with Labels as Handlers
- T1520XH5 -- ILE C Source to Use ILE Condition Handlers -- main()
- T1520XH6 -- ILE C Source to Use ILE Condition Handlers -- Service Program
- T1520IC6 -- ILE C Source to Use ILE Condition Handlers
- T1520IC7 -- ILE C Source to Percolate a Message to Handle a Condition
- T1520IC8 -- ILE C Source to Promote a Message to Handle a Condition
- ILE C Source to Manage the State of a Signal Handler
- Resetting Signal Handlers
- Stacking Signal Handlers
- T1520SIG -- ILE C Source that Sets Up Signal Handlers
- Exception Handler Priority
- ILE C Source to Nest Exceptions
- T1520XH4 -- ILE C Source that Uses Cancel Handlers
- T1520DDJ -- DDS Source for a Phone Book Display
- T1520EHD -- ILE C Source to Handle Exceptions
- ILE C Source to Declare Pointer Variables
- ILE C++ Source to Declare Pointer Variables
- ILE C Source to Declare a Pointer to a Bound Procedure
- ILE C Source to Declare a Pointer to an iSeries Program as a Function Pointer
- ILE C++ Source to Declare a Pointer to an iSeries Program as a Function Pointer
- ILE C Source to Show OS/400 pointer casting
- T1520DL8 -- ILE C Source that Uses OS/400 pointers
- T1520DL9 -- ILE C Source that Uses OS/400 pointers
- Program and Procedure Calls on the Call Stack
- Example of Using the #pragma map Directive to Rename Functions
- An ILE C++ Function Declared As an External Function
- C++ Source File hourclas.cpp Definitions Used by C Source File hour.c
- C Source file hour.c that Uses Definitions from C++ Source File hourclas.cpp
- Example of a Shared C/C++ Header File
- Example of C++ Class without Virtual Functions
- Example of C Structure that Corresponds to C++ Class without Virtual Functions
- C++ Source File hourclas.cpp that Contains Classes Used by C Source File hour.c
- C Source File hour.c that Uses C++ Classes Defined in Source File hourclas.cpp
- Example of ILE C Structure Definition that Cannot Be Ported to ILE C++
- Example of Code with Decimal Constants and a Case Statement that Are Incompatible
- Example of ILE C Source Code Using the extern Linkage Specification
- Example of ILE C Source Code Using the #pragma argument Linkage Specification
- Example of ILE C++ Source Code Using the extern Linkage Specification
- BCD Macros that Port Code from ILE C to ILE C++
- ILE C Source Code to Port Code to a Packed Decimal Data Type
- ILE C++ Source Code to Port Code a Packed Decimal Data Type
- Example of Using BCD Macros to Port Code to ILE C++
- BCD Macros that Map C++ Class Template Instantiations to ILE C Syntax
- Example of Code that Determines the Number of Digits in a Packed Decimal Data Type.
- Example of Code that Determines the Number of Digits in a _DecimalT Class Template Object
- Example of Code that Determines the Number of Decimal Digits in an Internal Packed Decimal Data Object
- Example of Code that Determines the Number of Decimal Digits in an Internal _DecimalT Class Object
- Example of a Conditional Expression that Fails because of Class Differences
- Example of an Explicit Cast that Resolves Class Differences between Expressions
- Example of Use of a Consistent Variable Type
- ILE C Code that Uses Packed Decimal Data Types
- ILE C++ Code that Uses the _DecimalT Class Template Instead of the C Packed Decimal Data Types
- Example of a Single Set of Dual Prototypes that Allow a Header File to be Used by Both ILE C and ILE C++
- Example of Multiple Sets of Dual Prototypes that Allow a Header File to be Used by Both ILE C and ILE C++
- Example of Construct that Permits ILE C Programs to Access C++ LInkage Functions
- Example of #pragma enum Directive that Resolves Data Type Size Issues
- Example of Type Mismatch
- Code that Declares an unsigned char Pointer as an unsigned char Variable
- Example of Code Ported to ILE that Results in an Uncaught Exception
- ILE C++ Procedures Cannot Call Active ILE COBOL Procedures
- Example of Using the #pragma linkage(PGMNAME, OS) Directive to Retrieve Returned Function Results
- ILE C Source to Call a Function with Operational Descriptors
- Type Cast to Override a Function without Overriding Linkage
- ILE Structure
- Basic Object Structure
- Example of the Interlanguage Call Capabilities of an ILE C++ Program
- C++ Source Code T2123ICC that Exports a Variable for Use by ILE COBOL and ILE RPG Procedures
- T2123CB2
- ILE RPG Module T2123RP2
- SQUARE -- CL Command Source to Receive Input Data
- SQITF -- ILE C Source to Pass an Argument by Value
- SQ -- ILE C Source to Perform Calculations and Return a Value
- User-Defined CL Command SQUARE that Calculates the Square of a Specified Number
- Example of CL Program that Passes Arguments to an ILE C++ Program
- Example of Generic CL Command Prompt
- Example of C++ Program that Receives Arguments (Pointers) by Reference
- ILE C Source to Determine the String Arguments in a Function
- ILE C Source that Declares a Function that Requires Operational Descriptors
- ILE C Source to Generate Operational Descriptors
- OPM CL Example: Basic Program Structure
- Structure of the Program in ILE C
- T1520DD2 -- DDS Source for an Audit File
- T1520CL2 -- CL Source to Pass Variables to an ILE C Program
- T1520CM2 -- CL Command Source to Receive Input Data
- T1520IC5 -- ILE C Source to Call COBOL AND RPG
- T1520CB1 -- OPM COBOL Source to Calculate Tax and Format Cost
- T1520RP1 -- OPM RPG Source to Write the Audit Trail
- Basic Object Structure
- Integrated Language Environment Structure
- T1520DD2 -- Source to Create Physical Files
- T1520CL3 -- ILE CL Source to Pass Variables to an ILE C Program
- T1520CM2 -- Source to Create a CL Command Prompt
- T1520ICB -- ILE C Source to Call COBOL and RPG Procedures
- T1520ICC -- Source Code to Export Tax Rate Data
- T1520CB2 -- ILE COBOL Source to Calculate Tax and Format Cost
- T1520RP2 -- ILE RPG Source to Write the Audit Trail
- ILE-OPM CL Example: Basic Program Structure
- Structure of the Program in ILE C++
- ILE C Source to Convert Packed Decimals
- ILE C Source to Convert a Packed Decimal to a Packed Decimal with Smaller Precision
- ILE C Source to Convert a Packed Decimal to a Packed Decimal with Smaller Integral Part
- ILE C Source to Convert a Packed Decimal to a Packed Decimal with Smaller Integral Part and Smaller Precision
- ILE C Source to Convert a Packed Decimal with a Fractional Part to an Integer
- ILE C Source to Convert a Packed Decimal with Less than 10 Digits in the Integral Part to an Integer
- ILE C Source to Convert a Packed Decimal with More than 10 Digits in the Integral Part to an Integer
- ILE C Source to Convert a Packed Decimal with More than 10 Digits in Both Parts to an Integer
- ILE C Source to Convert a Packed Decimal to a Floating Point
- ILE C Source to Pass Packed Decimal Variable to a Function
- ILE C Source to Pass a Pointer to a Packed Decimal Value to a Function
- ILE C Source for an ILE C Program that Passes Packed Decimal Data
- COBOL Source that Receives Packed Decimal Data from an ILE C Program
- ILE C Source to Use the va_arg Macro with a Packed Decimal Data Type
- ILE C Source to Write Packed Decimal Constants to a File and Scan Them Back
- ILE C Source to Print Packed Decimal Constants
- Packed Decimal Warnings and Error Conditions
- ILE C Source to Suppress a Run-Time Exception
- Example: Arithmetic Operators for the _DecimalT Class Template
- Example: Relational Operators and the _DecimalT Class Template
- Example: Conditional Operators and the _DecimalT Class Template
- Example: Equality Operators and the _DecimalT Class Template
- Example: Unary Operators and the _DecimalT Class Template
- Example of Converting a Value from One _DecimalT Class Template to Another
- Example of Conversion from One _DecimalT Class Template to Another with Smaller Precision
- Example of Conversion from One _DecimalT Class Template to Another with a Smaller Integral Part
- Example of Conversion from One _DecimalT Class Template to Another with a Smaller Integral Part and Smaller Precision
- Example of Converting an Integer Type to a _DecimalT Class Template with a Fractional Part
- Example of Converting an Integer Type to a _DecimalT Class Template with Less than 10 Digits in the Integral Part
- Example of Converting to an Integer Type from a _DecimalT Class Template with More than 10 Digits in the Integral Part
- Example of Converting to an Integer Type from a _DecimalT Class Template with a Fractional Part, and with an Integral Part that Has More than 10 Digits
- Example of Converting a _DecimalT Class Template to a Floating Point Data Type
- Example of Determining the Total Number of Bytes Occupied by a _DecimalT Class Template
- Example of Determining the Number of Digits in a _DecimalT Class Template
- Example of Determining the Number of Decimal Digits p of a _DecimalT Class Template
- _DecimalT Class Template Run-Time Exceptions
- Run-Time Exceptions Issued by the Compiler for _DecimalT Class Templates
- Example of Using the C++ Try Catch Throw Feature to Handle a _DecimalT Class Template Exception
- Commands to Enable Error Checking within the _DecimalT Class Template at Compile Time
- Commands to Disable Error Checking within the _DecimalT Class Template at Compile Time
- Example of Passing a _DecimalT Class Template Object to a Function
- Example of Passing a Pointer to a _DecimalT Class Template Object
- Example of Calling an ILE COBOL Program from an ILE C++ Program and Passing a _DecimalT Class Template
- Example of Writing _DecimalT Class Template Constants to a File
- Example of Writing _DecimalT Class Template Constants to a File Using the ofstream Class
- Example of Class Template Instantiation
- Example of C++ Code that Works with or without the TEMPINC Option
- Example of a Constructor Function that Is Defined Inline
- Example of a Constructor Function that Is Defined Externally
- Example of All Instances of a Class Defined in a Single Compilation Unit
- Example of Class Definitions Used in Template Arguments Also Contained in Source Code (Does Not Compile Properly)
- Example of Template-Implementation File
- A Typical tempinc File
- Example of a Forward Declaration Based on the LLP64 Data Model
- Example of Source Code that Redefines the Global new and delete Operators
- Example of a Template that Adopts the Data Model in Effect When the Template Is Declared
- ILE Source to Cast a Pointer to a Derived Class to Use a Detail that Is Otherwise Unavailable
- ILE Source to Get a Pointer to a Derived Class to Use a Member Function in Specified Calculations Only
- ILE Source to Get a Pointer to a Derived Class Using Reference Casts
- Examples of typeid operator in Expressions
- Examples of typeid operators
- ILE Source Showing extended_type_info Class Types
- Source File CCSID Conversion
- T1520CCS -- ILE C Source to Convert Strings and Literals
[ Top of Page | Previous Page | Next Page | Table of Contents ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.