Acu4gl® Version 8.1.3
Total Page:16
File Type:pdf, Size:1020Kb
User’s Guide Acu4GL® Version 8.1.3 Micro Focus (IP) Ltd. 9920 Pacific Heights Blvd, Suite 150 San Diego, CA 92121 858.795.1900 © Copyright Micro Focus (IP) Ltd, 1998-2010. All rights reserved. Acucorp, ACUCOBOL-GT, Acu4GL, AcuBench, AcuConnect, AcuServer, AcuSQL, AcuXDBC, extend, and “The new face of COBOL” are registered trademarks or registered service marks of Micro Focus (IP) Ltd. “COBOL Virtual Machine” is a trademark of Micro Focus (IP) Ltd. Acu4GL is protected by U.S. patent 5,640,550, and AcuXDBC is protected by U.S. patent 5,826,076. Microsoft and Windows are registered trademarks of Microsoft Corporation in the United States and/or other countries. UNIX is a registered trademark of the Open Group in the United States and other countries. Solaris is a trademark of Sun Microsystems, Inc., in the United States and other countries. Other brand and product names are trademarks or registered trademarks of their respective holders. DB2 Connect is a trademark, and IBM, AIX, DB2, Informix, MQSeries, AS/400, OS/390, PowerPC, RS/6000, WebSphere, pSeries, and zSeries are registered trademarks of IBM in the United States. E-01-UG-100501-Acu4GL-8.1.3 Contents Chapter 1: Acu4GL Overview 1.1 Welcome to Acu4GL .......................................................................................................1-2 1.2 Document Overview ........................................................................................................ 1-3 1.3 Accessing Data ................................................................................................................ 1-6 1.3.1 Interface Routines.................................................................................................. 1-7 1.3.2 Data Dictionaries and Acu4GL ............................................................................. 1-8 1.3.3 The ACUCOBOL-GT Web Runtime and Acu4GL .............................................. 1-8 1.4 Database Concepts...........................................................................................................1-9 1.5 How Acu4GL Works .....................................................................................................1-10 1.5.1 What Is a Transparent Interface?......................................................................... 1-11 1.5.2 Data Dictionaries and Mapping........................................................................... 1-11 1.5.3 Steps to Follow .................................................................................................... 1-12 1.5.4 Summary.............................................................................................................. 1-14 Chapter 2: Getting Started 2.1 Getting Started ................................................................................................................. 2-2 2.2 Technical Services ........................................................................................................... 2-2 2.3 Installation ....................................................................................................................... 2-2 2.4 Using the “sql.acu” Program ........................................................................................... 2-3 2.4.1 Running “sql.acu” From the Command Line ........................................................ 2-3 2.4.2 To Call “sql.acu” From a Program ........................................................................2-4 2.5 The Demonstration Program............................................................................................ 2-5 Chapter 3: Data Dictionaries 3.1 Data Dictionaries or XFDs .............................................................................................. 3-2 3.2 XFD Files......................................................................................................................... 3-2 3.2.1 Understanding How the Database Table Is Formed.............................................. 3-3 3.2.2 Defaults Used in XFD Files................................................................................... 3-5 3.2.3 Summary of Dictionary Fields............................................................................... 3-7 3.2.4 Identical Field Names............................................................................................ 3-8 3.2.5 Long Field Names.................................................................................................. 3-8 3.2.6 Naming the XFD File ............................................................................................ 3-9 Contents-ii Chapter 4: Using Directives 4.1 What Are Directives?.......................................................................................................4-2 4.2 Directive Syntax...............................................................................................................4-3 4.3 Directives Supported by the Acu4GL Interfaces .............................................................4-4 4.3.1 ALPHA ..................................................................................................................4-4 4.3.2 BINARY ................................................................................................................4-5 4.3.3 COBOL-TRIGGER ...............................................................................................4-6 4.3.4 COMMENT ...........................................................................................................4-8 4.3.5 DATE.....................................................................................................................4-8 4.3.6 FILE .....................................................................................................................4-12 4.3.7 NAME..................................................................................................................4-13 4.3.8 NUMERIC ..........................................................................................................4-16 4.3.9 SECONDARY_TABLE ......................................................................................4-16 4.3.10 USE GROUP .....................................................................................................4-17 4.3.11 VAR_LENGTH .................................................................................................4-19 4.3.12 WHEN ...............................................................................................................4-19 4.3.13 XSL....................................................................................................................4-25 Chapter 5: Invalid Data 5.1 Illegal COBOL Data ........................................................................................................5-2 5.1.1 Invalid Key Data....................................................................................................5-3 5.1.2 Invalid Data Other Than Keys ...............................................................................5-3 5.2 Invalid Database Data ......................................................................................................5-3 Chapter 6: Working with COBOL 6.1 Preparing and Compiling Your COBOL Program...........................................................6-2 6.1.1 Compiling With No Directives ..............................................................................6-4 6.1.2 Compiling With the WHEN Directive...................................................................6-6 6.1.3 Using Additional Directives ..................................................................................6-8 6.2 Creating File Descriptors and SELECT Statements ......................................................6-10 Chapter 7: New and Existing Databases 7.1 Databases .........................................................................................................................7-2 7.2 Default Acu4GL Behavior...............................................................................................7-2 7.3 Accessing Existing Database Files ..................................................................................7-3 7.3.1 How Do I Match Existing Text Fields? .................................................................7-3 7.3.2 How Do I Match Existing Numeric Fields? ..........................................................7-3 7.3.3 Field Names ...........................................................................................................7-4 Contents-iii 7.3.4 Index Names .......................................................................................................... 7-4 Chapter 8: Compiler and Runtime Options 8.1 Compiler Options............................................................................................................. 8-2 8.2 Runtime Configuration Variables .................................................................................. 8-4 4GL_2000_CUTOFF...................................................................................................... 8-5 4GL_8_DIGIT_CUTOFF............................................................................................... 8-5 4GL_COLUMN_CASE ................................................................................................. 8-6 4GL_COMMIT_COUNT ............................................................................................. 8-6 4GL_CONVERT_DATE_ZERO................................................................................... 8-8 4GL_DB_MAP..............................................................................................................