IBM I ILE Concepts
Total Page:16
File Type:pdf, Size:1020Kb
IBM i Version 7.2 Programming ILE Concepts IBM SC41-5606-10 Note Before using this information and the product it supports, read the information in “Notices” on page 189. This edition applies to IBM® i 7.2 (product number 5770-SS1) and to all subsequent releases and modifications until otherwise indicated in new editions. This version does not run on all reduced instruction set computer (RISC) models nor does it run on CISC models. This document may contain references to Licensed Internal Code. Licensed Internal Code is Machine Code and is licensed to you under the terms of the IBM License Agreement for Machine Code. © Copyright International Business Machines Corporation 1997, 2013. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents ILE Concepts......................................................................................................... 1 PDF file for ILE Concepts............................................................................................................................. 3 Integrated Language Environment Introduction........................................................................................ 5 What Is ILE?............................................................................................................................................5 What Are the Benefits of ILE?................................................................................................................ 5 Binding...............................................................................................................................................5 Modularity......................................................................................................................................... 5 Reusable Components......................................................................................................................6 Common Runtime Services.............................................................................................................. 6 Coexistence with Existing Applications............................................................................................6 Source Debugger...............................................................................................................................6 Better Control over Resources..........................................................................................................6 Better Control over Language Interactions...................................................................................... 8 Better Code Optimization................................................................................................................. 9 What Is the History of ILE?.....................................................................................................................9 Original Program Model Description.................................................................................................9 Extended Program Model Description........................................................................................... 10 Integrated Language Environment Description............................................................................. 10 ILE Basic Concepts.................................................................................................................................... 13 Structure of an ILE Program.................................................................................................................13 Procedure............................................................................................................................................. 14 Module Object...................................................................................................................................... 14 ILE Program..........................................................................................................................................15 Service Program................................................................................................................................... 17 Binding Directory..................................................................................................................................19 Binding Directory Processing..........................................................................................................20 Binder Functions.................................................................................................................................. 20 Calling a Program or a Procedure........................................................................................................ 22 Dynamic Program Calls...................................................................................................................22 Static Procedure Calls.....................................................................................................................22 Procedure Pointer Calls.................................................................................................................. 23 Activation..............................................................................................................................................23 Error Handling Overview...................................................................................................................... 24 Optimizing Translator........................................................................................................................... 25 Debugger.............................................................................................................................................. 26 ILE Advanced Concepts.............................................................................................................................27 Program Activation...............................................................................................................................27 Program Activation Creation...........................................................................................................27 Activation Group...................................................................................................................................28 Activation Group Creation.............................................................................................................. 30 Default Activation Groups...............................................................................................................30 Non-Default Activation Group Deletion......................................................................................... 31 Service Program Activation..................................................................................................................33 Control Boundaries...............................................................................................................................35 Control Boundaries for Activation Groups..................................................................................... 35 Control Boundaries between OPM and ILE Call Stack Entries...................................................... 36 Control Boundary Use.....................................................................................................................37 iii Error Handling...................................................................................................................................... 37 Job Message Queues......................................................................................................................38 Exception Messages and How They Are Sent................................................................................ 38 How Exception Messages Are Handled..........................................................................................39 Exception Recovery........................................................................................................................ 39 Default Actions for Unhandled Exceptions.................................................................................... 40 Types of Exception Handlers.......................................................................................................... 41 ILE Conditions.................................................................................................................................43 Data Management Scoping Rules........................................................................................................ 43 Call-Level Scoping...........................................................................................................................44 Activation-Group-Level Scoping.....................................................................................................44 Job-Level Scoping...........................................................................................................................45 Teraspace and Single-Level Storage......................................................................................................... 47 Teraspace Characteristics....................................................................................................................47 Using Teraspace for Storage................................................................................................................ 47 Choosing a Program