Pro PL/I. Supplement to the Oracle Precompilers Guide

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Devoted exclusively to the Pro PL/I Precompiler, this manual supplements the language-independent Programmer's Guide to the Oracle Precompilers. An understanding of the material in the Programmer's Guide is assumed.This companion book shows you how to write PL/I programs that use the powerfuldatabase language SQL to access and manipulate Oracle data. It provides easy-to-follow examples, instructions, and programming tips, as well as several full-length programs to better your understanding and demonstrate the usefulness of embedded SQL.

Author(s): Portfolio T., Smith T.
Edition: release 1.8
Year: 2001

Language: English
Commentary: Part No. A87540-01
Pages: 162

Contents......Page 3
Send Us Your Comments......Page 9
Preface......Page 11
1 Writing a Pro*PL/I Program......Page 15
Host Variable Names......Page 16
Operators, Relational......Page 17
Quotation Marks and Apostrophes......Page 18
The Declare Section......Page 19
Using the INCLUDE Statement......Page 20
Event and Error Handling......Page 21
Structures......Page 22
Special Requirements......Page 23
Referencing Host Variables......Page 24
Restrictions......Page 25
Referencing Indicator Variables......Page 26
Declaring Host Arrays......Page 27
Using Indicator Arrays......Page 28
ANSI Restrictions and Requirements......Page 29
CHARACTER VARYING......Page 30
On Input......Page 31
On Output......Page 32
Internal Datatypes......Page 33
External Datatypes......Page 34
Datatype Conversion......Page 35
Host Variable Equivalencing......Page 36
Handling Nulls......Page 38
Automatic Logins......Page 39
Concurrent Logins......Page 40
2 Error Handling and Diagnostics......Page 43
SQLSTATE Values......Page 44
Using SQLSTATE......Page 53
Declaring SQLCODE......Page 54
Declaring the SQLCA......Page 55
Warning Flags......Page 56
Getting the Full Text of Error Messages......Page 57
Using the WHENEVER Statement......Page 58
Caution......Page 60
Using the ORACA......Page 61
What’s in the ORACA?......Page 62
3 Running the Pro*PL/I Precompiler......Page 65
Precompiler Options......Page 66
Default Values......Page 67
Configuration Files......Page 68
Syntax......Page 69
Usage Notes......Page 70
Usage Notes......Page 71
Entering Options......Page 72
Restrictions......Page 73
Compiling and Linking......Page 74
4 Sample Programs......Page 75
Sample Programs......Page 76
Sample Program 1: Login and Query......Page 77
Sample Program 2: Using a Cursor......Page 78
Sample Program 3: Fetching in Batches......Page 80
Sample Program 4: Datatype Equivalencing......Page 82
Sample Program 5: A SQL*Forms User Exit......Page 86
Sample Program 6: Dynamic SQL Method 1......Page 88
Sample Program 7: Dynamic SQL Method 2......Page 91
Sample Program 8: Dynamic SQL Method 3......Page 94
Sample Program 9: Calling a Stored procedure......Page 98
5 Implementing Dynamic SQL Method 4......Page 103
What Information Does Oracle Need?......Page 104
How is the Information Obtained?......Page 105
Introducing the PL/I SQLDA......Page 106
Declaring a SQLDA......Page 107
The SQLDA Variables......Page 109
SQLDV......Page 110
SQLDVLN......Page 111
SQLDI......Page 112
SQLDH_CUR_VNAMEL......Page 113
Datatypes in the SQLDA......Page 114
Coercing Datatypes After DESCRIBE......Page 115
Extracting Precision and Scale......Page 116
Datatype Codes......Page 117
Handling NULL/NOT NULL Datatypes......Page 119
The Basic Steps......Page 120
Declare a Host String......Page 121
Declare the Data Buffers......Page 122
Initialize the Descriptors......Page 123
DESCRIBE the Bind Variables......Page 127
Get Values for Bind Variables......Page 130
DESCRIBE the SelectList......Page 132
Adjust the Select Descriptor Values......Page 133
FETCH A Row from the Active Set......Page 136
Process the Select-List Items......Page 137
Using Host Arrays......Page 138
Sample 10: Dynamic SQL Method 4 Program......Page 140
Topics......Page 151
Topics......Page 153
Index......Page 155