Skip Headers

Pro*PL/1® Supplement to the Oracle Precompilers Guide
Release 1.8

Part Number A87540-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to next page
Next
View PDF

Contents

List of Figures

List of Tables

Title and Copyright Information

Send Us Your Comments

Preface

Intended Audience
Documentation Accessibility
Structure
Related Documents
Conventions
ANSI Compliance

1 Writing a Pro*PL/1 Program

1.1 Programming Guidelines
1.1.1 Comments
1.1.2 Continuation Lines
1.1.3 Embedded SQL Syntax
1.1.4 Host Variable Names
1.1.5 MAXLITERAL Default Value
1.1.6 Nulls
1.1.7 Operators, Logical
1.1.8 Operators, Relational
1.1.9 PL/1 Versions
1.1.10 Preprocessor
1.1.11 Quotation Marks and Apostrophes
1.1.12 Scope of Variables
1.1.13 SQL Statement Terminator
1.1.14 Statement Labels
1.2 Required Declarations and SQL Statements
1.2.1 The Declare Section
1.2.2 Using the INCLUDE Statement
1.2.3 Event and Error Handling
1.3 Host Variables
1.3.1 Declaring Host Variables
1.3.1.1 Structures
1.3.1.2 An Example
1.3.1.3 Special Requirements
1.3.2 Referencing Host Variables
1.3.2.1 Restrictions
1.4 Indicator Variables
1.4.1 Declaring Indicator Variables
1.4.2 Referencing Indicator Variables
1.5 Host Arrays
1.5.1 Declaring Host Arrays
1.5.2 Referencing Host Arrays
1.6 Pointers as Host Variables
1.7 CHARACTER VARYING
1.7.1 VARYINGReturning Nulls to a CHARACTER (N)
1.8 Handling Character Data
1.8.1 Effects of the MODE Option
1.9 The Oracle Datatypes
1.9.1 Internal Datatypes
1.9.1.1 SQL Pseudocolumns and Functions
1.9.2 External Datatypes
1.10 Datatype Conversion
1.11 Datatype Equivalencing
1.11.1 Host Variable Equivalencing
1.12 Embedding PL/SQL
1.12.1 Using Host Variables with PL/SQL
1.12.2 Using Indicator Variables with PL/SQL
1.12.2.1 Handling Nulls
1.12.2.2 Handling Truncated Values
1.12.3 SQLCHECK
1.13 Connecting to Oracle
1.13.1 Automatic Logins
1.13.2 Concurrent Logins

2 Error Handling and Diagnostics

2.1 SQLSTATE, the SQLCA, and SQLCODE
2.1.1 Declaring SQLSTATE
2.1.2 SQLSTATE Values
2.1.3 Using SQLSTATE
2.1.4 Declaring SQLCODE
2.2 Using the SQLCA
2.2.1 Declaring the SQLCA
2.2.2 What's in the SQLCA?
2.2.3 Key Components of Error Reporting
2.2.3.1 Status Codes
2.2.3.2 Warning Flags
2.2.3.3 Rows-processed Count
2.2.3.4 Parse Error Offset
2.2.3.5 Error Message Text
2.3 Getting the Full Text of Error Messages
2.4 Using the WHENEVER Statement
2.4.1 Scope of WHENEVER
2.4.1.1 Helpful Hint
2.4.1.2 Caution
2.5 Using the ORACA
2.5.1 Declaring the ORACA
2.5.2 Enabling the ORACA
2.5.3 What's in the ORACA?

3 Running the Pro*PL/1 Precompiler

3.1 Precompiler Command
3.2 Precompiler Options
3.2.1 Default Values
3.2.1.1 Determining Current Values
3.2.2 Case Sensitivity
3.2.3 Configuration Files
3.2.4 Scope of Options
3.2.5 DBMS
3.2.6 MODE
3.2.7 Entering Options
3.2.8 Special PL/1 Options
3.3 Doing Conditional Precompilations
3.4 Doing Separate Precompilations
3.4.1 Restrictions
3.5 Compiling and Linking

4 Sample Programs

4.1 Sample Programs
4.2 Sample Program 1: Login and Query
4.3 Sample Program 2: Using a Cursor
4.4 Sample Program 3: Fetching in Batches
4.5 Sample Program 4: Datatype Equivalencing
4.6 Sample Program 5: A SQL*Forms User Exit
4.7 Sample Program 6: Dynamic SQL Method 1
4.8 Sample Program 7: Dynamic SQL Method 2
4.9 Sample Program 8: Dynamic SQL Method 3
4.10 Sample Program 9: Calling a Stored procedure

5 Implementing Dynamic SQL Method 4

5.1 Meeting the Special Requirements of Method 4
5.1.1 What Makes Method 4 Special?
5.1.2 What Information Does Oracle Need?
5.1.3 Where Is the Information Stored?
5.1.4 How is the Information Obtained?
5.2 The SQLDA
5.2.1 Introducing the PL/1 SQLDA
5.2.2 Declaring a SQLDA
5.2.3 Multiple SQLDAs
5.2.4 The SQLDA Variables
5.2.4.1 {SELDSC | BNDDSC}
5.2.4.2 SQLDNUM
5.2.4.3 SQLDFND
5.2.4.4 SQLDSC(N)
5.2.4.5 SQLDV
5.2.4.6 SQLDFMT
5.2.4.7 SQLDVLN
5.2.4.8 SQLDVTYP
5.2.4.9 SQLDI
5.2.4.10 SQLDH_VNAME
5.2.4.11 SQLDH_MAX_VNAMEL
5.2.4.12 SQLDH_CUR_VNAMEL
5.2.4.13 SQLDI_VNAME
5.2.4.14 SQLDI_MAX_VNAMEL
5.2.4.15 SQLDI_CUR_VNAMEL
5.2.4.16 SQLDFCLP
5.2.4.17 SQLDFCRCP
5.2.5 Datatypes in the SQLDA
5.2.5.1 Internal and External Datatypes
5.2.5.2 Coercing Datatypes After DESCRIBE
5.2.5.3 Extracting Precision and Scale
5.2.5.4 Datatype Codes
5.2.6 Handling NULL/NOT NULL Datatypes
5.3 The Basic Steps
5.4 A Closer Look at Each Step
5.4.1 Declare a Host String
5.4.2 Set the Size of the Descriptors
5.4.3 Declare the SQLDAs
5.4.4 Declare the Data Buffers
5.4.5 Initialize the Descriptors
5.4.6 Get the Query Text into the Host String
5.4.7 PREPARE the Query from the Host String
5.4.8 DECLARE a Cursor
5.4.9 DESCRIBE the Bind Variables
5.4.10 VariablesReset Maximum Number of Bind
5.4.11 Get Values for Bind Variables
5.4.12 OPEN the Cursor
5.4.13 DESCRIBE the SelectList
5.4.14 Adjust the Select Descriptor Values
5.4.15 FETCH A Row from the Active Set
5.4.16 Process the Select-List Items
5.4.17 CLOSE the Cursor
5.5 Using Host Arrays
5.6 Sample 10: Dynamic SQL Method 4 Program

A Differences from Previous Release

A.1 Topics

B Operating System Dependencies

B.1 Topics

Index