Manuel D’UtilisationTable des matièresContents5Notices13Programming Interface Information14Trademarks and Service Marks14About This Guide17Who Should Use This Guide17Prerequisite and Related Information18How to Send Your Comments18What's New This Release?19ILE RPG Introduction25Chapter 1. Overview of the RPG IV Programming Language27RPG IV Specifications27Cycle Programming28Indicators29Operation Codes30Example of an ILE RPG Program30Using the OS/400 System36AS/400 Tools37Chapter 2. RPG Programming in ILE41Program Creation41Program Management43Program Call43Source Debugging44Bindable APIs44Multithreaded Applications45Chapter 3. Program Creation Strategies47Strategy 1: OPM-Compatible Application47Strategy 2: ILE Program Using CRTBNDRPG49Strategy 3: ILE Application Using CRTRPGMOD51Chapter 4. Creating an Application Using Multiple Procedures57A Multiple Procedures Module — Overview57Example of Module with Multiple Procedures60Coding Considerations69For Further Information71Creating and Running an ILE RPG Application73Chapter 5. Entering Source Statements75Chapter 6. Creating a Program with the CRTBNDRPG81Using the CRTBNDRPG Command81Using a Compiler Listing87Accessing the RETURNCODE Data Area94Chapter 7. Creating a Program with the CRTRPGMOD and CRTPGM Commands97Creating a Module Object97Binding Modules into a Program105Using a Binder Listing109Changing a Module or Program110Chapter 8. Creating a Service Program115Service Program Overview115Strategies for Creating Service Programs116Creating a Service Program Using CRTSRVPGM116Sample Service Program118Chapter 9. Running a Program127Running a Program Using the CL CALL Command127Running a Program From a Menu-Driven Application130Running a Program Using a User-Created Command132Replying to Run-Time Inquiry Messages132Ending an ILE Program133Managing Activation Groups133Managing Dynamically-Allocated Storage137Chapter 10. Calling Programs and Procedures151Program/Procedure Call Overview151Using a Prototyped Call157Passing Prototyped Parameters159Interlanguage Calling Considerations171Using the Fixed-Form Call Operations172Returning from a Called Program or Procedure176Using Bindable APIs179Calling a Graphics Routine180Calling Special Routines181Multithreading Considerations181Debugging and Exception Handling185Chapter 11. Debugging Programs187The ILE Source Debugger187Preparing a Program for Debugging190Starting the ILE Source Debugger194Adding/Removing Programs from a Debug Session196Viewing the Program Source198Setting and Removing Breakpoints201Setting and Removing Watch Conditions212Example of Setting a Watch Condition217Stepping Through the Program Object218Changing the Value of Fields232Displaying Attributes of a Field234Equating a Name with a Field, Expression, or Command234Source Debug National Language Support for ILE RPG235Sample Source for Debug Examples235Chapter 12. Handling Exceptions241Exception Handling Overview241Using Exception Handlers247Using RPG-Specific Handlers250ILE Condition Handlers262Using Cancel Handlers268Problems when ILE CL Monitors for Notify and Status Messages271Chapter 13. Obtaining a Dump275Obtaining an ILE RPG Formatted Dump275Using the DUMP Operation Code275Example of a Formatted Dump276Working with Files and Devices283Chapter 14. Defining Files285Associating Files with Input/Output Devices285Naming Files287Types of File Descriptions287Defining Externally Described Files289Defining Program-Described Files295Data Management Operations and ILE RPG I/O Operations295Chapter 15. General File Considerations297Overriding and Redirecting File Input and Output297File Locking299Record Locking300Sharing an Open Data Path301Spooling302SRTSEQ/ALTSEQ in an RPG Program versus a DDS File303Chapter 16. Accessing Database Files305Database Files305Using Externally Described Disk Files306Using Program-Described Disk Files312Methods for Processing Disk Files315Valid File Operations328Using Commitment Control331DDM Files336Chapter 17. Accessing Externally Attached Devices339Types of Device Files339Accessing Printer Devices340Accessing Tape Devices349Accessing Display Devices350Using Sequential Files350Using SPECIAL Files351Chapter 18. Using WORKSTN Files355Intersystem Communications Function355Using Externally Described WORKSTN Files355Using Program-Described WORKSTN Files362Valid WORKSTN File Operations365Multiple-Device Files366Chapter 19. Example of an Interactive Application369Database Physical File369Main Menu Inquiry370File Maintenance373Search by Zip Code382Search and Inquiry by Name388Appendixes395Appendix A. Behavioral Differences Between OPM RPG/400 and ILE RPG for AS/400397Compiling397Running398Debugging and Exception Handling398I/O399DBCS Data in Character Fields401Appendix B. Using the RPG III to RPG IV Conversion Aid403Conversion Overview403Converting Your Source406Example of Source Conversion414Analyzing Your Conversion417Resolving Conversion Problems422Appendix C. The Create Commands429Using CL Commands429CRTBNDRPG Command430CRTRPGMOD Command444Appendix D. Compiler Listings447Reading a Compiler Listing448Bibliography463Index467Special Characters467Numerics467A467B468C468D472E474F476G477H477I477J478K478L478M479N480O480P481Q483R483S484T487U487V487W487Taille: 1,9 MoPages: 489Language: EnglishOuvrir le manuel