Table of Contents
- Title and Copyright Information
- Preface
- Changes in Pro*COBOL
- Part I Introduction and Concepts
- Introduction
- Precompiler Concepts
- Key Concepts of Embedded SQL Programming
- Programming Guidelines
- Abbreviations
- Case-Insensitivity
- COBOL Versions Supported
- Coding Areas
- Commas
- Comments
- Continuation Lines
- Copy Statements
- Decimal-Point is Comma
- Delimiters
- Division Headers that are Optional
- Embedded SQL Syntax
- Figurative Constants
- File Length
- FILLER is Allowed
- Host Variable Names
- Hyphenated Names
- Level Numbers
- MAXLITERAL Default
- Multibyte Datatypes
- NULLs in SQL
- Paragraph and Section Names
- REDEFINES Clause
- Relational Operators
- Sentence Terminator
- The Declare Section
- Nested Programs
- Conditional Precompilations
- Separate Precompilations
- Compiling and Linking
- Sample DEPT and EMP Tables
- Sample EMP Program: SAMPLE1.PCO
- Database Concepts
- Connecting to Oracle
- Default Databases and Connections
- Key Terms
- How Transactions Guard a Database
- Beginning and Ending Transactions
- Using the COMMIT Statement
- Using the ROLLBACK Statement
- Using the SAVEPOINT Statement
- Using the RELEASE Option
- Using the SET TRANSACTION Statement
- Overriding Default Locking
- Fetching Across Commits
- Handling Distributed Transactions
- Guidelines for Transaction Processing
- Datatypes and Host Variables
- The Oracle Database Datatypes
- Datetime and Interval Datatype Descriptors
- Host Variables
- Indicator Variables
- VARCHAR Variables
- Handling Boolean Data
- Handling Character Data
- Universal ROWIDs
- Globalization Support
- Unicode Support for Pro*COBOL
- Datatype Conversion
- Explicit Control Over DATE String Format
- Datatype Equivalencing
- Platform Endianness Support
- Sample Program 4: Datatype Equivalencing
- Embedded SQL
- Embedded PL/SQL
- Embedding PL/SQL
- Advantages of PL/SQL
- Embedding PL/SQL Blocks
- Host Variables and PL/SQL
- Indicator Variables and PL/SQL
- Host Tables and PL/SQL
- Cursor Usage in Embedded PL/SQL
- Stored PL/SQL and Java Subprograms
- Sample Program 9: Calling a Stored Procedure
- Cursor Variables
- Host Tables
- Host Tables
- Advantages of Host Tables
- Tables in Data Manipulation Statements
- Selecting into Tables
- Inserting with Tables
- Updating with Tables
- Deleting with Tables
- Using Indicator Tables
- The FOR Clause
- The WHERE Clause
- Mimicking the CURRENT OF Clause
- Tables of Group Items as Host Variables
- Sample Program 14: Tables of Group Items
- Additional Array Insert/Select Syntax
- Using Implicit Buffered Insert
- Error Handling and Diagnostics
- Why Error Handling is Needed
- Error Handling Alternatives
- Using the SQL Communications Area
- Using the Oracle Communications Area
- How Errors Map to SQLSTATE Codes
- Oracle Dynamic SQL
- Dynamic SQL
- Advantages and Disadvantages of Dynamic SQL
- When to Use Dynamic SQL
- Requirements for Dynamic SQL Statements
- How Dynamic SQL Statements Are Processed
- Methods for Using Dynamic SQL
- Using Method 1
- Sample Program 6: Dynamic SQL Method 1
- Using Method 2
- Sample Program 7: Dynamic SQL Method 2
- Using Method 3
- Sample Program 8: Dynamic SQL Method 3
- Using Oracle Method 4
- Using the DECLARE STATEMENT Statement
- Using Host Tables
- Using PL/SQL
- Dynamic SQL Statement Caching
- About Boolean Data Type Support
- Part II Applications
- ANSI Dynamic SQL
- Basics of ANSI Dynamic SQL
- Overview of ANSI SQL Statements
- Sample Code
- Oracle Extensions
- ANSI Dynamic SQL Precompiler Options
- Full Syntax of the Dynamic SQL Statements
- Sample Programs: SAMPLE12.PCO
- Oracle Dynamic SQL: Method 4
- Meeting the Special Requirements of Method 4
- Understanding the SQL Descriptor Area (SQLDA)
- The SQLDA Variables
- Prerequisite Knowledge
- The Basic Steps
- A Closer Look at Each Step
- Declare a Host String
- Declare the SQLDAs
- Set the Maximum Number to DESCRIBE
- Initialize the Descriptors
- Store the Query Text in the Host String
- PREPARE the Query from the Host String
- DECLARE a Cursor
- DESCRIBE the Bind Variables
- Reset Number of Place-Holders
- Get Values for Bind Variables
- OPEN the Cursor
- DESCRIBE the Select List
- Reset Number of Select-List Items
- Reset Length/Datatype of Each Select-List Item
- FETCH Rows from the Active Set
- Get and Process Select-List Values
- CLOSE the Cursor
- About Using Domain Metadata
- Using Host Tables with Method 4
- Sample Program 10: Dynamic SQL Method 4
- Multithreaded Applications
- Introduction to Threads
- Runtime Contexts in Pro*COBOL
- Runtime Context Usage Models
- User Interface Features for Multithreaded Applications
- Multithreaded Example
- Large Objects (LOBs)
- Precompiler Options
- The procob Command
- Actions During Precompilation
- About the Options
- Entering Precompiler Options
- About Data Use Case Domain Metadata Support
- Scope of Precompiler Options
- Quick Reference
- Using Pro*COBOL Precompiler Options
- ASACC
- ASSUME_SQLCODE
- AUTO_CONNECT
- CHARSET_PICX
- CHARSET_PICN
- CLOSE_ON_COMMIT
- COMMON_PARSER
- CONFIG
- DATE_FORMAT
- DB2_ARRAY
- DBMS
- DECLARE_SECTION
- DEFINE
- DYNAMIC
- END_OF_FETCH
- ERRORS
- File_ID
- FIPS
- FORMAT
- HOLD_CURSOR
- HOST
- IMPLICIT_SVPT
- INAME
- INCLUDE
- IRECLEN
- LITDELIM
- LNAME
- LRECLEN
- LTYPE
- MAX_ROW_INSERT
- MAXLITERAL
- MAXOPENCURSORS
- MODE
- NESTED
- NLS_LOCAL
- ONAME
- ORACA
- ORECLEN
- OUTLINE
- OUTLNPREFIX
- PAGELEN
- PICN_ENDIAN
- PICX
- PLAN_BASELINE
- PLAN_PREFIX
- PLAN_RUN
- PLAN_FIXED
- PLAN_ENABLED
- MEMFORPREFETCH
- PREFETCH
- RELEASE_CURSOR
- RUNOUTLINE
- SELECT_ERROR
- SQLCHECK
- STMT_CACHE
- TYPE_CODE
- UNSAFE_NULL
- USERID
- VARCHAR
- XREF
- ANSI Dynamic SQL
- Operating System Dependencies
- Reserved Words, Keywords, and Namespaces
- Performance Tuning
- Causes of Poor Performance
- Improving Performance
- Using Host Tables
- Using PL/SQL and Java
- Optimizing SQL Statements
- SQL Statement Caching
- Using Indexes
- Taking Advantage of Row-Level Locking
- Eliminating Unnecessary Parsing
- Avoiding Unnecessary Reparsing
- About Using Oracle Connection Manager in Traffic Director Mode
- Syntactic and Semantic Checking
- Embedded SQL Statements and Precompiler Directives
- Summary of Precompiler Directives and Embedded SQL Statements
- About the Statement Descriptions
- How to Read Syntax Diagrams
- ALLOCATE (Executable Embedded SQL Extension)
- ALLOCATE DESCRIPTOR (Executable Embedded SQL)
- CALL (Executable Embedded SQL)
- CLOSE (Executable Embedded SQL)
- COMMIT (Executable Embedded SQL)
- CONNECT (Executable Embedded SQL Extension)
- CONTEXT ALLOCATE (Executable Embedded SQL Extension)
- CONTEXT FREE (Executable Embedded SQL Extension)
- CONTEXT USE (Oracle Embedded SQL Directive)
- DEALLOCATE DESCRIPTOR (Embedded SQL Statement)
- DECLARE CURSOR (Embedded SQL Directive)
- DECLARE DATABASE (Oracle Embedded SQL Directive)
- DECLARE STATEMENT (Embedded SQL Directive)
- DECLARE TABLE (Oracle Embedded SQL Directive)
- DELETE (Executable Embedded SQL)
- DESCRIBE (Executable Embedded SQL)
- DESCRIBE DESCRIPTOR (Executable Embedded SQL)
- ENABLE THREADS (Executable Embedded SQL Extension)
- EXECUTE ... END-EXEC (Executable Embedded SQL Extension)
- EXECUTE (Executable Embedded SQL)
- EXECUTE DESCRIPTOR (Executable Embedded SQL
- EXECUTE IMMEDIATE (Executable Embedded SQL)
- FETCH (Executable Embedded SQL)
- FETCH DESCRIPTOR (Executable Embedded SQL)
- FREE (Executable Embedded SQL Extension)
- GET DESCRIPTOR (Executable Embedded SQL)
- INSERT (Executable Embedded SQL)
- LOB APPEND (Executable Embedded SQL Extension)
- LOB ASSIGN (Executable Embedded SQL Extension)
- LOB CLOSE (Executable Embedded SQL Extension)
- LOB COPY (Executable Embedded SQL Extension)
- LOB CREATE TEMPORARY (Executable Embedded SQL Extension)
- LOB DESCRIBE (Executable Embedded SQL Extension)
- LOB DISABLE BUFFERING (Executable Embedded SQL Extension)
- LOB ENABLE BUFFERING (Executable Embedded SQL Extension)
- LOB ERASE (Executable Embedded SQL Extension)
- LOB FILE CLOSE ALL (Executable Embedded SQL Extension)
- LOB FILE SET (Executable Embedded SQL Extension)
- LOB FLUSH BUFFER (Executable Embedded SQL Extension)
- LOB FREE TEMPORARY (Executable Embedded SQL Extension)
- LOB LOAD (Executable Embedded SQL Extension)
- LOB OPEN (Executable Embedded SQL Extension)
- LOB READ (Executable Embedded SQL Extension)
- LOB TRIM (Executable Embedded SQL Extension)
- LOB WRITE (Executable Embedded SQL Extension)
- OPEN (Executable Embedded SQL)
- OPEN DESCRIPTOR (Executable Embedded SQL)
- PREPARE (Executable Embedded SQL)
- ROLLBACK (Executable Embedded SQL)
- SAVEPOINT (Executable Embedded SQL)
- SELECT (Executable Embedded SQL)
- SET DESCRIPTOR (Executable Embedded SQL)
- UPDATE (Executable Embedded SQL)
- VAR (Oracle Embedded SQL Directive)
- WHENEVER (Embedded SQL Directive)
- Pro*COBOL for Windows