CRTE V11.1A Common Runtime Environment
Total Page:16
File Type:pdf, Size:1020Kb
English FUJITSU Software BS2000 CRTE V11.1A Common Runtime Environment User Guide * Edition December 2019 Comments… Suggestions… Corrections… The User Documentation Department would like to know your opinion on this manual. Your feedback helps us to optimize our documentation to suit your individual needs. Feel free to send us your comments by e-mail to: [email protected] senden. Certified documentation according to DIN EN ISO 9001:2015 To ensure a consistently high quality standard and user-friendliness, this documentation was created to meet the regulations of a quality management system which complies with the requirements of the standard DIN EN ISO 9001:2015 . Copyright and Trademarks Copyright © 2019 Fujitsu Technology Solutions GmbH. All rights reserved. Delivery subject to availability; right of technical modifications reserved. All hardware and software names used are trademarks of their respective manufacturers. Table of Contents CRTE V11.1 . 6 1 Preface . 7 1.1 Objectives and target groups of this manual . 8 1.2 Summary of contents . 9 1.3 Changes since the last edition of the manual . 10 1.4 Notational conventions . 11 2 Selectable unit, installation and shareability of CRTE . 12 2.1 CRTE V11.1A selectable unit . 13 2.2 Installing CRTE . 16 2.2.1 CRTE libraries for installation without version specification . 17 2.2.2 Standard installation under the user ID “$.” . 18 2.2.3 Installing with IMON under a non-standard user ID . 19 2.2.4 Installing header files and POSIX link switches in the default POSIX directory . 20 2.2.5 Installing header files and POSIX link switches in any POSIX directory . 21 2.2.6 Private installation . 22 2.2.7 Switching from an earlier CRTE version to CRTE V11.1A . 23 2.3 Shareability of CRTE . 24 2.4 Runtime products required for program linkage . 26 3 Language-specific components of CRTE . 27 3.1 CRTE libraries for the partial bind linkage method . 28 3.1.1 Libraries for the partial bind linkage method on /390 systems . 29 3.2 COBOL85/ COBOL2000 runtime system . 30 3.3 C runtime system . 32 3.3.1 Libraries of the C runtime system . 33 3.3.2 Support for large files > 2 GB by 64-bit functions . 35 3.4 Cfront-C++-library functions and runtime system . 36 3.5 ANSI-C++ libraries and runtime systems . 37 3.6 Common internal runtime routines . 38 4 ILCS program communication interface . 39 4.1 Architecture and functionality of ILCS . 40 4.2 ILCS conventions . 42 4.2.1 Register conventions . 43 4.2.2 Data structures . 44 4.2.3 Program mask handling by ILCS . 45 4.3 Initialization . 46 4.3.1 Initialization of ILCS . 47 4.3.2 Initialization on dynamic program loading . 48 4.4 Encapsulated subsystems . 49 4.4.1 Requirements placed on an encapsulated subsystem . 50 4.4.2 Architecture of an encapsulated subsystem . 51 4.4.3 Actions required for encapsulation . 52 4.4.4 Using POSIX in subsystems . 53 4.4.5 STXIT events and contingencies . 54 4.4.6 Unloading a subsystem . 55 4.5 Linking ILCS programs with different languages . 56 4.5.1 Parameter passing . 57 4.5.2 Passing function return values . 60 4.5.3 Event handling by ILCS . 61 4.6 Linking ILCS and non-ILCS programs . 62 4.6.1 Linking ILCS programs and non-ILCS programs of the same language . 63 4.6.2 Linking ILCS programs to non-ILCS programs of a different language . 64 4.7 Error handling . 65 4.7.1 Debugging information in the PCD . 66 4.7.2 Control of the TERM macro by the user . 67 4.7.3 Message texts . 68 5 Linkage of CRTE . 69 5.1 Linking with BINDER and DBL . 70 5.1.1 The BINDER linkage editor . 71 5.1.2 The Dynamic Binder Loader (DBL) . 72 5.1.3 Linking with the Autolink mechanism . 73 5.1.4 Linking with nested external references . 74 5.1.5 Using time functions . 75 5.1.6 Masking of symbols . 76 5.1.7 Language-specific considerations . 77 5.2 Linkage techniques . 78 5.2.1 Static linking with BINDER . 79 5.2.2 Dynamic loading of the C/COBOL runtime system and the internal routines (partial bind) . 80 5.2.3 Dynamic linking with DBL . 83 5.2.4 Linking prelinked modules . 84 5.2.5 Comparison and evaluation of the linkage techniques . 86 5.3 Linking with mixed languages . 87 5.3.1 Mix of CRTE languages (COBOL, C, C++) . 88 5.3.2 Mix including “foreign” languages . 89 5.4 Input examples . 90 5.4.1 Static linkage of a C, C++ or COBOL program . 91 5.4.2 Linking programs which dynamically load the C or COBOL runtime systems (partial bind linkage technique) . 93 5.4.3 Dynamic linkage with DBL . 95 5.4.4 Linkage with mixed “foreign” languages . 97 6 Appendix: use of the ILCS routines IT0INITS and IT0ININ . 98 6.1 General description of the example . 99 6.2 Reproduction of the source programs . 101 6.3 Trace listings . 103 7 Related publications . 106 CRTE V11.1 6 1 Preface CRTE is the Common RunTime Environment for C, C++ and COBOL85 or COBOL2000 programs in BS2000. In addition to the runtime systems for C, C++ and COBOL85/COBOL2000, CRTE includes all routines of the Inter- Language Communication Services (ILCS) program communication interface. Accordingly, CRTE must be used in order to ensure that program systems comprising programs in various languages will run successfully. 7 1.1 Objectives and target groups of this manual.