Skip Headers
Pro*PL/1® Supplem ent to the Oracle Precompilers Guide
Release 1.8
Part Number A87540-03
Home
Book List
Index
M aster Index
Feedback
Next
View PDF
Contents
List of Figures
List of Tables
Title and Copyright In formation
Send Us Your Comments
Preface
Intended Audience
Documentation Accessibility
Structure
Related Documents
Conventio ns
ANSI Compliance
1
Writing a Pro*PL/1 Program
1.1
Programming Guidelines
1.1.1
C omments
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 Apo strophes
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
< dd>
1.2.2
Using the INCLUDE Statement
< span class="secnum">1.2.3 Event and Error Handling
1.3< /span> 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
Refe rencing Indicator Variables
1.5
Host Arrays
< dd>
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 Func tions
1.9.2
External Datatypes
1.10
Datatype Conversion
1.11
Datatype Equivalencing
1.11.1
Ho st 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
Decla ring 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
Ke y Components of Error Reporting
2.2.3.1
Status Codes a>
2.2.3.2
Warning Flags
2.2.3.3 Rows-processed Count
2.2.3.4
P arse Error Offset
2.2.3.5
Error Message Text
< /dl>
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< /span> Helpful Hint
2.4.1.2
Caution
2.5
Using the ORACA
< span class="secnum">2.5.1 Declaring the ORACA
2.5.2
Enabl ing the ORACA
2.5.3
What's in the ORACA?
3
Running the Pro*PL/1 Precomp iler
3.1
Precompiler Command
3.2
Precompiler Options
3.2.1
Default Values
3.2.1.1
Determini ng 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
dl>
3.3
Doing Conditional Precompilations
3.4
Doing Separate Precompilations
3.4.1 Restrictions
3.5
Compili ng and Linking
4
S ample 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: D atatype Equivalencing
4.6
Sample Program 5: A SQL*Forms User Exi t
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
Wha t Information Does Oracle Need?
5.1.3
Where Is the Information S tored?
5.1.4
How is the Information Obtained?
5.2
The SQLDA
5.2.1
Introducing the PL/1 SQLDA
5.2.2
Decl aring 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
SQ LDH_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
< a href="ch5.htm#sthref424">
5.2.4.15
SQLDI_CUR_VNAMEL
5.2.4.16
SQLDFCLP
5.2.4.17
SQLDFCRCP
dl>
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 span> Extracting Precision and Scale
5.2.5.4
Datatype Codes
< /dd>
5.2.6
Handling NULL/NOT NULL Datatypes
5.3
The Basic Steps
5.4
A Closer Look at Each Step
5.4.1
D eclare a Host String
5.4.2
Set the Size of the Descriptors
dd>
5.4.3
Declare the SQLDAs
5.4.4 Declare the Data Buffers
5.4.5
In itialize 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
Variabl esReset Maximum Number of Bind
5.4.11
Get Values for Bind Variab les
5.4.12
OPEN the Cursor
5.4.13
DESCRIBE the SelectList
5.4.14 span> Adjust the Select Descriptor Values
5.4.15
FETCH A Row fro m the Active Set
5.4.16
Process the Select-List Items
< dd>
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
Operat ing System Dependencies
B.1
Topics
Index