Application Programming
Total Page:16
File Type:pdf, Size:1020Kb
English FUJITSU Software BS2000 UDS/SQL V2.9 Application Programming User Guide © Siemens Nixdorf Informationssysteme AG 1995 Pfad: P:\FTS-BS\DB\UDS\UDSV29\Handbücher\aktuell\udsanw\en\udsanw.vor Edition September 2017 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] Certified documentation according to DIN EN ISO 9001:2008 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:2008. cognitas. Gesellschaft für Technik-Dokumentation mbH www.cognitas.de Copyright and Trademarks Copyright © 2017 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. This manual is printed on paper treated with chlorine-free bleach. Contents 1 Preface . 11 1.1 Structure of the UDS/SQL documentation . 11 1.2 Objectives and target groups of this manual . 16 11. September11. 2017 Stand 11:36.48 Pfad: P:\FTS-BS\DB\UDS\UDSV29\Handbücher\aktuell\udsanw\en\udsanw.ivz 1.3 Summary of contents . 17 1.4 Changes since the last edition of the manuals . 18 1.5 Notational conventions . 20 1.5.1 Warnings and notes . 20 1.5.2 Non-SDF notational conventions . 20 1.5.3 SDF syntax representation . 22 1.6 Sample database . 27 2 Overview . 29 2.1 The language concept of DML . 29 2.2 The range of functions for DML . 30 3 Transaction concept . 31 3.1 The transaction in multi-DB operation . 32 3.2 The transaction in mono-DB operation . 33 3.3 Rollback . 33 3.4 Page protection . 34 Dokuschablonen 19x24 Version 7.32us für FrameMaker V7.x vom 28.03.2007 © cognitas GmbH 2001-2007 U930-J-Z125-15-76 Contents 4 Currency table . 37 5 DML functions . 41 5.1 Opening and closing transactions . 43 5.1.1 Opening a transaction or processing chain (READY) . 43 5.1.2 Closing a transaction (FINISH) . 45 5.2 Retrieving data . 46 5.2.1 Direct access at record type level . 48 5.2.1.1 Direct access via the database key (FIND/FETCH-1) . 48 5.2.1.2 Direct access via the CALC key (FIND/FETCH-2) . 49 5.2.1.3 Direct access via any items (FIND/FETCH-3/7) . 50 5.2.2 Sequential access at record type level (FIND/FETCH-4) . 55 5.2.3 Access to the CRR (FIND/FETCH-5) . 55 5.2.4 Direct access at set level (FIND/FETCH-3/7) . 56 5.2.5 Sequential access at set level (FIND/FETCH-4) . 59 5.2.6 Access to the CRS (FIND/FETCH-5) . 60 5.2.7 Access to the owner of a CRS (FIND/FETCH-6) . 60 5.2.8 Sequential access at realm level (FIND/FETCH-4) . 61 5.2.9 Access to the CRA (FIND/FETCH-5) . 61 5.2.10 Transport the CRU completely or partially into the UWA (GET) . 62 5.2.11 Retrieve database key values (ACCEPT-1) . 63 5.2.12 Retrieve realm (ACCEPT-2) . 64 5.3 Modifying data . 65 5.3.1 Store a record in the database and connect it into set occurrences (STORE) . 65 5.3.2 Connect a record into a set occurrence (CONNECT) . 66 5.3.3 Disconnect existing set relationships (DISCONNECT) . 67 5.3.4 Modify the CRU or connect it into another set occurrence (MODIFY) . 68 5.3.5 Delete records and their set relationships (ERASE) . 69 5.3.6 Correlation between type of set membership and data-modifying statements . 70 5.4 Protecting records . 71 5.4.1 Activate extended record protection (KEEP) . 71 5.4.2 Deactivate extended record protection (FREE) . 72 5.5 Testing set memberships in the program (IF) . 73 5.5.1 Testing the set membership of the CRU . 73 5.5.2 Testing a set occurrence for member records . 74 U930-J-Z125-15-76 Contents 6 Using DML . 75 6.1 Structure of the COBOL/CALL DML programs . 76 6.1.1 COBOL DML . 77 6.1.2 CALL DML . 83 6.2 Special features of COBOL DML . 86 Specifying a key for use of the subschema (PRIVACY) . 86 Assigning the subschema and setting up the communication area (DB entry) . 86 COBOL special registers . 88 Transferring a database key value (SET) . 88 Describing error handling routines (USE) . 89 Assigning the COSSD file for compiling a COBOL-DML program . 90 11. September11. 2017 Stand 11:36.48 Pfad: P:\FTS-BS\DB\UDS\UDSV29\Handbücher\aktuell\udsanw\en\udsanw.ivz 6.3 Special features of CALL DML . 92 Testing the structure of the subschema (LOOKC) . 94 6.4 Linking, loading and starting a UDS/SQL-TIAM application program . 95 6.4.1 Basic aspects . 95 The principle of dynamic loading . 95 Loading the UDS/SQL product modules dynamically . 95 Loading the application-specific data modules SSITAB and PLITAB dynamically . 98 Loading the configuration-specific table module UDSTRTAB dynamically . 99 6.4.2 Linking UDS/SQL-TIAM applications . 100 6.4.3 Starting a COBOL program . 103 6.5 Interoperation in a UDS/SQL-openUTM application . 107 Generating a UDS/SQL-openUTM application . 107 Linking UDS/SQL-openUTM applications . 109 Starting a UDS/SQL-openUTM application . 112 Error codes . 113 6.6 Error handling . 114 6.6.1 Interrupt handling for UDS/SQL-TIAM applications . 114 6.6.2 Database exception conditions . 117 Using special registers (COBOL DML) or the user information area (CALL DML) . 117 Statement codes . 118 Status codes . 119 Combinations of statement codes and status codes . 120 FIND/FETCH status codes . 122 6.6.3 CALL DML error handling routine DSCEXT . 124 6.7 Translation table for application-specific sorting . 126 Dokuschablonen 19x24 Version 7.32us für FrameMaker V7.x vom 28.03.2007 © cognitas GmbH 2001-2007 U930-J-Z125-15-76 Contents 7 COBOL DML reference section . 129 7.1 General rules . 130 7.2 ID DIVISION . 131 7.3 DATA DIVISION . 131 SUB-SCHEMA SECTION . 131 DB entry . 132 7.4 PROCEDURE DIVISION . 133 7.4.1 Overview of COBOL DML statements . 133 7.4.2 COBOL DML statements . 139 ACCEPT . 139 CONNECT . 143 DISCONNECT . 144 ERASE . 146 FIND/FETCH . 148 FINISH . 179 FREE . 179 GET . ..