VSI COBOL for Openvms DBMS Database Programming Manual

Total Page:16

File Type:pdf, Size:1020Kb

VSI COBOL for Openvms DBMS Database Programming Manual VSI OpenVMS VSI COBOL for OpenVMS DBMS Database Programming Manual Document Number: DO-DCOBPG-01A Publication Date: May 2020 This manual explains how to develop Oracle DBMS database programs with VSI COBOL on the OpenVMS Alpha, OpenVMS I64, and the OpenVMS VAX operating systems. Revision Update Information: This is a new manual. Operating System and Version: VSI OpenVMS I64 Version 8.4-1H1 VSI OpenVMS Alpha Version 8.4-2L1 Software Version: VSI COBOL Version 3.1-7 for OpenVMS VMS Software, Inc., (VSI) Bolton, Massachusetts, USA VSI COBOL for OpenVMS DBMS Database Programming Manual Copyright © 2020 VMS Software, Inc. (VSI), Bolton, Massachusetts, USA Legal Notice Confidential computer software. Valid license from VSI required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice. The only warranties for VSI products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. VSI shall not be liable for technical or editorial errors or omissions contained herein. HPE, HPE Integrity, HPE Alpha, and HPE Proliant are trademarks or registered trademarks of Hewlett Packard Enterprise. Intel, Itanium and IA64 are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. Oracle is a registered trademark of Oracle and/or its affiliates. UNIX is a registered trademark of The Open Group. The VSI OpenVMS documentation set is available on CD. ii VSI COBOL for OpenVMS DBMS Database Programming Manual Preface ................................................................................................................................... vii 1. About VSI .................................................................................................................... vii 2. Intended Audience ........................................................................................................ vii 3. Document Structure ..................................................................................................... viii 4. Related Documents ...................................................................................................... viii 5. How to Order Additional Documentation ........................................................................ ix 6. VSI Encourages Your Comments ..................................................................................... x 7. Conventions .................................................................................................................... x 8. Acknowledgment ............................................................................................................ x Chapter 1. Program Organization and Structure .............................................................. 1 1.1. Program Structure ........................................................................................................ 1 1.2. VSI COBOL for OpenVMS Data Manipulation Language (DML) .................................. 2 1.3. Creating a VSI COBOL for OpenVMS DML Program ................................................... 4 1.4. Compiling a VSI COBOL for OpenVMS DML Program ................................................ 4 1.4.1. Copying Database Records in a VSI COBOL for OpenVMS Program ................... 5 1.4.2. Using the /MAP Compiler Qualifier ................................................................... 5 1.5. Linking a VSI COBOL for OpenVMS DML Program .................................................... 5 1.6. Running a VSI COBOL for OpenVMS DML Program ................................................... 6 Chapter 2. Database Programming Elements of VSI COBOL for OpenVMS ................ 7 2.1. Database-Related User-Defined Words .......................................................................... 7 2.2. Database-Related Reserved Words ................................................................................ 8 2.2.1. DB-CONDITION .............................................................................................. 8 2.2.2. DB-CURRENT-RECORD-NAME ..................................................................... 8 2.2.3. DB-CURRENT-RECORD-ID ............................................................................ 8 2.2.4. DB-KEY ........................................................................................................... 8 2.2.5. DB-UWA .......................................................................................................... 9 Chapter 3. Data Division .................................................................................................... 11 3.1. DATA DIVISION General Format and Rules ............................................................... 11 Chapter 4. Procedure Division ........................................................................................... 19 4.1. COBOL Statements for the Database Programmer ....................................................... 19 4.1.1. Compiler-Directing Statements and Sentences ................................................... 20 4.1.2. Imperative and Conditional Statements and Sentences ....................................... 21 4.2. Explicit and Implicit Scope Terminators ...................................................................... 21 4.3. Scope of Names ......................................................................................................... 22 4.4. Database Key Identifiers ............................................................................................. 22 4.5. Database Conditions ................................................................................................... 24 4.5.1. Tenancy Conditions ......................................................................................... 24 4.5.2. Empty Condition ............................................................................................. 25 4.5.3. Database Key Condition .................................................................................. 25 4.5.4. Condition Evaluation Rules .............................................................................. 26 4.6. Record Selection Expressions (RSE) ........................................................................... 27 4.7. Set Membership Options and DML Verbs ................................................................... 32 4.8. Programming for Database Exceptions and Error Handling ........................................... 33 4.8.1. Database On Error Condition ........................................................................... 33 4.8.2. At End Condition ............................................................................................ 34 4.8.3. Exception Conditions and the USE Statement ................................................... 35 4.8.4. Translating DB-CONDITION Values to Exception Messages ............................. 37 4.9. Database Programming Statements in the COBOL Procedure Division .......................... 37 4.10. RETAINING Clause ................................................................................................. 76 Chapter 5. Database Programming with VSI COBOL for OpenVMS .......................... 77 iii VSI COBOL for OpenVMS DBMS Database Programming Manual 5.1. The Self-Paced Demonstration Package ....................................................................... 77 5.2. Concepts and Definitions ............................................................................................ 78 5.2.1. Database ......................................................................................................... 78 5.2.2. Schema ........................................................................................................... 79 5.2.3. Storage Schema ............................................................................................... 79 5.2.4. Subschema ...................................................................................................... 79 5.2.5. Stream ............................................................................................................ 79 5.3. Using Oracle CDD/Repository .................................................................................... 80 5.4. Database Records ....................................................................................................... 80 5.5. Database Data Item .................................................................................................... 81 5.6. Database Key ............................................................................................................. 81 5.7. Record Types ............................................................................................................. 81 5.8. Set Types ................................................................................................................... 81 5.9. Sets ........................................................................................................................... 84 5.9.1. Simple Set Relationships .................................................................................. 85 5.9.1.1. System-Owned Sets .............................................................................
Recommended publications
  • Powerdesigner 16.6 Data Modeling
    SAP® PowerDesigner® Document Version: 16.6 – 2016-02-22 Data Modeling Content 1 Building Data Models ...........................................................8 1.1 Getting Started with Data Modeling...................................................8 Conceptual Data Models........................................................8 Logical Data Models...........................................................9 Physical Data Models..........................................................9 Creating a Data Model.........................................................10 Customizing your Modeling Environment........................................... 15 1.2 Conceptual and Logical Diagrams...................................................26 Supported CDM/LDM Notations.................................................27 Conceptual Diagrams.........................................................31 Logical Diagrams............................................................43 Data Items (CDM)............................................................47 Entities (CDM/LDM)..........................................................49 Attributes (CDM/LDM)........................................................55 Identifiers (CDM/LDM)........................................................58 Relationships (CDM/LDM)..................................................... 59 Associations and Association Links (CDM)..........................................70 Inheritances (CDM/LDM)......................................................77 1.3 Physical Diagrams..............................................................82
    [Show full text]
  • OLAP, Relational, and Multidimensional Database Systems
    OLAP, Relational, and Multidimensional Database Systems George Colliat Arbor Software Corporation 1325 Chcseapeakc Terrace, Sunnyvale, CA 94089 Introduction Many people ask about the difference between implementing On-Line Analytical Processing (OLAP) with a Relational Database Management System (ROLAP) versus a Mutidimensional Database (MDD). In this paper, we will show that an MDD provides significant advantages over a ROLAP such as several orders of magnitude faster data retrieval, several orders of magnitude faster calculation, much less disk space, and le,~ programming effort. Characteristics of On-Line Analytical Processing OLAP software enables analysts, managers, and executives to gain insight into an enterprise performance through fast interactive access to a wide variety of views of data organized to reflect the multidimensional aspect of the enterprise data. An OLAP service must meet the following fundamental requirements: • The base level of data is summary data (e.g., total sales of a product in a region in a given period) • Historical, current, and projected data • Aggregation of data and the ability to navigate interactively to various level of aggregation (drill down) • Derived data which is computed from input data (performance rados, variance Actual/Budget,...) • Multidimensional views of the data (sales per product, per region, per channel, per period,..) • Ad hoc fast interactive analysis (response in seconds) • Medium to large data sets ( 1 to 500 Gigabytes) • Frequently changing business model (Weekly) As an iUustration we will use the six dimension business model of a hypothetical beverage company. Each dimension is composed of a hierarchy of members: for instance the time dimension has months (January, February,..) as the leaf members of the hierarchy, Quarters (Quarter 1, Quarter 2,..) as the next level members, and Year as the top member of the hierarchy.
    [Show full text]
  • On Active Deductive Databases
    On Active Deductive Databases The Statelog Approach Georg Lausen Bertram Ludascher Wolfgang May Institut fur Informatik Universitat Freiburg Germany flausenludaeschmayginfo rmat ikun ifr eibur gde Abstract After briey reviewing the basic notions and terminology of active rules and relating them to pro duction rules and deductive rules resp ectively we survey a number of formal approaches to active rules Subsequentlywe present our own stateoriented logical approach to ac tive rules which combines the declarative semantics of deductive rules with the p ossibility to dene up dates in the style of pro duction rules and active rules The resulting language Statelog is surprisingly simple yet captures many features of active rules including comp osite eventde tection and dierent coupling mo des Thus it can b e used for the formal analysis of rule prop erties like termination and expressivepo wer Finally weshowhow nested transactions can b e mo deled in Statelog b oth from the op erational and the mo deltheoretic p ersp ective Intro duction Motivated by the need for increased expressiveness and the advent of new appli cations rules have b ecome very p opular as a paradigm in database programming since the late eighties Min Today there is a plethora of quite dierent appli cation areas and semantics for rules From a birdseye view deductive and active rules may b e regarded as two ends of a sp ectrum of database rule languages Deductive Rules Production Rules Active Rules higher level lower level stratied well RDL pro ARDL Ariel Starburst Postgres
    [Show full text]
  • Multidimensional Network Analysis
    Universita` degli Studi di Pisa Dipartimento di Informatica Dottorato di Ricerca in Informatica Ph.D. Thesis Multidimensional Network Analysis Michele Coscia Supervisor Supervisor Fosca Giannotti Dino Pedreschi May 9, 2012 Abstract This thesis is focused on the study of multidimensional networks. A multidimensional network is a network in which among the nodes there may be multiple different qualitative and quantitative relations. Traditionally, complex network analysis has focused on networks with only one kind of relation. Even with this constraint, monodimensional networks posed many analytic challenges, being representations of ubiquitous complex systems in nature. However, it is a matter of common experience that the constraint of considering only one single relation at a time limits the set of real world phenomena that can be represented with complex networks. When multiple different relations act at the same time, traditional complex network analysis cannot provide suitable an- alytic tools. To provide the suitable tools for this scenario is exactly the aim of this thesis: the creation and study of a Multidimensional Network Analysis, to extend the toolbox of complex network analysis and grasp the complexity of real world phenomena. The urgency and need for a multidimensional network analysis is here presented, along with an empirical proof of the ubiquity of this multifaceted reality in different complex networks, and some related works that in the last two years were proposed in this novel setting, yet to be systematically defined. Then, we tackle the foundations of the multidimensional setting at different levels, both by looking at the basic exten- sions of the known model and by developing novel algorithms and frameworks for well-understood and useful problems, such as community discovery (our main case study), temporal analysis, link prediction and more.
    [Show full text]
  • Oracle Rdb™ SQL Reference Manual Volume 4
    Oracle Rdb™ SQL Reference Manual Volume 4 Release 7.3.2.0 for HP OpenVMS Industry Standard 64 for Integrity Servers and OpenVMS Alpha operating systems August 2016 ® SQL Reference Manual, Volume 4 Release 7.3.2.0 for HP OpenVMS Industry Standard 64 for Integrity Servers and OpenVMS Alpha operating systems Copyright © 1987, 2016 Oracle Corporation. All rights reserved. Primary Author: Rdb Engineering and Documentation group This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007).
    [Show full text]
  • Curriculum Vitae Michael Kay Phd FBCS
    Curriculum Vitae Michael Kay PhD FBCS Michael Kay is widely known in the XML world as an expert on the XML processing languages XSLT and XQuery. This reputation derives from his book XSLT Programmer's Reference, from the open-source Saxon XSLT and XQuery processor which he developed, and from his work within the W3C consortium as a member of the XSLT and XQuery working groups, and as editor of several of the specifications. His expertise in the field was recognized in 2005 when he was awarded the XML Cup, an annual international award made to individuals who have made outstanding contributions to the XML Community. Before moving into the XML field in 1998, Michael Kay specialized in database and information management technology. He designed a series of successful software products for the computer manufacturer ICL, and was one of the company's most senior engineers advising the company and it customers on technology strategy. Michael Kay is a member of the XML Guild, a loose federation of leading independent XML consultants who pool knowledge and experience to tackle the most challenging XML-related problems. Personal Details Name Michael Howard Kay Address 52 Matlock Road, Caversham Heights, Reading, Berks, UK. RG4 7BS Phone +44 118 948 3589 Email [email protected] Date of Birth 1951-10-11 Nationality British (born in Germany) Languages English, German, some French Career Summary Feb 2004 - present Director, Saxonica Limited Development and Marketing of commercial Saxon-SA product Ongoing development of open source Saxon-B product Independent
    [Show full text]
  • Introduction to Graph Database with Cypher & Neo4j
    Introduction to Graph Database with Cypher & Neo4j Zeyuan Hu April. 19th 2021 Austin, TX History • Lots of logical data models have been proposed in the history of DBMS • Hierarchical (IMS), Network (CODASYL), Relational, etc • What Goes Around Comes Around • Graph database uses data models that are “spiritual successors” of Network data model that is popular in 1970’s. • CODASYL = Committee on Data Systems Languages Supplier (sno, sname, scity) Supply (qty, price) Part (pno, pname, psize, pcolor) supplies supplied_by Edge-labelled Graph • We assign labels to edges that indicate the different types of relationships between nodes • Nodes = {Steve Carell, The Office, B.J. Novak} • Edges = {(Steve Carell, acts_in, The Office), (B.J. Novak, produces, The Office), (B.J. Novak, acts_in, The Office)} • Basis of Resource Description Framework (RDF) aka. “Triplestore” The Property Graph Model • Extends Edge-labelled Graph with labels • Both edges and nodes can be labelled with a set of property-value pairs attributes directly to each edge or node. • The Office crew graph • Node �" has node label Person with attributes: <name, Steve Carell>, <gender, male> • Edge �" has edge label acts_in with attributes: <role, Michael G. Scott>, <ref, WiKipedia> Property Graph v.s. Edge-labelled Graph • Having node labels as part of the model can offer a more direct abstraction that is easier for users to query and understand • Steve Carell and B.J. Novak can be labelled as Person • Suitable for scenarios where various new types of meta-information may regularly
    [Show full text]
  • CODASYL Database Management Systems, IBM Systems J
    CODASYL Data-Base Management Systems ROBERT W. TAYLOR IBM Research Laboratory, San Jose, California 9519S ond RANDALLL. FRANK Computer Science Department, University of Utah, Salt Lake City, Utah 8~I12 This paper presents in tutorial fashion the concepts, notation, aud data-base languages that were defined by the CODASYL Data Description Language and Programming Language Committees. Data structure diagram notation is ex- plained, and sample data-base definitionis developed along with several sample programs. " Advanced features of the languages are discussed, together with examples of their use. An extensive bibliography is included. Keywords and Phrases: data base, data-b~e management, data-base definition,data description language, data independence, data structure diagram, data model, DBTG Report, data-base machines, information structure design CR Categories: 3.51, 4.33, 4.34 NTRODUCTION Data Base Language Task Group of the CODASYL Programming Language Com- The data base management system (DBMS) mittee. In fact, this article uses the syntax specifications, as published in the 1971 of the more recent reports [$2, $3, $4]. Report of the CODASYL Data Base Task However, because the fundamental system Group (DBTG) [S1], are a landmark in the architecture remains essentially the same development of data base technology. These as that specified in the 1971 Report, we specifications have been the subject of much still use the abbreviation DBTG; though debate, both pro and con, and have served not strictly accurate, "DBTG" does reflect as the basis for several commercially avail- popular usage. able systems, as Fry and Sibley noted in This article explains the specifications; it their paper in this issue of COMPUTING will not attempt to debate the merits and/or SURVErS, page 7.
    [Show full text]
  • Open Data, Big Data and Smart Cities
    Open Data, Big Data and Smart Cities Rosario Uceda-Sosa [email protected] Cognitive Computing Department IBM T.J. Watson Research Labs 1 The questions 1. Storing data. How varied is web data, really? 2. Information ecosystems. How are people likely to use data? What ecosystems (app developers, domain experts, publishers) will be built to leverage this data? 3. Usable, scalable semantics. What’s the role of semantic technologies in these ecosystems? The answers will vary by domain. We’ll use Smart Cities as our main threads, but we’ll also refer 2 1. Storing data. A historic shift in data paradigms 2000’s, (Open) LINKED DATA is about using the Web to connect related data that wasn't previously linked, or using the Web to lower the barriers to linking data currently linked using other methods. More specifically, Wikipedia defines Linked Data as "a term used to describe a recommended best practice for exposing, sharing, and connecting pieces of data, information, and knowledge on the Semantic Web using URIs and RDF." (From linkeddata.org) Abstraction: Network Data (any format) connected through (inferred) navigational relations 1972, RDBMS. Instead of records being stored in some sort of linked list of free-form records as in Codasyl, Codd's idea was to use a "table" of fixed-length records, with each table used for a different type of entity. A linked-list system would be very inefficient when storing "sparse" databases where some of the data for any one record could be left empty. The relational model solved this by splitting the data into a series of normalized tables (or relations), with optional elements being moved out of the main table to where they would take up room only if needed.
    [Show full text]
  • Developing Multiuser and Enterprise Applications
    26_0672329328_ch22.qxd 5/3/07 3:28 PM Page 909 CHAPTER 22 IN THIS CHAPTER . Why This Chapter Is Important Developing Multiuser . Designing Your Application with Multiuser Issues in Mind and Enterprise . Understanding Access’s Applications Locking Mechanisms . Understanding the Client/Server Model . Deciding Whether to Use the Client/Server Model Why This Chapter Is Important . Understanding the Roles That Many people forge right into the application development Access Plays in the Application process with little worry about the scalability of the appli- Design Model cation. Even a simple application that begins as a single- . Learning the Client/Server user application can develop into a multiuser or Buzzwords enterprise-wide application. Unfortunately, the techniques . Upsizing: What to Worry About you can get away with in the single-user application can wreak havoc in a network or client/server environment. It . Proactively Preparing for is therefore necessary to think about the future when you Upsizing design any application. Although the initial development . Using Transaction Processing process might be more complex, if written properly, the . application will survive any growth that it experiences. Practical Examples: Getting Your Application Ready for an This chapter focuses on writing applications that transition Enterprise Environment easily from the single-user environment through the enter- prise client/server environment. Designing Your Application with Multiuser Issues in Mind When you develop applications that multiple users will access over the network, you must make sure they effec- tively handle sharing data and other application objects. Many options are available for developers when they design multiuser applications, and this chapter covers the pros and cons of these options.
    [Show full text]
  • Oracle® CODASYL DBMS for Openvms Oracle® CODASYL DBMS for Openvms Table of Contents
    Oracle® CODASYL DBMS for OpenVMS Oracle® CODASYL DBMS for OpenVMS Table of Contents Oracle® CODASYL DBMS for OpenVMS......................................................................................................1 Release Notes.......................................................................................................................................................2 Preface..................................................................................................................................................................6 Purpose of This Manual.....................................................................................................................................7 Intended Audience..............................................................................................................................................8 Document Structure............................................................................................................................................9 Conventions.......................................................................................................................................................10 Chapter 1Installing Oracle CODASYL DBMS.............................................................................................11 1.1 Oracle CODASYL DBMS on OpenVMS I64...........................................................................................12 1.2 Using Databases from Releases Earlier Than V7.0.................................................................................13
    [Show full text]
  • A QUEL-To-SQL Data Manipulation Language Translator I , I
    A QUEL-to-SQL Data Manipulation Language Translator I , I by John IL Webb University of Canterbury Christchurch New Zealand 1988 Honom.'S Project Supervisor: Dr. N. Churcher RTI INGRES I NGRES /MENU Da t.abase : supppar t To run a highl ight.ed command, place lhe cursor over it. and se I eel t.he "Go" menu i lem. Commands Description RUN simple or saved QUERY lo retrieve, modify or append data RUN default. or saved REPORT Use QUERY-BY-FORMS lo develop and lest query definitions Use REPORT-BY-FORMS to design or modify reports Use APPLICATIONS-BY-FORMS to design and test applications CREATE, MANIPULATE or LOOKUP tables in the database EDIT forms by using the VISUAL-FORMS-EDITOR ENTER interactive QUEL statements ENTER interactive SQL statements SAVE REPORT-WRITER commands in the reports catalog Go(Enler) Hislory(2) CommandMode(3) DBswitch(4) Shel 1(5) > J.H. Webb Table of Contents Part I - Design Guide Introduction 1 The Relational Database 2 The Birth of QUEL and SQL 3 Aims and Objectives 3 The General Overview 4 Section 1 Translation of the Data Manipulation Language 6 General Translation Strategy 6 Treatment of Aliases 7 Explicit Qualification Retained 8 Conclusion 9 Section 2 Data Retrieval 10 The Target List 11 The WHERE clause 12 Sorting the Data 12 Storing the Results 14 Redundant Features in the Translation 15 Section 3 Data Insertion 17 The Design Problem 17 Redundant Features in the Translation 2D Section 4 Data Modification 21 The Problem 22 Section 5 Data Deletion The Use of the Subquery Section 6 Aggregate Functions 32 The Initial Design 32 The Final Design 34 J.H.
    [Show full text]