Application Development Guide
Total Page:16
File Type:pdf, Size:1020Kb
FUJITSU Software Symfoware Server V12.1.0 Application Development Guide Windows/Linux J2UL-1738-07ENZ0(00) November 2014 Preface Purpose of this document This is a guide for the developers of Symfoware Server applications. Intended readers This document is intended for developers of applications that use Symfoware Server. Of the interfaces provided by Symfoware Server, this guide describes the PostgreSQL extended interface. Readers of this document are also assumed to have general knowledge of: - PostgreSQL - SQL - Linux - PostgreSQL - SQL - Windows Structure of this document This document is structured as follows: Chapter 1 Overview of the Application Development Function Provides an overview of Symfoware Server application development. Chapter 2 JDBC Driver Explains how to use JDBC drivers. Chapter 3 ODBC Driver Explains how to use ODBC drivers. Chapter 4 .NET Data Provider Explains how to use .NET Data Provider. Chapter 5 C Library (libpq) Explains how to use C applications. Chapter 6 Embedded SQL in C Explains how to use embedded SQL in C. Chapter 7 Embedded SQL in COBOL Explains how to use embedded SQL in COBOL. Chapter 8 SQL References Explains the SQL statements which were extended in Symfoware Server development. Chapter 9 Compatibility with Oracle Databases Explains features that are compatible with Oracle databases. Chapter 10 Java Applications using PL/extJava Explains the development of Java applications using PL/extJava. Chapter 11 Application Connection Switch Feature Explains the application connection switch feature. - i - Chapter 12 Performance Tuning Explains how to tune application performance. Appendix A Precautions when Developing Applications Provides some points to note about application development. Appendix B Conversion Procedures Required due to Differences from Oracle Database Explains how to convert from an Oracle database to Symfoware Server, within the scope noted in "Compatibility with Oracle Databases" from the following perspectives. Appendix C Tables Used by the Features Compatible with Oracle Databases Explains the tables used by the features compatible with Oracle databases. Appendix D ECOBPG - Embedded SQL in COBOL Explains application development using embedded SQL in COBOL. Appendix E Quantitative Limits This appendix explains limitations. Appendix F Reference Provides a reference for each interface. Export restrictions Exportation/release of this document may require necessary procedures in accordance with the regulations of your resident country and/or US export control laws. Issue date and version Third edition : November 2014 Second edition: January 2014 First edition : November 2013 Copyright Copyright 2013-2014 FUJITSU LIMITED - ii - Contents Chapter 1 Overview of the Application Development Function................................................................................................ 1 1.1 Support for National Characters.......................................................................................................................................................... 2 1.1.1 Literal............................................................................................................................................................................................2 1.1.2 Data Type......................................................................................................................................................................................2 1.1.3 Functions and Operator.................................................................................................................................................................3 1.2 Integration with Visual Studio.............................................................................................................................................................3 1.2.1 Relationship between .NET Framework and Symfoware Server................................................................................................. 3 1.2.2 Automatic Application Generation...............................................................................................................................................4 1.3 Compatibility with Oracle Database....................................................................................................................................................5 1.4 Application Connection Switch Feature..............................................................................................................................................6 1.4.1 Integration with Database Multiplexing....................................................................................................................................... 6 1.5 Notes on Application Compatibility....................................................................................................................................................6 1.5.1 Checking Execution Results......................................................................................................................................................... 6 1.5.2 Referencing System Catalogs....................................................................................................................................................... 6 1.5.3 Using Functions............................................................................................................................................................................ 7 Chapter 2 JDBC Driver.............................................................................................................................................................8 2.1 Development Environment..................................................................................................................................................................8 2.1.1 Combining with JDK or JRE........................................................................................................................................................8 2.2 Setup.................................................................................................................................................................................................... 8 2.2.1 Environment Settings....................................................................................................................................................................8 2.2.2 Message Language and Encoding System Used by Applications Settings.................................................................................. 9 2.2.3 Settings for Encrypting Communication Data..............................................................................................................................9 2.3 Connecting to the Database............................................................................................................................................................... 10 2.3.1 Using the DriverManager Class..................................................................................................................................................10 2.3.2 Using the PGConnectionPoolDataSource Class.........................................................................................................................11 2.3.3 Using the PGXADataSource Class.............................................................................................................................................12 2.4 Application Development..................................................................................................................................................................13 2.4.1 Relationship between the Application Data Types and Database Data Types........................................................................... 13 2.4.2 Statement Caching Feature......................................................................................................................................................... 15 2.4.3 Creating Applications during Cluster Operations.......................................................................................................................16 2.4.3.1 Errors when an Application Connection Switch Occurs and Corresponding Actions........................................................ 16 2.4.3.2 Notes when Creating Applications during Failover Operations in Shared Disk Mode.......................................................16 Chapter 3 ODBC Driver..........................................................................................................................................................18 3.1 Development Environment................................................................................................................................................................18 3.2 Setup.................................................................................................................................................................................................. 18 3.2.1 Registering ODBC Drivers.........................................................................................................................................................18 3.2.2 Registering ODBC Data Sources(for Windows)........................................................................................................................ 20 3.2.2.1 Registering using GUI........................................................................................................................................................