Procedure Builder
Developers Guide
Release 1.5
Part No. A324851
Preface
T
his guide documents Oracle Procedure Builder. Before you use it,
you should be familiar with the following topics:
audience
typographic conventions
This section will prepare you for using this guide and direct you to the
minimum information you need to get started.
Preface
Preface
T
his guide documents Oracle Procedure Builder. Before you use it,
you should be familiar with the following topics:
audience
typographic conventions
This section will prepare you for using this guide and direct you to the
minimum information you need to get started.
Preface
Audience
The information in this guide is intended primarily for application
developers and for readers who want to create displays. Readers should
have a working knowledge of SQL, PL/SQL, and Oracle Server
concepts.
Major Sections of
this Guide
Part II
Typographic Conventions
Throughout this guide, we use typographic conventions to distinguish
important elements from the body text of the document.
Menu Navigation
Syntax
ii
Audience
The information in this guide is intended primarily for application
developers and for readers who want to create displays. Readers should
have a working knowledge of SQL, PL/SQL, and Oracle Server
concepts.
Major Sections of
this Guide
Part II
Typographic Conventions
Throughout this guide, we use typographic conventions to distinguish
important elements from the body text of the document.
Menu Navigation
Syntax
ii
Means you should choose Open from the File menu, and then Database
from the Open submenu.
Notational
Conventions
[]
{}
italics
UPPERCASE
New or Non-Technical
Users
2.
Preface
iii
Means you should choose Open from the File menu, and then Database
from the Open submenu.
Notational
Conventions
[]
{}
italics
UPPERCASE
New or Non-Technical
Users
2.
Preface
iii
Experienced or
Technical Users
3.
4.
2.
3.
iv
Experienced or
Technical Users
3.
4.
2.
3.
iv
Developer/2000
Installation Guide
or
System Release
Bulletin
Oracle7 Server
Concepts Manual
Oracle7 Server
Administrators
Guide
Oracle7 Server
Application
Developers Guide
PL/SQL Users
Guide and
Reference
Oracle7 Server
SQL Language
Reference Manual
Oracle7 Server
Messages and
Codes Manual
Precompiler Documentation
for Your Language
Related Information
As an application designer using Oracle Procedure Builder, Release 1.5,
you may need to refer to some or all of the documents listed below.
Please see the document in question for information on its specific
purpose and usage.
Preface
Developer/2000
Installation Guide
or
System Release
Bulletin
Oracle7 Server
Concepts Manual
Oracle7 Server
Administrators
Guide
Oracle7 Server
Application
Developers Guide
PL/SQL Users
Guide and
Reference
Oracle7 Server
SQL Language
Reference Manual
Oracle7 Server
Messages and
Codes Manual
Precompiler Documentation
for Your Language
Related Information
As an application designer using Oracle Procedure Builder, Release 1.5,
you may need to refer to some or all of the documents listed below.
Please see the document in question for information on its specific
purpose and usage.
Preface
vi
vi
Contents
Chapter 1
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Oracle Procedure Builder . . . . . . . . . . . . . . . . . . . . . . . . . . .
Concepts of Oracle Procedure Builder . . . . . . . . . . . . . . . . . . . . .
Interface Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
12
12
14
Chapter 2
Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
What is Oracle Procedure Builder? . . . . . . . . . . . . . . . . . . . . . . . .
Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Components of Oracle Procedure Builder . . . . . . . . . . . . . . . . . .
PL/SQL Program Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Debug Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Load Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
22
22
23
25
28
28
Chapter 3
31
32
36
3 10
Chapter 4
Contents
CONTENTS
PART I
Contents
Chapter 1
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Oracle Procedure Builder . . . . . . . . . . . . . . . . . . . . . . . . . . .
Concepts of Oracle Procedure Builder . . . . . . . . . . . . . . . . . . . . .
Interface Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
12
12
14
Chapter 2
Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
What is Oracle Procedure Builder? . . . . . . . . . . . . . . . . . . . . . . . .
Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Components of Oracle Procedure Builder . . . . . . . . . . . . . . . . . .
PL/SQL Program Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Debug Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Load Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
22
22
23
25
28
28
Chapter 3
31
32
36
3 10
Chapter 4
Contents
CONTENTS
PART I
4 14
4 20
4 24
4 31
4 35
4 39
Chapter 5
51
52
53
56
5 10
Chapter 6
61
62
62
62
64
PART II
Chapter 7
Command Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ATTACH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BREAK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CLOSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
COMPILE (Libraries) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
COMPILE (Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CONNECT Standalone Only . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CREATE (Bind Variable) Standalone Only . . . . . . . . . . . . . . . .
CREATE (Libraries) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DELETE (Bind Variables) Standalone Only . . . . . . . . . . . . . . . .
DELETE (Debug Actions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DELETE (Libraries) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DELETE (Library Program Units) . . . . . . . . . . . . . . . . . . . . . . . . .
DELETE (Load Path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DELETE (Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DESCRIBE (Debug Actions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DESCRIBE (Libraries) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DESCRIBE (Load Path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ii
71
72
75
76
78
79
7 10
7 11
7 12
7 13
7 15
7 16
7 17
7 18
7 19
7 20
7 21
7 22
7 23
4 14
4 20
4 24
4 31
4 35
4 39
Chapter 5
51
52
53
56
5 10
Chapter 6
61
62
62
62
64
PART II
Chapter 7
Command Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ATTACH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BREAK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CLOSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
COMPILE (Libraries) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
COMPILE (Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CONNECT Standalone Only . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CREATE (Bind Variable) Standalone Only . . . . . . . . . . . . . . . .
CREATE (Libraries) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DELETE (Bind Variables) Standalone Only . . . . . . . . . . . . . . . .
DELETE (Debug Actions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DELETE (Libraries) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DELETE (Library Program Units) . . . . . . . . . . . . . . . . . . . . . . . . .
DELETE (Load Path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DELETE (Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DESCRIBE (Debug Actions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DESCRIBE (Libraries) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DESCRIBE (Load Path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ii
71
72
75
76
78
79
7 10
7 11
7 12
7 13
7 15
7 16
7 17
7 18
7 19
7 20
7 21
7 22
7 23
Contents
7 24
7 25
7 26
7 27
7 28
7 29
7 30
7 31
7 32
7 33
7 34
7 35
7 36
7 37
7 39
7 40
7 41
7 42
7 44
7 45
7 46
7 47
7 49
7 50
7 51
7 52
7 53
7 54
7 55
7 56
7 57
7 58
7 59
7 60
7 62
7 63
7 64
7 65
7 66
7 67
7 69
7 70
iii
CONTENTS
DESCRIBE (Locals) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DESCRIBE (Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DESCRIBE (Version) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DESCRIBE (Tables and Views) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DETACH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DISABLE (Debug Actions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DISABLE (Compile Options) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DISABLE (Logging) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DISCONNECT Standalone Only . . . . . . . . . . . . . . . . . . . . . . . . .
ENABLE (Debug Actions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ENABLE (Compile Options) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ENABLE (Logging) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EXECUTEStandalone Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EXPORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GRANT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HELP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
INSERT (Library Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . .
INSERT (Load Path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
INTERPRET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LIST (Debug Actions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LIST (Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LOAD (Library Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . .
LOAD (Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LOAD (Stored Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OPEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
QUIT Standalone Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RENAME (Libraries) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RESET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
REVERT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
REVOKE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SAVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHOW (Call Stack) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHOW (Debug Actions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHOW (Libraries) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHOW (Locals) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHOW (Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
STEP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
STORE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TRIGGER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents
7 24
7 25
7 26
7 27
7 28
7 29
7 30
7 31
7 32
7 33
7 34
7 35
7 36
7 37
7 39
7 40
7 41
7 42
7 44
7 45
7 46
7 47
7 49
7 50
7 51
7 52
7 53
7 54
7 55
7 56
7 57
7 58
7 59
7 60
7 62
7 63
7 64
7 65
7 66
7 67
7 69
7 70
iii
CONTENTS
DESCRIBE (Locals) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DESCRIBE (Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DESCRIBE (Version) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DESCRIBE (Tables and Views) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DETACH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DISABLE (Debug Actions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DISABLE (Compile Options) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DISABLE (Logging) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DISCONNECT Standalone Only . . . . . . . . . . . . . . . . . . . . . . . . .
ENABLE (Debug Actions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ENABLE (Compile Options) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ENABLE (Logging) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EXECUTEStandalone Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EXPORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GRANT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HELP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
INSERT (Library Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . .
INSERT (Load Path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
INTERPRET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LIST (Debug Actions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LIST (Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LOAD (Library Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . .
LOAD (Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LOAD (Stored Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OPEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
QUIT Standalone Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RENAME (Libraries) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RESET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
REVERT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
REVOKE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SAVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHOW (Call Stack) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHOW (Debug Actions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHOW (Libraries) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHOW (Locals) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHOW (Program Units) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
STEP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
STORE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TRIGGER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 8
iv
81
82
84
86
88
89
8 10
8 11
8 12
8 13
8 14
8 16
8 18
8 22
8 22
8 23
8 24
8 25
8 26
8 27
8 27
8 28
8 28
8 29
8 29
8 30
8 30
8 31
8 31
8 32
8 33
8 33
8 33
8 34
8 34
8 35
8 35
8 36
8 37
8 38
8 39
8 40
8 41
Chapter 8
iv
81
82
84
86
88
89
8 10
8 11
8 12
8 13
8 14
8 16
8 18
8 22
8 22
8 23
8 24
8 25
8 26
8 27
8 27
8 28
8 28
8 29
8 29
8 30
8 30
8 31
8 31
8 32
8 33
8 33
8 33
8 34
8 34
8 35
8 35
8 36
8 37
8 38
8 39
8 40
8 41
Contents
8 42
8 43
8 44
8 45
8 45
8 45
8 46
8 46
8 47
8 47
8 48
8 48
8 48
8 49
8 50
8 51
8 52
8 53
8 53
8 53
8 54
8 54
8 55
8 55
8 56
8 56
8 57
8 57
8 57
8 58
8 58
8 62
8 62
8 62
8 63
8 64
8 65
8 66
8 67
8 68
8 68
8 69
8 69
CONTENTS
OLE2.INVOKE_OBJ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OLE2.RELEASE_OBJ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OLE2.SET_PROPERTY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The ORA_FFI Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.FFI_ERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.FIND_FUNCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.FIND_LIBRARY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.FUNCHANDLETYPE . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.GENERATE_FOREIGN . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.IS_NULL_PTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.LIBHANDLETYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.POINTERTYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.REGISTER_FUNCTION . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.LOAD_LIBRARY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.REGISTER_PARAMETER . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.REGISTER_RETURN . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.UNLOAD_LIBARAR Y . . . . . . . . . . . . . . . . . . . . . . . . . .
The ORA_NLS Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.AMERICAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.AMERICAN_DA TE . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.BAD_ATTRIBUTE . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.GET_LANG_SCALAR . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.GET_LANG_STR . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.LINGUISTIC_COLLA TE . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.LINGUISTIC_SPECIALS . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.MODIFIED_DATE_FMT . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.NO_ITEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.NOT_FOUND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.RIGHT_TO_LEFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.SIMPLE_CS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.SINGLE_BYTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The ORA_PROF Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_PROF.BAD_TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_PROF.CREATE_TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_PROF.DESTROY_TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_PROF.ELAPSED_TIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_PROF.RESET_TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_PROF.START_TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_PROF.STOP_TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The TEXT_IO Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.FCLOSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.FILE_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.FOPEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents
8 42
8 43
8 44
8 45
8 45
8 45
8 46
8 46
8 47
8 47
8 48
8 48
8 48
8 49
8 50
8 51
8 52
8 53
8 53
8 53
8 54
8 54
8 55
8 55
8 56
8 56
8 57
8 57
8 57
8 58
8 58
8 62
8 62
8 62
8 63
8 64
8 65
8 66
8 67
8 68
8 68
8 69
8 69
CONTENTS
OLE2.INVOKE_OBJ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OLE2.RELEASE_OBJ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OLE2.SET_PROPERTY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The ORA_FFI Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.FFI_ERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.FIND_FUNCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.FIND_LIBRARY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.FUNCHANDLETYPE . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.GENERATE_FOREIGN . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.IS_NULL_PTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.LIBHANDLETYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.POINTERTYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.REGISTER_FUNCTION . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.LOAD_LIBRARY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.REGISTER_PARAMETER . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.REGISTER_RETURN . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_FFI.UNLOAD_LIBARAR Y . . . . . . . . . . . . . . . . . . . . . . . . . .
The ORA_NLS Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.AMERICAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.AMERICAN_DA TE . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.BAD_ATTRIBUTE . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.GET_LANG_SCALAR . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.GET_LANG_STR . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.LINGUISTIC_COLLA TE . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.LINGUISTIC_SPECIALS . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.MODIFIED_DATE_FMT . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.NO_ITEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.NOT_FOUND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.RIGHT_TO_LEFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.SIMPLE_CS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_NLS.SINGLE_BYTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The ORA_PROF Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_PROF.BAD_TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_PROF.CREATE_TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_PROF.DESTROY_TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_PROF.ELAPSED_TIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_PROF.RESET_TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_PROF.START_TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORA_PROF.STOP_TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The TEXT_IO Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.FCLOSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.FILE_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.FOPEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 9
vi
TEXT_IO.IS_OPEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.GET_LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.NEW_LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.PUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.PUTF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.PUT_LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The TOOL_ENV Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ENV.GETVAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The TOOL_ERR Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.CLEAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.CODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.ENCODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.MESSAGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.NERRORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.POP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.TOOL_ERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.TOPERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The TOOL_RES Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.BAD_FILE_HANDLE . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.BUFFER_OVERFLOW . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.FILE_NOT_FOUND . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.NO_RESOURCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.RFCLOSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.RFHANDLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.RFOPEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.RFREAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8 70
8 71
8 72
8 73
8 74
8 75
8 76
8 76
8 77
8 77
8 77
8 78
8 78
8 79
8 79
8 79
8 80
8 81
8 83
8 83
8 84
8 84
8 85
8 86
8 87
8 88
Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Coping with Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Oracle Server Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Abnormal Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Calling Oracle Customer Support . . . . . . . . . . . . . . . . . . . . . . . . .
Oracle Procedure Builder Error Message Descriptions . . . . . . .
91
92
93
93
94
95
Chapter 9
vi
TEXT_IO.IS_OPEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.GET_LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.NEW_LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.PUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.PUTF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEXT_IO.PUT_LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The TOOL_ENV Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ENV.GETVAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The TOOL_ERR Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.CLEAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.CODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.ENCODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.MESSAGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.NERRORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.POP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.TOOL_ERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_ERR.TOPERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The TOOL_RES Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.BAD_FILE_HANDLE . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.BUFFER_OVERFLOW . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.FILE_NOT_FOUND . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.NO_RESOURCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.RFCLOSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.RFHANDLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.RFOPEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOL_RES.RFREAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8 70
8 71
8 72
8 73
8 74
8 75
8 76
8 76
8 77
8 77
8 77
8 78
8 78
8 79
8 79
8 79
8 80
8 81
8 83
8 83
8 84
8 84
8 85
8 86
8 87
8 88
Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Coping with Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Oracle Server Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Abnormal Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Calling Oracle Customer Support . . . . . . . . . . . . . . . . . . . . . . . . .
Oracle Procedure Builder Error Message Descriptions . . . . . . .
91
92
93
93
94
95
PART
Getting Started
Concepts
PART
Getting Started
Concepts
CHAPTER
Getting Started
T
interface overview 1 4
Getting Started
11
CHAPTER
Getting Started
T
interface overview 1 4
Getting Started
11
client-side PL/SQL
libraries
server-side PL/SQL
program units
Integrated Editing
12
integrated editing
incremental development
source-level debugging
browsing error
messages
undoing changes
client-side PL/SQL
libraries
server-side PL/SQL
program units
Integrated Editing
12
integrated editing
incremental development
source-level debugging
browsing error
messages
undoing changes
Incremental
Development
Source-level
Debugging
Oracle Procedure Builder allows you to create, edit, and call stored
program unitsthat is, PL/SQL procedures and functions that reside
and execute in the Oracle7 Server. You can drag a stored program unit
into the development environment to edit and debug its source code.
Getting Started
13
Incremental
Development
Source-level
Debugging
Oracle Procedure Builder allows you to create, edit, and call stored
program unitsthat is, PL/SQL procedures and functions that reside
and execute in the Oracle7 Server. You can drag a stored program unit
into the development environment to edit and debug its source code.
Getting Started
13
Interface Overview
The user interface consists of the following:
menus
Interpreter window
14
Interface Overview
The user interface consists of the following:
menus
Interpreter window
14
CHAPTER
Concepts
T
document types 2 2
debug actions 2 8
Concepts
21
CHAPTER
Concepts
T
document types 2 2
debug actions 2 8
Concepts
21
Document Types
External PL/SQL documents are tagged with a document type to
indicate their contents. In the case of documents that reside in the file
system, the following extensions are used:
22
pls
pld
pll
log
Document Types
External PL/SQL documents are tagged with a document type to
indicate their contents. In the case of documents that reside in the file
system, the following extensions are used:
22
pls
pld
pll
log
modal
modeless
Concepts
23
modal
modeless
Concepts
23
Interpreter Components
control bar
Source pane
Navigator pane
Interpreter pane
Alternatively, you could click on the program units entry in the Object
Navigator.
For more information on Oracle Procedure Builder commands, see
Command Reference on page 7 1. For more information on using
the Oracle Procedure Builder interface, see Oracle Procedure Builder
Interface on page 3 1.
Logging Interpreter Input
and Output
24
Interpreter Components
control bar
Source pane
Navigator pane
Interpreter pane
Alternatively, you could click on the program units entry in the Object
Navigator.
For more information on Oracle Procedure Builder commands, see
Command Reference on page 7 1. For more information on using
the Oracle Procedure Builder interface, see Oracle Procedure Builder
Interface on page 3 1.
Logging Interpreter Input
and Output
24
LOG 7 52
DISABLE (Logging) 7 31
ENABLE (Logging) 7 35
You can use the PL/SQL Program Unit editor to create and edit
PL/SQL program units. Using the Program Unit editor, you can
compile program units after you have created them, and trouble-shoot
any errors generated directly in the editor.
anonymous blocks
packages
Concepts
25
LOG 7 52
DISABLE (Logging) 7 31
ENABLE (Logging) 7 35
You can use the PL/SQL Program Unit editor to create and edit
PL/SQL program units. Using the Program Unit editor, you can
compile program units after you have created them, and trouble-shoot
any errors generated directly in the editor.
anonymous blocks
packages
Concepts
25
Anonymous Blocks
Subprograms
Functions and
Procedures
specification (optional)
body (required)
The specification defines only the names, parameters, and return type
(applies to functions only) of the subprogram. For example, the
specification of procedure proc1 is displayed below:
PROCEDURE proc1 (arg CHAR);
The body contains the same information as the specification, and also
includes the actual implementation of the subprogram (i.e., its
26
Anonymous Blocks
Subprograms
Functions and
Procedures
specification (optional)
body (required)
The specification defines only the names, parameters, and return type
(applies to functions only) of the subprogram. For example, the
specification of procedure proc1 is displayed below:
PROCEDURE proc1 (arg CHAR);
The body contains the same information as the specification, and also
includes the actual implementation of the subprogram (i.e., its
26
Packages
specification (required)
body (optional)
Body
Using PL/SQL
Version 1
Its important to note that the Oracle tools and Oracle Procedure
Builder use PL/SQL Version 1, not PL/SQL Version 2. However, to
find the most complete and up-to-date information on the PL/SQL
language and its syntax, we suggest referring to the PL/SQL Users
Guide and Reference Version 2.0.
Note: The following Version 2.0 features are not supported in
Version 1:
PL/SQL tables
host arrays
DEFAULT keyword
Concepts
27
Packages
specification (required)
body (optional)
Body
Using PL/SQL
Version 1
Its important to note that the Oracle tools and Oracle Procedure
Builder use PL/SQL Version 1, not PL/SQL Version 2. However, to
find the most complete and up-to-date information on the PL/SQL
language and its syntax, we suggest referring to the PL/SQL Users
Guide and Reference Version 2.0.
Note: The following Version 2.0 features are not supported in
Version 1:
PL/SQL tables
host arrays
DEFAULT keyword
Concepts
27
Debug Actions
Once you have created one or more program units, you can debug
them in Oracle Procedure Builder by creating debug actions. Debug
actions enable you to monitor and/or interrupt the execution of
PL/SQL program units.
There are two types of debug actions:
breakpoints
debug triggers
Initializing the Load Path You can initialize the load path to contain one or more directories by
setting the ORAPLSQLLOADPATH environment variable. You define
ORAPLSQLLOADPATH in the same way you define other
environment variables on your base operating system, keeping in mind
such platform-specific rules as path length, etc.
For example, within a UNIX Cshell, you can initialize the load path to
the directories /usr/plsql and /home/user by entering the following
command before invoking Oracle Procedure Builder:
setenv ORAPLSQLLOADPATH /usr/plsql:/home/user
28
Debug Actions
Once you have created one or more program units, you can debug
them in Oracle Procedure Builder by creating debug actions. Debug
actions enable you to monitor and/or interrupt the execution of
PL/SQL program units.
There are two types of debug actions:
breakpoints
debug triggers
Initializing the Load Path You can initialize the load path to contain one or more directories by
setting the ORAPLSQLLOADPATH environment variable. You define
ORAPLSQLLOADPATH in the same way you define other
environment variables on your base operating system, keeping in mind
such platform-specific rules as path length, etc.
For example, within a UNIX Cshell, you can initialize the load path to
the directories /usr/plsql and /home/user by entering the following
command before invoking Oracle Procedure Builder:
setenv ORAPLSQLLOADPATH /usr/plsql:/home/user
28
You can use DESCRIBE to display the current load path. For example,
enter the following command to display the current load path:
PL/SQL> .describe loadpath
Load Path:
External Location: Current Directory
PL/SQL>
Since you have never modified the load path, only the current directory
(the default) is listed in the load path.
For more information, see DESCRIBE (Load Path) on page 7 23.
INSERT
You can use INSERT to add directories to the load path. You can
specify whether a directory path be inserted at the beginning or the end
of the current list of directories in the load path. This determines the
search order when looking for an object.
For more information, see INSERT (Load Path) on page 7 44.
DELETE
You can use DELETE to reset the load path to contain no directory
paths except the current directory (the default). For more information,
see DELETE (Load Path) on page 7 19.
Concepts
29
You can use DESCRIBE to display the current load path. For example,
enter the following command to display the current load path:
PL/SQL> .describe loadpath
Load Path:
External Location: Current Directory
PL/SQL>
Since you have never modified the load path, only the current directory
(the default) is listed in the load path.
For more information, see DESCRIBE (Load Path) on page 7 23.
INSERT
You can use INSERT to add directories to the load path. You can
specify whether a directory path be inserted at the beginning or the end
of the current list of directories in the load path. This determines the
search order when looking for an object.
For more information, see INSERT (Load Path) on page 7 44.
DELETE
You can use DELETE to reset the load path to contain no directory
paths except the current directory (the default). For more information,
see DELETE (Load Path) on page 7 19.
Concepts
29
2 10
2 10
CHAPTER
Oracle Procedure
Builder Interface
T
31
CHAPTER
Oracle Procedure
Builder Interface
T
31
Navigator menu
All actions you can access in the Navigator menu can also be
performed by clicking on one of the buttons in the vertical button bar.
In addition, other common file operations such as Save, Open, and
Run, and editing operations such as Cut Copy and Paste are also
provided in the button bar.
32
Navigator menu
All actions you can access in the Navigator menu can also be
performed by clicking on one of the buttons in the vertical button bar.
In addition, other common file operations such as Save, Open, and
Run, and editing operations such as Cut Copy and Paste are also
provided in the button bar.
32
Creating Objects
Deleting Objects
Selecting Objects
Each object listed in the Navigator has three basic parts from left to
right:
subobject
indicator
type icon
name
Objects are listed in the Navigator in the order in which they are
created. You can change the order that objects are listed in the
Navigator.
To move an object in the Object Navigator:
33
Creating Objects
Deleting Objects
Selecting Objects
Each object listed in the Navigator has three basic parts from left to
right:
subobject
indicator
type icon
name
Objects are listed in the Navigator in the order in which they are
created. You can change the order that objects are listed in the
Navigator.
To move an object in the Object Navigator:
33
Click and drag the object to its new position in the object hierarchy.
Expanding Nodes
2.
Collapsing Nodes
1.
2.
2.
1.
2.
34
Click and drag the object to its new position in the object hierarchy.
Expanding Nodes
2.
Collapsing Nodes
1.
2.
2.
1.
2.
34
2.
You can search for any named object in the Object Navigator by
entering an object name in the Find field at the top of the Object
Navigator
1.
Type the name, full or partial, of the object you wish to find in the
Find field.
As soon as you begin typing, Oracle Graphics begins an
incremental forward search from the top of the Object Navigator.
The incremental search continues until you stop typing.
Oracle Procedure Builder expands nodes as necessary to reveal its
current location during the search.
2.
35
2.
You can search for any named object in the Object Navigator by
entering an object name in the Find field at the top of the Object
Navigator
1.
Type the name, full or partial, of the object you wish to find in the
Find field.
As soon as you begin typing, Oracle Graphics begins an
incremental forward search from the top of the Object Navigator.
The incremental search continues until you stop typing.
Oracle Procedure Builder expands nodes as necessary to reveal its
current location during the search.
2.
35
control bar
Source pane
Interpreter pane
split bars
All panes in the modeless Interpreter share one main control bar, which
contains buttons that perform common commands. Also, split bars
separate the panes, enabling you to change their relative sizes.
By default, the Navigator pane is not initially displayed in the modeless
Interpreter. You can either use the Object Navigator window to access
objects, or you can insert the Navigator pane from the menu.
36
control bar
Source pane
Interpreter pane
split bars
All panes in the modeless Interpreter share one main control bar, which
contains buttons that perform common commands. Also, split bars
separate the panes, enabling you to change their relative sizes.
By default, the Navigator pane is not initially displayed in the modeless
Interpreter. You can either use the Object Navigator window to access
objects, or you can insert the Navigator pane from the menu.
36
Navigator Buttons
Source Pane
The main control bar (located at the top of the modal Interpreter)
contains several buttons that perform various Oracle Procedure Builder
operations.
Step In
Step Over
Step Out
Go
Reset
Close
Delete
Expand
Collapse
Expand All
Collapse All
37
Navigator Buttons
Source Pane
The main control bar (located at the top of the modal Interpreter)
contains several buttons that perform various Oracle Procedure Builder
operations.
Step In
Step Over
Step Out
Go
Reset
Close
Delete
Expand
Collapse
Expand All
Collapse All
37
=>
B(n)
T(n)
Trigger
Edit
Not all systems provide support for a multiple button mouse. If you
do not have a multiple button mouse, the above commands are
available from the Debug menu.
Navigator Pane
The Navigator pane displays the Object Navigator while you are
debugging program units. By default, the Navigator pane
automatically appears in the modal Interpreter. In the modeless
Interpreter, you can hide or show the Navigator pane according to your
preference.
The Object Navigator pane allows you to view the current call stack, as
well view and optionally modify the values of local variables and
parameters at the current scope location.
For more information, see the following sections:
38
=>
B(n)
T(n)
Trigger
Edit
Not all systems provide support for a multiple button mouse. If you
do not have a multiple button mouse, the above commands are
available from the Debug menu.
Navigator Pane
The Navigator pane displays the Object Navigator while you are
debugging program units. By default, the Navigator pane
automatically appears in the modal Interpreter. In the modeless
Interpreter, you can hide or show the Navigator pane according to your
preference.
The Object Navigator pane allows you to view the current call stack, as
well view and optionally modify the values of local variables and
parameters at the current scope location.
For more information, see the following sections:
38
Interpreter Pane
Debug Levels
New Prompt
Not all systems provide support for a multiple button mouse. If you
do not have a multiple button mouse, see your Oracle Procedure
Builder operating system documentation.
Split Bars
Split bars enable you to change the relative amount of space occupied
by each pane in the Interpreter. When the modal Interpreter initially
appears, a split bar is located on the bottom edge of the Source pane.
When you choose View>Navigator to display the Navigator pane, a
second split bar is located on the bottom edge of the Navigator pane.
To change the amount of space occupied by two panes, move your
cursor over the split bar separating the two panes, so the cursor
appears as cross hairs (+). Click and hold the mouse button, then move
39
Interpreter Pane
Debug Levels
New Prompt
Not all systems provide support for a multiple button mouse. If you
do not have a multiple button mouse, see your Oracle Procedure
Builder operating system documentation.
Split Bars
Split bars enable you to change the relative amount of space occupied
by each pane in the Interpreter. When the modal Interpreter initially
appears, a split bar is located on the bottom edge of the Source pane.
When you choose View>Navigator to display the Navigator pane, a
second split bar is located on the bottom edge of the Navigator pane.
To change the amount of space occupied by two panes, move your
cursor over the split bar separating the two panes, so the cursor
appears as cross hairs (+). Click and hold the mouse button, then move
39
the cursor up or down to the desired position and release the mouse
button. The panes separated by the split bar are resized accordingly.
Source Pane 3 7
Navigator Pane 3 8
Interpreter Pane 3 9
3 10
the cursor up or down to the desired position and release the mouse
button. The panes separated by the split bar are resized accordingly.
Source Pane 3 7
Navigator Pane 3 8
Interpreter Pane 3 9
3 10
3 11
3 11
3 12
3 12
CHAPTER
Working with
PL/SQL Constructs
T
Working with
PL/SQL Constructs
41
CHAPTER
Working with
PL/SQL Constructs
T
Working with
PL/SQL Constructs
41
You can define a program unit simply by typing its source directly in
the Interpreter. The PL/SQL> prompt in the Interpreter pane accepts
any legal PL/SQL program unit.
For example, to execute an anonymous block in Oracle Procedure
Builder, type the following PL/SQL at the Interpreter command
prompt:
PL/SQL> text_io.put_line(Hello World);
The easiest and most common place to enter PL/SQL source is in the
Program Unit editor, which provides editing, compilation, and
warning/error message browsing when developing program units.
1.
Select the Program Units node in the Navigator and choose the
Create button or Navigator>Create to display the New Program
Unit dialog.
Note: If no program units currently exist, try double-clicking
the Program Units node to display the New Program Unit
dialog.
Alternatively, you can choose Tools>Program Unit Editor to
display the Program Unit Editor, then choose the New button to
display the New Program Unit dialog.
2.
3.
42
4.
Enter the full specification and body of the program unit in the
Source Text pane.
5.
You can define a program unit simply by typing its source directly in
the Interpreter. The PL/SQL> prompt in the Interpreter pane accepts
any legal PL/SQL program unit.
For example, to execute an anonymous block in Oracle Procedure
Builder, type the following PL/SQL at the Interpreter command
prompt:
PL/SQL> text_io.put_line(Hello World);
The easiest and most common place to enter PL/SQL source is in the
Program Unit editor, which provides editing, compilation, and
warning/error message browsing when developing program units.
1.
Select the Program Units node in the Navigator and choose the
Create button or Navigator>Create to display the New Program
Unit dialog.
Note: If no program units currently exist, try double-clicking
the Program Units node to display the New Program Unit
dialog.
Alternatively, you can choose Tools>Program Unit Editor to
display the Program Unit Editor, then choose the New button to
display the New Program Unit dialog.
2.
3.
42
4.
Enter the full specification and body of the program unit in the
Source Text pane.
5.
For more information, see Using the Program Unit Editor on page
4 20.
Loading External
Program Units
LOAD
For example, suppose the file named hello.pls contains the source for
the procedure hello_world. To load hello_world into the environment,
choose File>Load in the modeless Interpreter to display the Load
Program Unit dialog box (shown below).
Working with
PL/SQL Constructs
43
For more information, see Using the Program Unit Editor on page
4 20.
Loading External
Program Units
LOAD
For example, suppose the file named hello.pls contains the source for
the procedure hello_world. To load hello_world into the environment,
choose File>Load in the modeless Interpreter to display the Load
Program Unit dialog box (shown below).
Working with
PL/SQL Constructs
43
For example, suppose the file named script.pld contains the following:
PROCEDURE bonuses (my_ename IN CHAR) IS
CURSOR c1 IS
SELECT ename, sal*0.15 bonus FROM emp;
BEGIN
FOR c1rec IN c1 LOOP
TEXT_IO.PUTF(%s %s %s %s, Employee:,
c1rec.ename, Bonus:, to_char(c1rec.bonus));
TEXT_IO.NEW_LINE;
END LOOP;
END;
PROCEDURE main IS
empname
VARCHAR2(20);
BEGIN
empname := JONES;
bonuses(empname);
END;
.CREATE LIB lib1
.INSERT PROC bonuses, main LIB lib1
44
For example, suppose the file named script.pld contains the following:
PROCEDURE bonuses (my_ename IN CHAR) IS
CURSOR c1 IS
SELECT ename, sal*0.15 bonus FROM emp;
BEGIN
FOR c1rec IN c1 LOOP
TEXT_IO.PUTF(%s %s %s %s, Employee:,
c1rec.ename, Bonus:, to_char(c1rec.bonus));
TEXT_IO.NEW_LINE;
END LOOP;
END;
PROCEDURE main IS
empname
VARCHAR2(20);
BEGIN
empname := JONES;
bonuses(empname);
END;
.CREATE LIB lib1
.INSERT PROC bonuses, main LIB lib1
44
Working with
PL/SQL Constructs
45
Working with
PL/SQL Constructs
45
Importing Program
Unit Text Files
You can export a program unit to a text file on your file system, and
then import the text file at a later time. There are two ways to import
program unit text files:
To import a program unit text file using the Program Unit editor:
1.
Select the Program Units node and choose the Create button or
Navigator Create to show the New Program Unit dialog.
2.
3.
4.
Place the cursor in the Source Text pane where you wish to insert
the exported text file.
5.
6.
Specify the name and location of the text file you wish to import.
7.
Choose the OK button to accept the file dialog and import the file.
The text file appears in the Program Unit editor.
8.
9.
46
Importing Program
Unit Text Files
You can export a program unit to a text file on your file system, and
then import the text file at a later time. There are two ways to import
program unit text files:
To import a program unit text file using the Program Unit editor:
1.
Select the Program Units node and choose the Create button or
Navigator Create to show the New Program Unit dialog.
2.
3.
4.
Place the cursor in the Source Text pane where you wish to insert
the exported text file.
5.
6.
Specify the name and location of the text file you wish to import.
7.
Choose the OK button to accept the file dialog and import the file.
The text file appears in the Program Unit editor.
8.
9.
46
Resolving References
to Program Units
calling subprograms
2.
3.
4.
Attached libraries.
5.
Displaying Program
Unit Source
You can display the source of your defined program units in the Source
pane of the Interpreter, or in the Program Unit editor.
You display program unit source in the Interpreter Source pane when
you want to view the program unit source, with line numbers, and
optionally perform debug actions on the program unit.
You display program unit source in the Program Unit editor when you
want to edit the content of the program unit itself.
There are two ways to display program unit source in the Interpreter:
To list the source for the procedure bonuses, highlight bonuses in the
Object Navigator by clicking on it once. You could achieve the same
effect by entering the following command on the Interpreter command
line:
PL/SQL> .list PROCEDURE BONUSES BODY
Working with
PL/SQL Constructs
47
Resolving References
to Program Units
calling subprograms
2.
3.
4.
Attached libraries.
5.
Displaying Program
Unit Source
You can display the source of your defined program units in the Source
pane of the Interpreter, or in the Program Unit editor.
You display program unit source in the Interpreter Source pane when
you want to view the program unit source, with line numbers, and
optionally perform debug actions on the program unit.
You display program unit source in the Program Unit editor when you
want to edit the content of the program unit itself.
There are two ways to display program unit source in the Interpreter:
To list the source for the procedure bonuses, highlight bonuses in the
Object Navigator by clicking on it once. You could achieve the same
effect by entering the following command on the Interpreter command
line:
PL/SQL> .list PROCEDURE BONUSES BODY
Working with
PL/SQL Constructs
47
Program unit source lines are numbered from top to bottom, starting
with 1. For example, consider the following source text for a
stand-alone procedure named hello_world, in which the put_line
statement appears on line 5:
00001
00002
00003
00004
00005
00006
48
Program unit source lines are numbered from top to bottom, starting
with 1. For example, consider the following source text for a
stand-alone procedure named hello_world, in which the put_line
statement appears on line 5:
00001
00002
00003
00004
00005
00006
48
To display the source of a program unit in the Program Unit Editor, use
one of the following methods:
Double-click on the program unit object in the Navigator, or
Select the program unit in the Object Navigator and choose Program
Unit Editor from the pop-up menu, or
Choose Tools>Program Unit Editor and select the program unit
you wish to edit from the Name drop-down list.
Note: The Name drop-down list only contains program units
available in the current scope.
Calling Subprograms
Make sure the Program Unit editor is open and is the most recently
selected window.
2.
Place the cursor in the Program Unit editor where you want to
insert the subprogram entry.
3.
4.
Searching and
Replacing
You can perform global search and replace on a text string or regular
expression, within a single program unit, or within all program units
located in the current scope.
Searching a Single
Program Unit
Open the program unit you wish to search in the Program Unit
editor.
Working with
PL/SQL Constructs
49
To display the source of a program unit in the Program Unit Editor, use
one of the following methods:
Double-click on the program unit object in the Navigator, or
Select the program unit in the Object Navigator and choose Program
Unit Editor from the pop-up menu, or
Choose Tools>Program Unit Editor and select the program unit
you wish to edit from the Name drop-down list.
Note: The Name drop-down list only contains program units
available in the current scope.
Calling Subprograms
Make sure the Program Unit editor is open and is the most recently
selected window.
2.
Place the cursor in the Program Unit editor where you want to
insert the subprogram entry.
3.
4.
Searching and
Replacing
You can perform global search and replace on a text string or regular
expression, within a single program unit, or within all program units
located in the current scope.
Searching a Single
Program Unit
Open the program unit you wish to search in the Program Unit
editor.
Working with
PL/SQL Constructs
49
2.
3.
4.
5.
6.
7.
Searching all Program
Units in the Current
Scope
You can perform a search and replace across all program units located
in the Program Units node of the Object Navigator, or across all
program units located in a library.
1.
Select either the Program Units node, or the library object you wish
to search across.
If you do not specify a scope by selecting a node or object in the
Navigator, Oracle Procedure Builder uses the next available valid
scope, based on your current position in the Navigator.
2.
3.
4.
5.
4 10
2.
3.
4.
5.
6.
7.
Searching all Program
Units in the Current
Scope
You can perform a search and replace across all program units located
in the Program Units node of the Object Navigator, or across all
program units located in a library.
1.
Select either the Program Units node, or the library object you wish
to search across.
If you do not specify a scope by selecting a node or object in the
Navigator, Oracle Procedure Builder uses the next available valid
scope, based on your current position in the Navigator.
2.
3.
4.
5.
4 10
Redefining Program
Units
If you load or directly enter the source code of a program unit that is
already defined in the environment, the existing program unit is
redefined.
For example, you previously loaded the procedure hello_world using the
Load Program Unit dialog box. Interactively calling hello_world yields
the following:
PL/SQL> hello_world;
Hello World
PL/SQL>
Program Unit
Invalidation
Working with
PL/SQL Constructs
4 11
Redefining Program
Units
If you load or directly enter the source code of a program unit that is
already defined in the environment, the existing program unit is
redefined.
For example, you previously loaded the procedure hello_world using the
Load Program Unit dialog box. Interactively calling hello_world yields
the following:
PL/SQL> hello_world;
Hello World
PL/SQL>
Program Unit
Invalidation
Working with
PL/SQL Constructs
4 11
4 12
4 12
PL/SQL> hello;
ERROR 306 at line 3, column 3
wrong number or types of arguments in call to
HELLO_WORLD
...
PL/SQL>
Working with
PL/SQL Constructs
4 13
PL/SQL> hello;
ERROR 306 at line 3, column 3
wrong number or types of arguments in call to
HELLO_WORLD
...
PL/SQL>
Working with
PL/SQL Constructs
4 13
Compiling Program
Units
Individual Compilation
You can compile an individual program unit from within the Program
Unit editor, or in the Object Navigator.
See the section Using the Program Unit Editor, for information about
compiling a program unit in the Program Unit editor.
To compile an individual program unit in the Object Navigator:
Select the program unit object and choose Navigator>Compile.
Oracle Procedure Builder executes the COMPILE(Program Units)
command. If any errors are encountered, the Program Unit editor
appears containing the source of the selected program unit and the
compilation errors are displayed in the Program Unit editor Error
Compilation Messages pane.
Batch Compilation
2.
4 14
Compiling Program
Units
Individual Compilation
You can compile an individual program unit from within the Program
Unit editor, or in the Object Navigator.
See the section Using the Program Unit Editor, for information about
compiling a program unit in the Program Unit editor.
To compile an individual program unit in the Object Navigator:
Select the program unit object and choose Navigator>Compile.
Oracle Procedure Builder executes the COMPILE(Program Units)
command. If any errors are encountered, the Program Unit editor
appears containing the source of the selected program unit and the
compilation errors are displayed in the Program Unit editor Error
Compilation Messages pane.
Batch Compilation
2.
4 14
Displaying Program
Unit Information
Oracle Procedure Builder enables you to list the names and types of the
program units that are currently defined. There are two ways to
display information on defined program units:
For example, thus far you have defined the procedures bonuses, main,
hello_world, and hello within the environment. To check this, look in the
Navigator under Program Units. The name and type of the procedures
should appear there.
You can also display detailed information about a specific program
unit. The information displayed includes the program unit name, its
type, whether it is compiled, whether it is open for editing, and cross
reference information.
For example, type the following command to see detailed information
about bonuses:
PL/SQL> .describe proc bonuses
Procedure Body: BONUSES
Parameters:
my_ename IN CHAR
External Location: INTERPRETER
Compiled: YES
Open: NO
References:
Package Spec TEXT_IO
Table EMP
Referenced by:
Procedure Body MAIN
PL/SQL>
Working with
PL/SQL Constructs
4 15
Displaying Program
Unit Information
Oracle Procedure Builder enables you to list the names and types of the
program units that are currently defined. There are two ways to
display information on defined program units:
For example, thus far you have defined the procedures bonuses, main,
hello_world, and hello within the environment. To check this, look in the
Navigator under Program Units. The name and type of the procedures
should appear there.
You can also display detailed information about a specific program
unit. The information displayed includes the program unit name, its
type, whether it is compiled, whether it is open for editing, and cross
reference information.
For example, type the following command to see detailed information
about bonuses:
PL/SQL> .describe proc bonuses
Procedure Body: BONUSES
Parameters:
my_ename IN CHAR
External Location: INTERPRETER
Compiled: YES
Open: NO
References:
Package Spec TEXT_IO
Table EMP
Referenced by:
Procedure Body MAIN
PL/SQL>
Working with
PL/SQL Constructs
4 15
Checking Cross
References in the
Navigator
4 16
Checking Cross
References in the
Navigator
4 16
You can store program units in the database using the STORE
command. Stored program units are PL/SQL packages and
subprograms that reside and execute in the Oracle7 Server. You can
invoke the STORE command in the following ways:
2.
3.
4.
Drag the program unit below the Program Units subnode under
the Database Objects/namespace node, and release.
The STORE command is echoed in the Interpreter:
PL/SQL> .STORE SUBPROGRAM /puname BODY
For more information about stored program units, see Working with
Stored Program Units on page 4 31.
For more information about the STORE command, see STORE on
page 7 69.
Exporting Program
Units to Text Files
You can export a program unit to a text file on the file system and load
it back in at a later time. You may want to define and debug a program
unit in Oracle Procedure Builder, export it to a text file, and distribute it
to multiple users to include in other Oracle products. You can export
part of, or all of a program unit.
To export a program unit to a text file:
1.
2.
If you only wish to export part of the program unit, select the text
you wish to export.
3.
Working with
PL/SQL Constructs
4 17
You can store program units in the database using the STORE
command. Stored program units are PL/SQL packages and
subprograms that reside and execute in the Oracle7 Server. You can
invoke the STORE command in the following ways:
2.
3.
4.
Drag the program unit below the Program Units subnode under
the Database Objects/namespace node, and release.
The STORE command is echoed in the Interpreter:
PL/SQL> .STORE SUBPROGRAM /puname BODY
For more information about stored program units, see Working with
Stored Program Units on page 4 31.
For more information about the STORE command, see STORE on
page 7 69.
Exporting Program
Units to Text Files
You can export a program unit to a text file on the file system and load
it back in at a later time. You may want to define and debug a program
unit in Oracle Procedure Builder, export it to a text file, and distribute it
to multiple users to include in other Oracle products. You can export
part of, or all of a program unit.
To export a program unit to a text file:
1.
2.
If you only wish to export part of the program unit, select the text
you wish to export.
3.
Working with
PL/SQL Constructs
4 17
4.
5.
Renaming Program
Units
You can rename program units only from within the Program Unit
editor.
Note: If you rename a program unit that is referenced in other
program units, you must change those references to reflect the
new name.
1.
2.
3.
In the body of the program unit, edit the program units name.
4.
5.
Removing Program
Units
Once youve defined and debugged a program unit, you can remove it
from Oracle Procedure Builder if you no longer need it. Once removed,
a program unit and any of its subobjects (types, variables,
subprograms, etc.) are no longer defined within the development
session.
There are two ways to remove program units:
select the program unit in the Object Navigator and then choose
the Delete button or Navigator>Delete
4 18
4.
5.
Renaming Program
Units
You can rename program units only from within the Program Unit
editor.
Note: If you rename a program unit that is referenced in other
program units, you must change those references to reflect the
new name.
1.
2.
3.
In the body of the program unit, edit the program units name.
4.
5.
Removing Program
Units
Once youve defined and debugged a program unit, you can remove it
from Oracle Procedure Builder if you no longer need it. Once removed,
a program unit and any of its subobjects (types, variables,
subprograms, etc.) are no longer defined within the development
session.
There are two ways to remove program units:
select the program unit in the Object Navigator and then choose
the Delete button or Navigator>Delete
4 18
Deleting Program
Units
You can delete program units either from the Object Navigator, or from
within the Program Unit editor.
Note: If you delete a program unit that is referenced in other
program units, you must remove those references to reflect the
deletion.
To delete a program unit from the Object Navigator.
1.
2.
3.
2.
3.
4.
Working with
PL/SQL Constructs
4 19
Deleting Program
Units
You can delete program units either from the Object Navigator, or from
within the Program Unit editor.
Note: If you delete a program unit that is referenced in other
program units, you must remove those references to reflect the
deletion.
To delete a program unit from the Object Navigator.
1.
2.
3.
2.
3.
4.
Working with
PL/SQL Constructs
4 19
The Program Unit editor is shown below and its elements are described
following the figure.
Compile
Is a button that compiles the program unit appearing in the Source Text
pane. Any error messages generated as a result of the compilation will
appear in the scrollable Compilation Messages pane (see below).
Apply
Is a button that saves any changes made to the program unit in the
editor since it was first opened or since the last apply or revert
operation. The editor remains open.
4 20
The Program Unit editor is shown below and its elements are described
following the figure.
Compile
Is a button that compiles the program unit appearing in the Source Text
pane. Any error messages generated as a result of the compilation will
appear in the scrollable Compilation Messages pane (see below).
Apply
Is a button that saves any changes made to the program unit in the
editor since it was first opened or since the last apply or revert
operation. The editor remains open.
4 20
Revert
Is a button that restores the state of the program unit to what it was
when the editor was first opened or when the last apply or revert
operation occurred.
New
Is a button that displays the New Program Unit dialog box. In it you
specify the type and name of the program unit you wish to create.
Delete
Close
Name
Is a drop-down list that displays the name of the current program unit.
You can use the drop-down list to select another existing program unit
to edit.
Compilation
Messages Pane
Working with
PL/SQL Constructs
4 21
Revert
Is a button that restores the state of the program unit to what it was
when the editor was first opened or when the last apply or revert
operation occurred.
New
Is a button that displays the New Program Unit dialog box. In it you
specify the type and name of the program unit you wish to create.
Delete
Close
Name
Is a drop-down list that displays the name of the current program unit.
You can use the drop-down list to select another existing program unit
to edit.
Compilation
Messages Pane
Working with
PL/SQL Constructs
4 21
Split Bar
Located on the bottom edge of the Source Text pane, the split bar
enables you to change the relative amount of space occupied by the two
panes in the Program Unit editor.
If the displayed program unit has no associated compilation error
messages, only the Source Text pane is displayed. This is because the
split bar is located (by default) near the bottom of the editor, effectively
removing the Compilation Messages pane from view.
To change the amount of space occupied by the Source Text and
Compilation Messages panes, move your cursor over the split bar at
the bottom of the Source Text pane, so the cursor appears as cross hairs
(+). Click and hold the mouse button, then move the cursor up or
down to the desired position and release the mouse button. The two
panes are resized accordingly.
Status Bar
Located at the bottom of the Program Unit editor, the status bar
displays information about the current state of the program unit.
The left edge of the status bar displays the following messages:
Not Modified
Modified
The right edge of the status bar displays the following messages:
4 22
Split Bar
Located on the bottom edge of the Source Text pane, the split bar
enables you to change the relative amount of space occupied by the two
panes in the Program Unit editor.
If the displayed program unit has no associated compilation error
messages, only the Source Text pane is displayed. This is because the
split bar is located (by default) near the bottom of the editor, effectively
removing the Compilation Messages pane from view.
To change the amount of space occupied by the Source Text and
Compilation Messages panes, move your cursor over the split bar at
the bottom of the Source Text pane, so the cursor appears as cross hairs
(+). Click and hold the mouse button, then move the cursor up or
down to the desired position and release the mouse button. The two
panes are resized accordingly.
Status Bar
Located at the bottom of the Program Unit editor, the status bar
displays information about the current state of the program unit.
The left edge of the status bar displays the following messages:
Not Modified
Modified
The right edge of the status bar displays the following messages:
4 22
Not Compiled
Successfully
Compiled
Compiled with
Errors
Working with
PL/SQL Constructs
4 23
Not Compiled
Successfully
Compiled
Compiled with
Errors
Working with
PL/SQL Constructs
4 23
4 24
4 24
Creating and
Modifying Libraries
Creating a Library
administer libraries
You can create and modify PL/SQL libraries using the following
commands:
CREATE
OPEN
INSERT
DELETE
SAVE
CLOSE
The CREATE command enables you to create a new library that can be
stored in either the file system or the current database. You can invoke
the CREATE command in two ways:
in the Object Navigator, select the Libraries node and choose the
Create button or Navigator>Create
Note: If no libraries currently exist, you can double-click on
the Libraries node to create a new library
choose File>New
Note that, in the case of libraries stored in the file system, the name of
the library is designated by the basename of the file (the full file name
minus any leading directory and any trailing extension). For example,
on UNIX, the file /private/libs/emplib.pll holds the library named emplib.
The newly created library (initially named LIB_xxx if no name is
entered) is automatically opened. Once a library has been created, its
contents can be modified using the INSERT and DELETE(Program
Units) commands.
For more information, see CREATE (Libraries) on page 7 13.
Working with
PL/SQL Constructs
4 25
Creating and
Modifying Libraries
Creating a Library
administer libraries
You can create and modify PL/SQL libraries using the following
commands:
CREATE
OPEN
INSERT
DELETE
SAVE
CLOSE
The CREATE command enables you to create a new library that can be
stored in either the file system or the current database. You can invoke
the CREATE command in two ways:
in the Object Navigator, select the Libraries node and choose the
Create button or Navigator>Create
Note: If no libraries currently exist, you can double-click on
the Libraries node to create a new library
choose File>New
Note that, in the case of libraries stored in the file system, the name of
the library is designated by the basename of the file (the full file name
minus any leading directory and any trailing extension). For example,
on UNIX, the file /private/libs/emplib.pll holds the library named emplib.
The newly created library (initially named LIB_xxx if no name is
entered) is automatically opened. Once a library has been created, its
contents can be modified using the INSERT and DELETE(Program
Units) commands.
For more information, see CREATE (Libraries) on page 7 13.
Working with
PL/SQL Constructs
4 25
Opening a Library
You can use the OPEN command to open a library for editing (i.e. to
insert or delete a program unit). You can invoke the OPEN command
in two ways:
selecting File>Open, then using the dialog box to select the file
you wish to open
You can use the INSERT command to add program units to an open
library. You can invoke the INSERT command in two ways:
To drag a program unit in the Object Navigator, select the program unit
in the Object Navigator and drag the object below the librarys
Program Units node. Release the mouse button to insert a copy of the
program unit in the library.
Note: The program unit is not moved into the library. Its
object still appears under the Program Units node. Removing
that program unit from the library does not remove it from the
original Program Units node.
For more information, see INSERT (Library Program Units) on page
7 42.
Removing Program Units
4 26
You can use the DELETE command to remove program units from an
open library. You can invoke DELETE in two ways:
Opening a Library
You can use the OPEN command to open a library for editing (i.e. to
insert or delete a program unit). You can invoke the OPEN command
in two ways:
selecting File>Open, then using the dialog box to select the file
you wish to open
You can use the INSERT command to add program units to an open
library. You can invoke the INSERT command in two ways:
To drag a program unit in the Object Navigator, select the program unit
in the Object Navigator and drag the object below the librarys
Program Units node. Release the mouse button to insert a copy of the
program unit in the library.
Note: The program unit is not moved into the library. Its
object still appears under the Program Units node. Removing
that program unit from the library does not remove it from the
original Program Units node.
For more information, see INSERT (Library Program Units) on page
7 42.
Removing Program Units
4 26
You can use the DELETE command to remove program units from an
open library. You can invoke DELETE in two ways:
You can use the SAVE command to save changes to an open library.
You can invoke the SAVE command in the following ways:
You can use the CLOSE command to close an open library. You can
invoke the CLOSE command in the following ways:
Working with
PL/SQL Constructs
4 27
You can use the SAVE command to save changes to an open library.
You can invoke the SAVE command in the following ways:
You can use the CLOSE command to close an open library. You can
invoke the CLOSE command in the following ways:
Working with
PL/SQL Constructs
4 27
Attaching and
Detaching Libraries
Attaching a Library
You can attach to a library that resides in either the file system or the
current database. You can invoke the ATTACH command in the
following ways:
You can use the DETACH command to remove the specified library
from the current set of attached libraries. You can invoke the DETACH
command in the following ways:
Compiling Library
Program Units
You can use the COMPILE command to compile the contents of open
and attached libraries. You can invoke the COMPILE command either
in the following ways::
4 28
Attaching and
Detaching Libraries
Attaching a Library
You can attach to a library that resides in either the file system or the
current database. You can invoke the ATTACH command in the
following ways:
You can use the DETACH command to remove the specified library
from the current set of attached libraries. You can invoke the DETACH
command in the following ways:
Compiling Library
Program Units
You can use the COMPILE command to compile the contents of open
and attached libraries. You can invoke the COMPILE command either
in the following ways::
4 28
Loading Library
Program Units
Viewing Library
Information
You can view information about the libraries that are currently open
within and attached to Oracle Procedure Builder.
The Object Navigator displays a list of the libraries that are currently
open and attached. You could also invoke the SHOW command to
display the same information in the Interpreter pane. For more
information, see SHOW (Libraries) on page 7 64.
To display information about a specific library (including its mode, its
location, and its contents), you could invoke the DESCRIBE command.
For example:
Working with
PL/SQL Constructs
4 29
Loading Library
Program Units
Viewing Library
Information
You can view information about the libraries that are currently open
within and attached to Oracle Procedure Builder.
The Object Navigator displays a list of the libraries that are currently
open and attached. You could also invoke the SHOW command to
display the same information in the Interpreter pane. For more
information, see SHOW (Libraries) on page 7 64.
To display information about a specific library (including its mode, its
location, and its contents), you could invoke the DESCRIBE command.
For example:
Working with
PL/SQL Constructs
4 29
Library Administration Oracle Procedure Builder supports the following operations on libraries
stored in the database:
Deleting a Library
You can use the RENAME command to rename a library stored in the
database. For example:
PL/SQL> .rename lib LIB1 TO MY_LIB
4 30
Library Administration Oracle Procedure Builder supports the following operations on libraries
stored in the database:
Deleting a Library
You can use the RENAME command to rename a library stored in the
database. For example:
PL/SQL> .rename lib LIB1 TO MY_LIB
4 30
To grant a user access in the Grant Access List dialog, enter a valid
database userid in the User field and select the Add button. The user is
added to the list for that object. Choose the OK button to close the
dialog.
To revoke access from a user in the Grant Access List dialog, select the
userid from the list field and choose the Remove button. Choose the
OK button to accept your changes and close the Grant Access List
dialog.
For more information about performing these actions on the Interpreter
command line, see GRANT on page 7 40 and REVOKE on page
7 58.
calling syntax
name resolution
privileges
Working with
PL/SQL Constructs
4 31
To grant a user access in the Grant Access List dialog, enter a valid
database userid in the User field and select the Add button. The user is
added to the list for that object. Choose the OK button to close the
dialog.
To revoke access from a user in the Grant Access List dialog, select the
userid from the list field and choose the Remove button. Choose the
OK button to accept your changes and close the Grant Access List
dialog.
For more information about performing these actions on the Interpreter
command line, see GRANT on page 7 40 and REVOKE on page
7 58.
calling syntax
name resolution
privileges
Working with
PL/SQL Constructs
4 31
For more information about stored program units, see the Oracle7
Server Concepts Manual.
Calling Syntax
The syntax for calling stored subprograms is identical to the syntax for
calling client-side subprograms:
[packagename.]subprogramname(args)
4 32
For more information about stored program units, see the Oracle7
Server Concepts Manual.
Calling Syntax
The syntax for calling stored subprograms is identical to the syntax for
calling client-side subprograms:
[packagename.]subprogramname(args)
4 32
Referencing Stored
Subprograms
Oracle Procedure Builder does not recognize the default values for
optional arguments in the headers of stored subprograms. For
example, suppose you have the following stored function:
FUNCTION tax (amt NUMBER, rate NUMBER := 8.25)
RETURN NUMBER IS
BEGIN
RETURN(amt * rate);
END;
Debugging Stored
Program Units
2.
Expand the subnodes for the database user and Program Units.
Working with
PL/SQL Constructs
4 33
Referencing Stored
Subprograms
Oracle Procedure Builder does not recognize the default values for
optional arguments in the headers of stored subprograms. For
example, suppose you have the following stored function:
FUNCTION tax (amt NUMBER, rate NUMBER := 8.25)
RETURN NUMBER IS
BEGIN
RETURN(amt * rate);
END;
Debugging Stored
Program Units
2.
Expand the subnodes for the database user and Program Units.
Working with
PL/SQL Constructs
4 33
3.
4.
Hold down your mouse button and drag the program unit object
from the Database Objects node to the Program Units node of the
Navigator, and release.
The following command is echoed in the Interpreter:
PL/SQL> .LOAD STORED PROGRAMUNIT user.puname NAMESPACE
5.
For more information about the LOAD command, see LOAD (Stored
Program Units on page 7 51.
For more information about debugging program units, see Debugging
PL/SQL Program Units on page 5 1.
VARCHAR2
NUMBER
DATE
BOOLEAN
Name Resolution
4 34
3.
4.
Hold down your mouse button and drag the program unit object
from the Database Objects node to the Program Units node of the
Navigator, and release.
The following command is echoed in the Interpreter:
PL/SQL> .LOAD STORED PROGRAMUNIT user.puname NAMESPACE
5.
For more information about the LOAD command, see LOAD (Stored
Program Units on page 7 51.
For more information about debugging program units, see Debugging
PL/SQL Program Units on page 5 1.
VARCHAR2
NUMBER
DATE
BOOLEAN
Name Resolution
4 34
Privileges
A stored subprogram runs under the security domain (or schema) of its
creator and not the current user. The current user must have EXECUTE
privilege on the subprogram to call it.
The Stored Program Unit editor is show below and its elements are
described following the figure.
New
Is a button that displays the New Program Unit dialog box. In it you
specify the type and name of the stored program unit you wish to
create.
Save
Working with
PL/SQL Constructs
4 35
Privileges
A stored subprogram runs under the security domain (or schema) of its
creator and not the current user. The current user must have EXECUTE
privilege on the subprogram to call it.
The Stored Program Unit editor is show below and its elements are
described following the figure.
New
Is a button that displays the New Program Unit dialog box. In it you
specify the type and name of the stored program unit you wish to
create.
Save
Working with
PL/SQL Constructs
4 35
Revert
Is a button that restores the state of the stored program unit to what it
was when the editor was first opened or when the last apply or revert
operation occurred.
Drop
Close
Is a button that attempts to close the Stored Program Unit editor. If any
changes have been made but not applied, an alert appears, prompting
you to apply or revert the changes or cancel the operation. Once all
changes have been applied or reverted, the Stored Program Unit editor
is closed.
Owner
Name
Used to enter and edit PL/SQL stored program unit source text.
Compilation
Messages Pane
4 36
Revert
Is a button that restores the state of the stored program unit to what it
was when the editor was first opened or when the last apply or revert
operation occurred.
Drop
Close
Is a button that attempts to close the Stored Program Unit editor. If any
changes have been made but not applied, an alert appears, prompting
you to apply or revert the changes or cancel the operation. Once all
changes have been applied or reverted, the Stored Program Unit editor
is closed.
Owner
Name
Used to enter and edit PL/SQL stored program unit source text.
Compilation
Messages Pane
4 36
Split Bar
Located on the bottom edge of the Source Text pane, the split bar
enables you to change the relative amount of space occupied by the two
panes in the Stored Program Unit editor.
If the displayed stored program unit has no associated compilation
error messages, only the Source Text pane is displayed. This is because
the split bar is located (by default) near the bottom of the editor,
effectively removing the Compilation Messages pane from view.
To change the amount of space occupied by the Source Text and
Compilation Messages panes, move your cursor over the split bar at
the bottom of the Source Text pane, so the cursor appears as cross hairs
(+). Click and hold the mouse button, then move the cursor up or
down to the desired position and release the mouse button. The two
panes are resized accordingly.
Status Bar
Located at the bottom of the Stored Program Unit editor, the status bar
displays information about the current state of the stored program unit.
The left edge of the status bar displays the following messages:
Not Modified
Modified
The right edge of the status bar displays the following messages:
Working with
PL/SQL Constructs
4 37
Split Bar
Located on the bottom edge of the Source Text pane, the split bar
enables you to change the relative amount of space occupied by the two
panes in the Stored Program Unit editor.
If the displayed stored program unit has no associated compilation
error messages, only the Source Text pane is displayed. This is because
the split bar is located (by default) near the bottom of the editor,
effectively removing the Compilation Messages pane from view.
To change the amount of space occupied by the Source Text and
Compilation Messages panes, move your cursor over the split bar at
the bottom of the Source Text pane, so the cursor appears as cross hairs
(+). Click and hold the mouse button, then move the cursor up or
down to the desired position and release the mouse button. The two
panes are resized accordingly.
Status Bar
Located at the bottom of the Stored Program Unit editor, the status bar
displays information about the current state of the stored program unit.
The left edge of the status bar displays the following messages:
Not Modified
Modified
The right edge of the status bar displays the following messages:
Working with
PL/SQL Constructs
4 37
4 38
Not Compiled
Successfully
Compiled
Compiled with
Errors
4 38
Not Compiled
Successfully
Compiled
Compiled with
Errors
The Database Trigger editor is shown below and its elements are
described following the figure.
Table Owner
Working with
PL/SQL Constructs
4 39
The Database Trigger editor is shown below and its elements are
described following the figure.
Table Owner
Working with
PL/SQL Constructs
4 39
Table
Name
Triggering (BEFORE
and AFTER)
Statement
Of Columns
Is a list box displaying the columns of the table selected in the Table
pop-list. If the UPDATE check box is enabled, an optional list of
columns can be included in the triggering statement.
If you select one or more columns in the Of Columns list box, the
trigger is fired on an UPDATE statement only when one of the
specified columns is updated. If no columns are selected, the trigger is
fired when any column of the the associated table is updated.
Referencing OLD As
NEW As
When
4 40
Table
Name
Triggering (BEFORE
and AFTER)
Statement
Of Columns
Is a list box displaying the columns of the table selected in the Table
pop-list. If the UPDATE check box is enabled, an optional list of
columns can be included in the triggering statement.
If you select one or more columns in the Of Columns list box, the
trigger is fired on an UPDATE statement only when one of the
specified columns is updated. If no columns are selected, the trigger is
fired when any column of the the associated table is updated.
Referencing OLD As
NEW As
When
4 40
Trigger Body
New
Save
Is a button that compiles the source appearing in the Trigger Body field.
Any error messages generated as a result of the compilation will
appear in a separate dialog.
Revert
Is a button that restores the state of the database trigger to what it was
when the editor was first opened or when the last apply or revert
operation occurred.
Drop
Close
Working with
PL/SQL Constructs
4 41
Trigger Body
New
Save
Is a button that compiles the source appearing in the Trigger Body field.
Any error messages generated as a result of the compilation will
appear in a separate dialog.
Revert
Is a button that restores the state of the database trigger to what it was
when the editor was first opened or when the last apply or revert
operation occurred.
Drop
Close
Working with
PL/SQL Constructs
4 41
4 42
4 42
CHAPTER
Debugging PL/SQL
Program Units
T
51
CHAPTER
Debugging PL/SQL
Program Units
T
51
Breakpoints
breakpoints
debug triggers
Debug Triggers
52
Breakpoints
breakpoints
debug triggers
Debug Triggers
52
Specifying Executable
Source Lines
Debug actions must be attached to program unit source lines that are
executable. A source line is considered executable if it contains one
or more statements for which the PL/SQL compiler generates code.
For example, source lines containing assignment statements and
procedure calls are executable, while source lines containing comments,
blank lines, declarations, or the NULL statement are not executable.
Creating Breakpoints
2.
Double-click on the line where you wish to create the break point.
Alternatively, you can select the line where you wish to create the
breakpoint and choose the Break command from the pop-up menu
in the Source pane, or choose Debug>Break from the menu to
display the PL/SQL Breakpoint dialog.
Choose the OK button to accept the PL/SQL Breakpoint dialog and
create the breakpoint.
53
Specifying Executable
Source Lines
Debug actions must be attached to program unit source lines that are
executable. A source line is considered executable if it contains one
or more statements for which the PL/SQL compiler generates code.
For example, source lines containing assignment statements and
procedure calls are executable, while source lines containing comments,
blank lines, declarations, or the NULL statement are not executable.
Creating Breakpoints
2.
Double-click on the line where you wish to create the break point.
Alternatively, you can select the line where you wish to create the
breakpoint and choose the Break command from the pop-up menu
in the Source pane, or choose Debug>Break from the menu to
display the PL/SQL Breakpoint dialog.
Choose the OK button to accept the PL/SQL Breakpoint dialog and
create the breakpoint.
53
Tutorial
Creating Debug
Triggers
54
You can use debug triggers to specify conditions for when a given
debug action should take place. You can use any of the packages
provided with Oracle Procedure Builder to define your debug actions.
Tutorial
Creating Debug
Triggers
54
You can use debug triggers to specify conditions for when a given
debug action should take place. You can use any of the packages
provided with Oracle Procedure Builder to define your debug actions.
2.
Select the line where you want to create the debug trigger and
choose the Trigger command from the pop-up menu in the Source
pane, or choose Debug>Trigger from the menu to display the
PL/SQL Trigger dialog.
3.
4.
5.
Choose the OK button to accept the dialog and create the trigger.
55
2.
Select the line where you want to create the debug trigger and
choose the Trigger command from the pop-up menu in the Source
pane, or choose Debug>Trigger from the menu to display the
PL/SQL Trigger dialog.
3.
4.
5.
Choose the OK button to accept the dialog and create the trigger.
55
Now the Source pane appears as shown below, with the cursor
positioned at the beginning of line 3.
00001 PROCEDURE bonuses (my_ename IN CHAR) IS
00002
CURSOR c1 IS
00003 |
SELECT ename, sal*0.15 bonus FROM emp;
00004 BEGIN
00005
FOR c1rec IN c1 LOOP
00006
TEXT_IO.PUTF(%s %s %s %s, Employee:,
00007
c1rec.ename, Bonus:, to_char(c1rec.bonus));
00008
TEXT_IO.NEW_LINE;
56
Now the Source pane appears as shown below, with the cursor
positioned at the beginning of line 3.
00001 PROCEDURE bonuses (my_ename IN CHAR) IS
00002
CURSOR c1 IS
00003 |
SELECT ename, sal*0.15 bonus FROM emp;
00004 BEGIN
00005
FOR c1rec IN c1 LOOP
00006
TEXT_IO.PUTF(%s %s %s %s, Employee:,
00007
c1rec.ename, Bonus:, to_char(c1rec.bonus));
00008
TEXT_IO.NEW_LINE;
56
00009
00010
END LOOP;
END;
Browsing Debug
Actions
To see a list of all the debug actions youve set thus far, look in the
Navigator under the Debug Actions node.
Alternatively, you can type the SHOW command at the Interpreter
command line. For example, type the following command to show the
breakpoint you inserted and its source location:
PL/SQL> .show breakpoints
Breakpoints:
#1 (Breakpoint: Procedure Body BONUSES, line 6)
PL/SQL>
If you had multiple breakpoints, this command would list all of them.
For more information about the SHOW command, see SHOW (Debug
Actions) on page 7 63.
Describing Debug
Actions
57
00009
00010
END LOOP;
END;
Browsing Debug
Actions
To see a list of all the debug actions youve set thus far, look in the
Navigator under the Debug Actions node.
Alternatively, you can type the SHOW command at the Interpreter
command line. For example, type the following command to show the
breakpoint you inserted and its source location:
PL/SQL> .show breakpoints
Breakpoints:
#1 (Breakpoint: Procedure Body BONUSES, line 6)
PL/SQL>
If you had multiple breakpoints, this command would list all of them.
For more information about the SHOW command, see SHOW (Debug
Actions) on page 7 63.
Describing Debug
Actions
57
Displaying Debug
Action Source
You can display the line of program unit source to which a debug
action is attached using the LIST command. You can invoke LIST in
two ways:
For example, enter the following command to display the source for
procedure bonuses, with the cursor positioned at the beginning of line 8
to mark the current source location:
PL/SQL> .list trigger 1
Disabling and
Enabling Debug
Actions
You can temporarily remove specific debug actions, and then restore
them later if necessary, using the DISABLE and ENABLE commands.
These commands can be invoked in the following ways:
58
Displaying Debug
Action Source
You can display the line of program unit source to which a debug
action is attached using the LIST command. You can invoke LIST in
two ways:
For example, enter the following command to display the source for
procedure bonuses, with the cursor positioned at the beginning of line 8
to mark the current source location:
PL/SQL> .list trigger 1
Disabling and
Enabling Debug
Actions
You can temporarily remove specific debug actions, and then restore
them later if necessary, using the DISABLE and ENABLE commands.
These commands can be invoked in the following ways:
58
You have a program unit foo that calls the subprogram bar. That
subprogram is also called by many other program units. You want to
create a breakpoint in the subprogram, but you only want to enable
that breakpoint when the subprogram is called from foo. To do this,
you need to perform the following steps:
1.
2.
Example
Consider the same situation where procedure bar accepts the argument
message from the many procedures that call it. Procedure foo passes a
unique argument of hello world to bar. In this case, we could define a
trigger than raises a breakpoint in procedure bar only when foo passes
its argument:
PL/SQL> .trigger proc bar line 3 IS
>BEGIN
> IF DEBUG.GETN(message) = hello world THEN
>
RAISE DEBUG.BREAK;
> END IF;
>END;
Removing Debug
Actions
You can permanently delete one or more debug actions using the
DELETE command, which can be invoked in two ways:
59
You have a program unit foo that calls the subprogram bar. That
subprogram is also called by many other program units. You want to
create a breakpoint in the subprogram, but you only want to enable
that breakpoint when the subprogram is called from foo. To do this,
you need to perform the following steps:
1.
2.
Example
Consider the same situation where procedure bar accepts the argument
message from the many procedures that call it. Procedure foo passes a
unique argument of hello world to bar. In this case, we could define a
trigger than raises a breakpoint in procedure bar only when foo passes
its argument:
PL/SQL> .trigger proc bar line 3 IS
>BEGIN
> IF DEBUG.GETN(message) = hello world THEN
>
RAISE DEBUG.BREAK;
> END IF;
>END;
Removing Debug
Actions
You can permanently delete one or more debug actions using the
DELETE command, which can be invoked in two ways:
59
For example, select the breakpoint entry in the Navigator and then
choose Delete. After accepting the confirmation alert, the following
command and messages are echoed in the Interpreter pane:
PL/SQL> .DELETE ACTION 2
Removing debug action 2...
PL/SQL>
The current execution location specifies the next PL/SQL source line to
be executed. It corresponds to what is commonly referred to as the
program counter, or PC. When control passes to the Interpreter while
running a program (e.g., when a breakpoint is encountered or
following a step operation), the Interpreter automatically displays the
source line associated with the current execution location. This is
equivalent to issuing the following LIST command:
.LIST PC
Examining the
Call Stack
The call stack represents the chain of subprogram calls starting from
the initial entry point down to the currently executing subprogram.
For example, if procedure A calls procedure B calls procedure C and a
statement in procedure C is currently executing, the current call chain
would appear as shown below:
A>B>C
Each subprogram call is represented by a frame on the call stack. A
frame contains information about the corresponding subprogram
callits name, actual parameter values, local variable values, and the
next statement to be executed.
5 10
For example, select the breakpoint entry in the Navigator and then
choose Delete. After accepting the confirmation alert, the following
command and messages are echoed in the Interpreter pane:
PL/SQL> .DELETE ACTION 2
Removing debug action 2...
PL/SQL>
The current execution location specifies the next PL/SQL source line to
be executed. It corresponds to what is commonly referred to as the
program counter, or PC. When control passes to the Interpreter while
running a program (e.g., when a breakpoint is encountered or
following a step operation), the Interpreter automatically displays the
source line associated with the current execution location. This is
equivalent to issuing the following LIST command:
.LIST PC
Examining the
Call Stack
The call stack represents the chain of subprogram calls starting from
the initial entry point down to the currently executing subprogram.
For example, if procedure A calls procedure B calls procedure C and a
statement in procedure C is currently executing, the current call chain
would appear as shown below:
A>B>C
Each subprogram call is represented by a frame on the call stack. A
frame contains information about the corresponding subprogram
callits name, actual parameter values, local variable values, and the
next statement to be executed.
5 10
Performing the latter action echoes the command .SET SCOPE FRAME 2
in the Interpreter (discussed later in this chapter), and displays the call
stack in the Interpreter pane.
The call stack shows that the anonymous block PU_00x, containing the
call to main, is at the top of the stack, while the subprogram containing
the current execution location (bonuses) is at the bottom.
Note: Having hit the breakpoint, the Interpreter command
prompt changes from PL/SQL> to (debug 1)PL/SQL>. For more
information, see Using Debug Levels on page 5 15.
5 11
Performing the latter action echoes the command .SET SCOPE FRAME 2
in the Interpreter (discussed later in this chapter), and displays the call
stack in the Interpreter pane.
The call stack shows that the anonymous block PU_00x, containing the
call to main, is at the top of the stack, while the subprogram containing
the current execution location (bonuses) is at the bottom.
Note: Having hit the breakpoint, the Interpreter command
prompt changes from PL/SQL> to (debug 1)PL/SQL>. For more
information, see Using Debug Levels on page 5 15.
5 11
You can display the program unit source associated with the current
scope location using the LIST command. For example, the following
command displays the current scope location and sets the current
source location:
.LIST SCOPE
Examining and
Modifying Locals
Object Navigator
Object Navigator
DESCRIBE command
DEBUG.GET x functions
DEBUG.SET x procedures
SHOW command
The Object Navigator allows you to view and optionally change the
values of local variables and parameters associated with the current
scope location. You can display local variables and parameters by
expanding the nodes under the Stack heading node.
For example, now that youve hit the conditional breakpoint, expand
the Stack heading node to display the local variables in bonuses (see
below).
5 12
You can display the program unit source associated with the current
scope location using the LIST command. For example, the following
command displays the current scope location and sets the current
source location:
.LIST SCOPE
Examining and
Modifying Locals
Object Navigator
Object Navigator
DESCRIBE command
DEBUG.GET x functions
DEBUG.SET x procedures
SHOW command
The Object Navigator allows you to view and optionally change the
values of local variables and parameters associated with the current
scope location. You can display local variables and parameters by
expanding the nodes under the Stack heading node.
For example, now that youve hit the conditional breakpoint, expand
the Stack heading node to display the local variables in bonuses (see
below).
5 12
DESCRIBE
DEBUG.GET x Functions
The GETx functions in the DEBUG package enable you to retrieve the
value of a variable or parameter that is local to the subprogram at the
current scope location. These functions are intended for use primarily
within debug triggers.
For more information and examples using the GETx functions in the
DEBUG package, see DEBUG.GETx on page 8 23.
Note: If you wish to see the value of a local, it is more
convenient to use SHOW, DESCRIBE, or the Object Navigator.
DEBUG.SET x Procedures
The SETx procedures in the DEBUG package enable you to set the
value of a variable or parameter that is local to the subprogram at the
current scope location. These procedures are intended for use
primarily within debug triggers.
5 13
DESCRIBE
DEBUG.GET x Functions
The GETx functions in the DEBUG package enable you to retrieve the
value of a variable or parameter that is local to the subprogram at the
current scope location. These functions are intended for use primarily
within debug triggers.
For more information and examples using the GETx functions in the
DEBUG package, see DEBUG.GETx on page 8 23.
Note: If you wish to see the value of a local, it is more
convenient to use SHOW, DESCRIBE, or the Object Navigator.
DEBUG.SET x Procedures
The SETx procedures in the DEBUG package enable you to set the
value of a variable or parameter that is local to the subprogram at the
current scope location. These procedures are intended for use
primarily within debug triggers.
5 13
For more information and examples using the SETx procedures in the
DEBUG package, see DEBUG.SETx on page 8 25.
SET SCOPE
The SET SCOPE command enables you to change the current scope
location to a specified frame of the call stack. You can specify relative
motion from the current stack frame to any other frame, or move to a
particular subprogram on the call stack. There are several ways to
invoke SET SCOPE:
For example, select the entry [1] MAIN (Procedure Body) Line 5
under the Stack node in the Navigator, changing the scope location to
the frame associated with procedure main:
(debug 1)PL/SQL> .SET SCOPE FRAME 1
Notice that the Source pane now displays the source for main, with the
arrow (=>) indicating that line 5 is the current scope location.
For more information, see the following sections:
SET (Scope) 7 60
You can use SHOW to list the name, type, and value of all locals
(variables and parameters) at the current scope location.
SHOW
For example, now that youve changed the scope location to the frame
associated with main, enter the following command to see if it has any
local variables or parameters. As expected, empname is listed as the
only local variable in the current scope:
(debug 1)PL/SQL> .show locals
Local parameters and variables:
EMPNAME = JONES
Controlling Program
Unit Execution
5 14
Once you have inspected and/or modified the program state, you can
resume or terminate execution using the following features:
STEP command
GO command
RESET command
For more information and examples using the SETx procedures in the
DEBUG package, see DEBUG.SETx on page 8 25.
SET SCOPE
The SET SCOPE command enables you to change the current scope
location to a specified frame of the call stack. You can specify relative
motion from the current stack frame to any other frame, or move to a
particular subprogram on the call stack. There are several ways to
invoke SET SCOPE:
For example, select the entry [1] MAIN (Procedure Body) Line 5
under the Stack node in the Navigator, changing the scope location to
the frame associated with procedure main:
(debug 1)PL/SQL> .SET SCOPE FRAME 1
Notice that the Source pane now displays the source for main, with the
arrow (=>) indicating that line 5 is the current scope location.
For more information, see the following sections:
SET (Scope) 7 60
You can use SHOW to list the name, type, and value of all locals
(variables and parameters) at the current scope location.
SHOW
For example, now that youve changed the scope location to the frame
associated with main, enter the following command to see if it has any
local variables or parameters. As expected, empname is listed as the
only local variable in the current scope:
(debug 1)PL/SQL> .show locals
Local parameters and variables:
EMPNAME = JONES
Controlling Program
Unit Execution
5 14
Once you have inspected and/or modified the program state, you can
resume or terminate execution using the following features:
STEP command
GO command
RESET command
STEP
You can invoke the STEP command either by choosing the Step Into,
Step Over, or Step Out button, choosing Debug>Step from the menu,
or by entering it on the Interpreter command line.
Choosing Debug>Step from the menu displays the PL/SQL Step
dialog. You can use this dialog to specify an argument to the STEP
command by selecting one of the radio buttons in the Mode field.
Possible choices are Into, Over, Out, and To.
For example, choose the Step Into button now to resume execution of
bonuses, displaying the following in the Interpreter pane:
5 15
STEP
You can invoke the STEP command either by choosing the Step Into,
Step Over, or Step Out button, choosing Debug>Step from the menu,
or by entering it on the Interpreter command line.
Choosing Debug>Step from the menu displays the PL/SQL Step
dialog. You can use this dialog to specify an argument to the STEP
command by selecting one of the radio buttons in the Mode field.
Possible choices are Into, Over, Out, and To.
For example, choose the Step Into button now to resume execution of
bonuses, displaying the following in the Interpreter pane:
5 15
5 16
5 16
CHAPTER
Calling Functions in
Dynamic Libraries
T
61
CHAPTER
Calling Functions in
Dynamic Libraries
T
61
datatypes
constants
62
datatypes
constants
62
Before you can invoke a function that is in a dynamic library, you must
first load the library into your application. Use the
ORA_FFI.LOAD_LIBRARY function to do this.
For example, the following statement loads the library mylib.dll, which
is found in the directory C:\utils\libs:
lib_handle := ORA_FFI.LOAD_LIBRARY(C:\utils\libs\,
mylib.dll);
Registering the Foreign Once you have loaded a library, you must register each of the librarys
functions that you plan to invoke. This tells your application in which
Function
library it can find the called function, and which calling standard (C or
Pascal) the function uses. Use the ORA_FFI.REGISTER_FUNCTION
function to provide this information.
For example, the following statement registers the foreign function
myfunc, which is defined in the library specified by lib_handle:
ff_handle := ORA_FFI.REGISTER_FUNCTION(lib_handle,
myfunc);
Registering Parameters If the foreign function accepts arguments, you must register them with
your application. This tells your application how to map each
arguments PL/SQL datatype to a C datatype. Use the
ORA_FFI.REGISTER_PARAMETER procedure to provide this
information.
The order in which you register the arguments must match the order in
which they are listed in the C function definition.
For example, consider the following C function definition:
void show_error(int errnum, char *errmsg)
63
Before you can invoke a function that is in a dynamic library, you must
first load the library into your application. Use the
ORA_FFI.LOAD_LIBRARY function to do this.
For example, the following statement loads the library mylib.dll, which
is found in the directory C:\utils\libs:
lib_handle := ORA_FFI.LOAD_LIBRARY(C:\utils\libs\,
mylib.dll);
Registering the Foreign Once you have loaded a library, you must register each of the librarys
functions that you plan to invoke. This tells your application in which
Function
library it can find the called function, and which calling standard (C or
Pascal) the function uses. Use the ORA_FFI.REGISTER_FUNCTION
function to provide this information.
For example, the following statement registers the foreign function
myfunc, which is defined in the library specified by lib_handle:
ff_handle := ORA_FFI.REGISTER_FUNCTION(lib_handle,
myfunc);
Registering Parameters If the foreign function accepts arguments, you must register them with
your application. This tells your application how to map each
arguments PL/SQL datatype to a C datatype. Use the
ORA_FFI.REGISTER_PARAMETER procedure to provide this
information.
The order in which you register the arguments must match the order in
which they are listed in the C function definition.
For example, consider the following C function definition:
void show_error(int errnum, char *errmsg)
63
Registering a Return
Value
If the return type of the foreign function is anything other than the C
type void, you must register the return type with your application. Use
the ORA_FFI.REGISTER_RETURN procedure to provide this
information.
For example, consider the following C function definition:
int to_power(int x, float y)
Associating a
Subprogram with a
Foreign Function
64
ORA_FFI.FIND_FUNCTION
ORA_FFI.REGISTER_FUNCTION
Registering a Return
Value
If the return type of the foreign function is anything other than the C
type void, you must register the return type with your application. Use
the ORA_FFI.REGISTER_RETURN procedure to provide this
information.
For example, consider the following C function definition:
int to_power(int x, float y)
Associating a
Subprogram with a
Foreign Function
64
ORA_FFI.FIND_FUNCTION
ORA_FFI.REGISTER_FUNCTION
Mimicking the Foreign Because the subprogram you define has a direct correspondence to a
foreign function, it must mimic the definition of that function. For
Function Definition
example, consider the following definition of a C function in a dynamic
library:
float tax(float amt, float rate)
This C function does not return a value, so you should associate it with
a PL/SQL procedure that accepts one VARCHAR2 parameter:
PROCEDURE ffi_show_message(ff_handle ORA_FFI.FUNCHANDLETYPE,
msg IN OUT VARCHAR2);
PRAGMA interface(C, ffi_show_message, 11265);
Remember that the handle to the foreign function must be the first
parameter that you pass to the subprogram.
Converting C Types to
PL/SQL
65
Mimicking the Foreign Because the subprogram you define has a direct correspondence to a
foreign function, it must mimic the definition of that function. For
Function Definition
example, consider the following definition of a C function in a dynamic
library:
float tax(float amt, float rate)
This C function does not return a value, so you should associate it with
a PL/SQL procedure that accepts one VARCHAR2 parameter:
PROCEDURE ffi_show_message(ff_handle ORA_FFI.FUNCHANDLETYPE,
msg IN OUT VARCHAR2);
PRAGMA interface(C, ffi_show_message, 11265);
Remember that the handle to the foreign function must be the first
parameter that you pass to the subprogram.
Converting C Types to
PL/SQL
65
Examples
C Datatype
PL/SQL Parameter
char
IN VARCHAR2
VARCHAR2
char *
IN OUT VARCHAR2
VARCHAR2
double
IN NUMBER
NUMBER
double *
IN OUT NUMBER
NUMBER
float
IN NUMBER
NUMBER
float *
IN OUT NUMBER
NUMBER
int
IN PLS_INTEGER
PLS_INTEGER
int *
IN OUT PLS_INTEGER
PLS_INTEGER
long int
IN PLS_INTEGER
PLS_INTEGER
long int *
IN OUT PLS_INTEGER
PLS_INTEGER
short
IN PLS_INTEGER
PLS_INTEGER
short *
IN OUT PLS_INTEGER
PLS_INTEGER
void *
IN OUT
ORA_FFI.POINTERTYPE
ORA_FFI.POINTERTYPE
Example 1
66
Examples
C Datatype
PL/SQL Parameter
char
IN VARCHAR2
VARCHAR2
char *
IN OUT VARCHAR2
VARCHAR2
double
IN NUMBER
NUMBER
double *
IN OUT NUMBER
NUMBER
float
IN NUMBER
NUMBER
float *
IN OUT NUMBER
NUMBER
int
IN PLS_INTEGER
PLS_INTEGER
int *
IN OUT PLS_INTEGER
PLS_INTEGER
long int
IN PLS_INTEGER
PLS_INTEGER
long int *
IN OUT PLS_INTEGER
PLS_INTEGER
short
IN PLS_INTEGER
PLS_INTEGER
short *
IN OUT PLS_INTEGER
PLS_INTEGER
void *
IN OUT
ORA_FFI.POINTERTYPE
ORA_FFI.POINTERTYPE
Example 1
66
*/
*/
*/
*/
*/
67
*/
*/
*/
*/
*/
67
To invoke the foreign function, you simply call the PL/SQL function
defined in the package specification:
x := mathlib.to_power(2, 4);
Example 2
68
To invoke the foreign function, you simply call the PL/SQL function
defined in the package specification:
x := mathlib.to_power(2, 4);
Example 2
68
69
69
To invoke the foreign functions, you would call the PL/SQL procedures
defined in the package specification, as in the following example:
PROCEDURE display_image(keywrd IN OUT VARCHAR2) IS
img_ptr ORA_FFI.POINTERTYPE;
BEGIN
img_ptr := imglib.get_image(keywrd);
imglib.show_image(img_ptr, 2);
END;
/* procedure display_image */
6 10
To invoke the foreign functions, you would call the PL/SQL procedures
defined in the package specification, as in the following example:
PROCEDURE display_image(keywrd IN OUT VARCHAR2) IS
img_ptr ORA_FFI.POINTERTYPE;
BEGIN
img_ptr := imglib.get_image(keywrd);
imglib.show_image(img_ptr, 2);
END;
/* procedure display_image */
6 10
PART
II
Oracle Procedure
Builder Reference
T
Command Reference
Error Messages
PART
II
Oracle Procedure
Builder Reference
T
Command Reference
Error Messages
CHAPTER
Command Reference
T
Syntax
Keywords and
Parameters
Usage Notes
Examples
Command Reference
71
CHAPTER
Command Reference
T
Syntax
Keywords and
Parameters
Usage Notes
Examples
Command Reference
71
Multi-valued
Arguments
For example, the LOAD command has the following partial syntax:
LOAD FILE name[, name...]
72
Multi-valued
Arguments
For example, the LOAD command has the following partial syntax:
LOAD FILE name[, name...]
72
Position Independence Unless explicitly specified in the syntax descriptions, options may
appear in any order. For example, the command:
.DESCRIBE PROCEDURE proc1 BODY
Multi-line Commands
Argument Quoting
Abbreviating Options
Command Reference
73
Position Independence Unless explicitly specified in the syntax descriptions, options may
appear in any order. For example, the command:
.DESCRIBE PROCEDURE proc1 BODY
Multi-line Commands
Argument Quoting
Abbreviating Options
Command Reference
73
Entering PL/SQL Code In addition to commands, the Interpreter accepts and evaluates PL/SQL
constructs (e.g., statements, blocks, procedure definitions, etc.). Oracle
Procedure Builder interprets a line beginning with anything other than a
valid command name as the beginning of a PL/SQL statement, block, or
program unit.
While commands occupy a single line (unless the continuation character
is used), PL/SQL may occupy any number of lines, and continuation
characters are neither necessary nor allowed.
If necessary, a PL/SQL construct can always be distinguished from a
command by enclosing it in the block delimiters BEGIN and END.
Notational
Conventions
The following two tables describe the notation and conventions for
command syntax used in this chapter.
Feature
Example
Explanation
uppercase
BREAK
A command or keyword
name; it need not be in
uppercase.
lowercase italics
numbers
vertical bar
braces
{STACK | SCOPE}
brackets
[BEFORE|AFTER]
underline
[BEFORE|AFTER]
74
Entering PL/SQL Code In addition to commands, the Interpreter accepts and evaluates PL/SQL
constructs (e.g., statements, blocks, procedure definitions, etc.). Oracle
Procedure Builder interprets a line beginning with anything other than a
valid command name as the beginning of a PL/SQL statement, block, or
program unit.
While commands occupy a single line (unless the continuation character
is used), PL/SQL may occupy any number of lines, and continuation
characters are neither necessary nor allowed.
If necessary, a PL/SQL construct can always be distinguished from a
command by enclosing it in the block delimiters BEGIN and END.
Notational
Conventions
The following two tables describe the notation and conventions for
command syntax used in this chapter.
Feature
Example
Explanation
uppercase
BREAK
A command or keyword
name; it need not be in
uppercase.
lowercase italics
numbers
vertical bar
braces
{STACK | SCOPE}
brackets
[BEFORE|AFTER]
underline
[BEFORE|AFTER]
74
ATTACH
Purpose
Syntax
Keywords and
Parameters
[directory]lib
name[extension]
FILESYSTEM and DB
BEFORE attachedlib
AFTER attachedlib
Usage Notes
If you attempt to attach a library in the file system, the load path and the
extension pll are used when resolving libname, unless directory and
extension are specified explicitly. Note that the syntax of directory is
operating system-specific. For more information about syntax, see the
Oracle product documentation for your operating system.
Libraries are attached read-only. If you want to modify the contents of a
library, use the OPEN command to open the library for editing. For
more information, see OPEN on page 7 53.
Examples
The following command attaches to the library residing in the file lib1:
.ATTACH LIB lib1 FILE
Command Reference
75
ATTACH
Purpose
Syntax
Keywords and
Parameters
[directory]lib
name[extension]
FILESYSTEM and DB
BEFORE attachedlib
AFTER attachedlib
Usage Notes
If you attempt to attach a library in the file system, the load path and the
extension pll are used when resolving libname, unless directory and
extension are specified explicitly. Note that the syntax of directory is
operating system-specific. For more information about syntax, see the
Oracle product documentation for your operating system.
Libraries are attached read-only. If you want to modify the contents of a
library, use the OPEN command to open the library for editing. For
more information, see OPEN on page 7 53.
Examples
The following command attaches to the library residing in the file lib1:
.ATTACH LIB lib1 FILE
Command Reference
75
BREAK
Purpose
Syntax
Keywords and
Parameters
progunit
PROGRAMUNIT name
PACKAGE name
SUBPROGRAM name
PROCEDURE name
FUNCTION name
actionlocation
ACTION number
BREAKPOINT number
specifies a breakpoint.
current
location
PC
SCOPE
LINE number
ENABLED and
DISABLED
TRIGGER
plsqlblock
76
BREAK
Purpose
Syntax
Keywords and
Parameters
progunit
PROGRAMUNIT name
PACKAGE name
SUBPROGRAM name
PROCEDURE name
FUNCTION name
actionlocation
ACTION number
BREAKPOINT number
specifies a breakpoint.
current
location
PC
SCOPE
LINE number
ENABLED and
DISABLED
TRIGGER
plsqlblock
76
Usage Notes
Trigger blocks may span multiple input lines. As is the case when
entering PL/SQL constructs elsewhere in the Interpreter, no line
continuation characters are required when entering the trigger body
(nor are they allowed).
If you wish to interrupt your program conditionally, you should use the
TRIGGER command in conjunction with the DEBUG.BREAK exception.
For more information, see TRIGGER on page 7 70.
If the statement is reached while running PL/SQL, Oracle Procedure
Builder suspends execution just before the statement is executed, and
passes control to the Interpreter. At this point, you can inspect and even
modify program state using a variety of Oracle Procedure Builder
functions.
Once satisfied, you can resume execution with the GO or STEP
commands. Alternatively, you can abort execution using the RESET
command. For more information, see the following sections:
Examples
GO 7 39
STEP 7 67
RESET 7 56
Command Reference
77
Usage Notes
Trigger blocks may span multiple input lines. As is the case when
entering PL/SQL constructs elsewhere in the Interpreter, no line
continuation characters are required when entering the trigger body
(nor are they allowed).
If you wish to interrupt your program conditionally, you should use the
TRIGGER command in conjunction with the DEBUG.BREAK exception.
For more information, see TRIGGER on page 7 70.
If the statement is reached while running PL/SQL, Oracle Procedure
Builder suspends execution just before the statement is executed, and
passes control to the Interpreter. At this point, you can inspect and even
modify program state using a variety of Oracle Procedure Builder
functions.
Once satisfied, you can resume execution with the GO or STEP
commands. Alternatively, you can abort execution using the RESET
command. For more information, see the following sections:
Examples
GO 7 39
STEP 7 67
RESET 7 56
Command Reference
77
CLOSE
Purpose
Removes one or more libraries from the current set of open libraries.
Syntax
Keywords and
Parameters
LIBRARY name
[, name...]
DISCARD
Closing a library removes all program units loaded from that library
into the environment. The namespace used to represent the library is
also removed.
Usage Notes
78
CLOSE
Purpose
Removes one or more libraries from the current set of open libraries.
Syntax
Keywords and
Parameters
LIBRARY name
[, name...]
DISCARD
Closing a library removes all program units loaded from that library
into the environment. The namespace used to represent the library is
also removed.
Usage Notes
78
COMPILE (Libraries)
Purpose
Syntax
Keywords and
Parameters
LIBRARY name
[, name...]
INCREMENTAL
When invoked, COMPILE first checks for any currently loaded program
unit(s) that match the name and type of the program unit(s) in the
library to be compiled. If there is at least one match, you are asked if
you wish to continue compilation.
Usage Notes
Answering Yes removes all of the matching program units from the
environment, compiles them, and re-stores them in the specified open
library. Answering No aborts the operation.
Note: The compiled program unit(s) are re-stored in the open
library, but are not re-loaded into the environment. You can
invoke the LOAD command (via the Interpreter command line
or File>Load) to re-load them into the environment.
If INCREMENTAL is not specified, all program units in the library are
force compiled.
Examples
The following command compiles all of the program units in the open
library named lib1:
.COMPILE LIB lib1
Command Reference
79
COMPILE (Libraries)
Purpose
Syntax
Keywords and
Parameters
LIBRARY name
[, name...]
INCREMENTAL
When invoked, COMPILE first checks for any currently loaded program
unit(s) that match the name and type of the program unit(s) in the
library to be compiled. If there is at least one match, you are asked if
you wish to continue compilation.
Usage Notes
Answering Yes removes all of the matching program units from the
environment, compiles them, and re-stores them in the specified open
library. Answering No aborts the operation.
Note: The compiled program unit(s) are re-stored in the open
library, but are not re-loaded into the environment. You can
invoke the LOAD command (via the Interpreter command line
or File>Load) to re-load them into the environment.
If INCREMENTAL is not specified, all program units in the library are
force compiled.
Examples
The following command compiles all of the program units in the open
library named lib1:
.COMPILE LIB lib1
Command Reference
79
Syntax
Keywords and
Parameters
progunit
PROGRAMUNIT name
[, name...]
PACKAGE name
[, name...]
SUBPROGRAM name
[, name...]
PROCEDURE name
[, name...]
FUNCTION name
[, name...]
SPECIFICATION
and BODY
Usage Notes
Examples
7 10
Syntax
Keywords and
Parameters
progunit
PROGRAMUNIT name
[, name...]
PACKAGE name
[, name...]
SUBPROGRAM name
[, name...]
PROCEDURE name
[, name...]
FUNCTION name
[, name...]
SPECIFICATION
and BODY
Usage Notes
Examples
7 10
Syntax
Keywords and
Parameters
See Also
Examples
{connect_
string}
[username/password@]
[network_device:]
[database_node:]
[database_name]
[SILENT]
DISCONNECT
The following command would connect you to the remote inventory
database on the boston network node using the TCP/IP device driver.
.CONNECT DB scott/tiger@t:boston:inventory
Command Reference
7 11
Syntax
Keywords and
Parameters
See Also
Examples
{connect_
string}
[username/password@]
[network_device:]
[database_node:]
[database_name]
[SILENT]
DISCONNECT
The following command would connect you to the remote inventory
database on the boston network node using the TCP/IP device driver.
.CONNECT DB scott/tiger@t:boston:inventory
Command Reference
7 11
Syntax
CREATE {bindvariable}
Keywords and
Parameters
bindvariable
NUMBER var_name
[PRECISION number]
[SCALE number]
DATE var_name
CHAR var_name
[LENGTH number]
Usage Notes
7 12
Syntax
CREATE {bindvariable}
Keywords and
Parameters
bindvariable
NUMBER var_name
[PRECISION number]
[SCALE number]
DATE var_name
CHAR var_name
[LENGTH number]
Usage Notes
7 12
CREATE (Libraries)
Purpose
Creates a new library that can be stored in either the file system or the
current database.
Syntax
Keywords and
Parameters
LIBRARY
[directory]lib
name[extension]
SOURCE pldfile
NOCOMPILE
FILESYSTEM and
DB
BEFORE and AFTER dictate whether the attached library is placed at the
Usage Notes
For libraries created in the file system, the name of the library is
designated by the basename of the file (the full filename minus any
leading directory and any trailing extension). For example, in UNIX, the
file /private/libs/emplib.pll holds the library named emplib.
The syntax of directory is operating system-specific. For more
information about syntax, see the Oracle product documentation for
your operating system.
The newly created library is automatically opened. Once a library has
been opened, you can modify its contents using the INSERT and
DELETE commands.
Command Reference
7 13
CREATE (Libraries)
Purpose
Creates a new library that can be stored in either the file system or the
current database.
Syntax
Keywords and
Parameters
LIBRARY
[directory]lib
name[extension]
SOURCE pldfile
NOCOMPILE
FILESYSTEM and
DB
BEFORE and AFTER dictate whether the attached library is placed at the
Usage Notes
For libraries created in the file system, the name of the library is
designated by the basename of the file (the full filename minus any
leading directory and any trailing extension). For example, in UNIX, the
file /private/libs/emplib.pll holds the library named emplib.
The syntax of directory is operating system-specific. For more
information about syntax, see the Oracle product documentation for
your operating system.
The newly created library is automatically opened. Once a library has
been opened, you can modify its contents using the INSERT and
DELETE commands.
Command Reference
7 13
Using the SOURCE option, you can immediately populate the newly
created library with the source of one or more program units contained
in the specified pldfile. The library is then compiled (using the COMPILE
LIBRARY command) unless you specify the NOCOMPILE option.
If you try to create a library with the same name as an existing library,
an alert appears, asking if you want to overwrite the existing library.
Specifying NOCONFIRM in the command string suppresses the alert.
Examples
7 14
Using the SOURCE option, you can immediately populate the newly
created library with the source of one or more program units contained
in the specified pldfile. The library is then compiled (using the COMPILE
LIBRARY command) unless you specify the NOCOMPILE option.
If you try to create a library with the same name as an existing library,
an alert appears, asking if you want to overwrite the existing library.
Specifying NOCONFIRM in the command string suppresses the alert.
Examples
7 14
Syntax
DELETE {bindvariable}
Keywords and
Parameters
bindvariable
See Also
Examples
BINDVAR name
[, name...]
NUMBER name
[, name...]
DATE name
[, name...]
CHAR name
[, name...]
Command Reference
7 15
Syntax
DELETE {bindvariable}
Keywords and
Parameters
bindvariable
See Also
Examples
BINDVAR name
[, name...]
NUMBER name
[, name...]
DATE name
[, name...]
CHAR name
[, name...]
Command Reference
7 15
Syntax
DELETE {debugaction}
Keywords and
Parameters
debugaction
ACTION number
[, number...]
BREAKPOINT number
[, number...]
specifies a breakpoint.
TRIGGER number
[, number...]
specifies a trigger.
Usage Notes
7 16
Syntax
DELETE {debugaction}
Keywords and
Parameters
debugaction
ACTION number
[, number...]
BREAKPOINT number
[, number...]
specifies a breakpoint.
TRIGGER number
[, number...]
specifies a trigger.
Usage Notes
7 16
DELETE (Libraries)
Purpose
Syntax
Keywords and
Parameters
LIBRARY name
[, name...]
specifies a library.
You cannot delete a library that is currently attached. Use the DETACH
command to detach a library before you delete it. For more information,
see DETACH on page 7 28.
Usage Notes
Examples
Command Reference
7 17
DELETE (Libraries)
Purpose
Syntax
Keywords and
Parameters
LIBRARY name
[, name...]
specifies a library.
You cannot delete a library that is currently attached. Use the DETACH
command to detach a library before you delete it. For more information,
see DETACH on page 7 28.
Usage Notes
Examples
Command Reference
7 17
Syntax
Keywords and
Parameters
progunit
Examples
PROGRAMUNIT name
[, name...]
PACKAGE name
[, name...]
SUBPROGRAM name
[, name...]
PROCEDURE name
[, name...]
FUNCTION name
[, name...]
LIBRARY name
SPECIFICATION
and BODY
The following command deletes the package named p2 from the library
named lib1:
.DELETE PACKAGE p2 LIBRARY lib1
7 18
Syntax
Keywords and
Parameters
progunit
Examples
PROGRAMUNIT name
[, name...]
PACKAGE name
[, name...]
SUBPROGRAM name
[, name...]
PROCEDURE name
[, name...]
FUNCTION name
[, name...]
LIBRARY name
SPECIFICATION
and BODY
The following command deletes the package named p2 from the library
named lib1:
.DELETE PACKAGE p2 LIBRARY lib1
7 18
Syntax
DELETE {LOADPATH}
Keywords and
Parameters
LOADPATH
Command Reference
7 19
Syntax
DELETE {LOADPATH}
Keywords and
Parameters
LOADPATH
Command Reference
7 19
Syntax
Keywords and
Parameters
progunit
PROGRAMUNIT
name[, name...]
PACKAGE name
[, name...]
SUBPROGRAM
name[, name...]
PROCEDURE
name[, name...]
FUNCTION name
[, name...]
SPECIFICATION
and BODY
Once deleted from the current development session, a program unit and
any of its subobjects (types, variables, subprograms, etc.) are no longer
defined within the development session. Deleting a program unit from
the current development session can cause the invalidation of other
program units that depend upon it. This is analogous to what happens
when the specification of a program unit is changed.
Usage Notes
The following command deletes the package named p2 from the current
development session:
.DELETE PACKAGE p2
7 20
Syntax
Keywords and
Parameters
progunit
PROGRAMUNIT
name[, name...]
PACKAGE name
[, name...]
SUBPROGRAM
name[, name...]
PROCEDURE
name[, name...]
FUNCTION name
[, name...]
SPECIFICATION
and BODY
Once deleted from the current development session, a program unit and
any of its subobjects (types, variables, subprograms, etc.) are no longer
defined within the development session. Deleting a program unit from
the current development session can cause the invalidation of other
program units that depend upon it. This is analogous to what happens
when the specification of a program unit is changed.
Usage Notes
The following command deletes the package named p2 from the current
development session:
.DELETE PACKAGE p2
7 20
Syntax
DESCRIBE {debugaction}
Keywords and
Parameters
debugaction
ACTION number
BREAKPOINT number
specifies a breakpoint.
TRIGGER number
specifies a trigger.
The information displayed for a debug action includes its ID, the source
location with which it is associated, and whether or not it is enabled.
Usage Notes
Examples
Command Reference
7 21
Syntax
DESCRIBE {debugaction}
Keywords and
Parameters
debugaction
ACTION number
BREAKPOINT number
specifies a breakpoint.
TRIGGER number
specifies a trigger.
The information displayed for a debug action includes its ID, the source
location with which it is associated, and whether or not it is enabled.
Usage Notes
Examples
Command Reference
7 21
DESCRIBE (Libraries)
Purpose
Syntax
Keywords and
Parameters
LIBRARY name
Usage Notes
Examples
7 22
DESCRIBE (Libraries)
Purpose
Syntax
Keywords and
Parameters
LIBRARY name
Usage Notes
Examples
7 22
Syntax
DESCRIBE {LOADPATH}
Keywords and
Parameters
LOADPATH
Command Reference
7 23
Syntax
DESCRIBE {LOADPATH}
Keywords and
Parameters
LOADPATH
Command Reference
7 23
DESCRIBE (Locals)
Purpose
Syntax
DESCRIBE {local}
Keywords and
Parameters
local
Examples
LOCAL name
PARAMETER name
VARIABLE name
7 24
DESCRIBE (Locals)
Purpose
Syntax
DESCRIBE {local}
Keywords and
Parameters
local
Examples
LOCAL name
PARAMETER name
VARIABLE name
7 24
Syntax
Keywords and
Parameters
progunit
PROGRAMUNIT name
PACKAGE name
specifies a package.
SUBPROGRAM name
specifies a subprogram.
PROCEDURE name
specifies a procedure.
FUNCTION name
specifies a function.
SPECIFICATION
and BODY
The information displayed includes the program unit name, its type, its
parameters (if any), its external location, whether it is compiled, whether
it is open for editing, and cross reference information. In addition,
describing a package also indicates whether the package is a built-in
program unit, and whether it is an extension to the STANDARD
package.
Usage Notes
Command Reference
7 25
Syntax
Keywords and
Parameters
progunit
PROGRAMUNIT name
PACKAGE name
specifies a package.
SUBPROGRAM name
specifies a subprogram.
PROCEDURE name
specifies a procedure.
FUNCTION name
specifies a function.
SPECIFICATION
and BODY
The information displayed includes the program unit name, its type, its
parameters (if any), its external location, whether it is compiled, whether
it is open for editing, and cross reference information. In addition,
describing a package also indicates whether the package is a built-in
program unit, and whether it is an extension to the STANDARD
package.
Usage Notes
Command Reference
7 25
DESCRIBE (Version)
Purpose
Syntax
DESCRIBE {VERSION}
Keywords and
Parameters
VERSION
7 26
DESCRIBE (Version)
Purpose
Syntax
DESCRIBE {VERSION}
Keywords and
Parameters
VERSION
7 26
Syntax
Keywords and
Parameters
TABLE name
VIEW name
The information displayed for tables and views includes the columns
and their types.
Usage Notes
Examples
Command Reference
7 27
Syntax
Keywords and
Parameters
TABLE name
VIEW name
The information displayed for tables and views includes the columns
and their types.
Usage Notes
Examples
Command Reference
7 27
DETACH
Purpose
Removes one or more libraries from the current set of attached libraries.
Syntax
Keywords and
Parameters
LIBRARY name
[, name...]
Usage Notes
Examples
7 28
DETACH
Purpose
Removes one or more libraries from the current set of attached libraries.
Syntax
Keywords and
Parameters
LIBRARY name
[, name...]
Usage Notes
Examples
7 28
Syntax
DISABLE {debugaction}
Keywords and
Parameters
debugaction
ACTION number
[, number...]
BREAKPOINT number
[, number...]
TRIGGER number
[, number...]
DISABLE has no effect on debug actions that are already disabled. You
can restore disabled debug actions using the ENABLE command. For
more information, see ENABLE (Debug Actions) on page 7 33.
Usage Notes
Examples
Command Reference
7 29
Syntax
DISABLE {debugaction}
Keywords and
Parameters
debugaction
ACTION number
[, number...]
BREAKPOINT number
[, number...]
TRIGGER number
[, number...]
DISABLE has no effect on debug actions that are already disabled. You
can restore disabled debug actions using the ENABLE command. For
more information, see ENABLE (Debug Actions) on page 7 33.
Usage Notes
Examples
Command Reference
7 29
Syntax
DISABLE {compileoption}
Keywords and
Parameters
compileoption
COMPILER SIZECHECK
Usage Notes
7 30
Syntax
DISABLE {compileoption}
Keywords and
Parameters
compileoption
COMPILER SIZECHECK
Usage Notes
7 30
DISABLE (Logging)
Purpose
Syntax
DISABLE {LOGGING}
Keywords and
Parameters
LOGGING
Usage Notes
disables logging.
DISABLE has no effect on logging if no log file has been specified (via
the LOG command) or if logging is already disabled. For more
information, see LOG on page 7 52.
You can restore disabled logging using the ENABLE command. For
more information, see ENABLE (Logging) on page 7 35.
Command Reference
7 31
DISABLE (Logging)
Purpose
Syntax
DISABLE {LOGGING}
Keywords and
Parameters
LOGGING
Usage Notes
disables logging.
DISABLE has no effect on logging if no log file has been specified (via
the LOG command) or if logging is already disabled. For more
information, see LOG on page 7 52.
You can restore disabled logging using the ENABLE command. For
more information, see ENABLE (Logging) on page 7 35.
Command Reference
7 31
Disconnects you from the database you are currently connected to. This
command is valid only in standalone sessions of Oracle Procedure
Builder.
Syntax
DISCONNECT
See Also
7 32
CONNECT
Disconnects you from the database you are currently connected to. This
command is valid only in standalone sessions of Oracle Procedure
Builder.
Syntax
DISCONNECT
See Also
7 32
CONNECT
Syntax
ENABLE {debugaction}
Keywords and
Parameters
debugaction
ACTION number
[, number...]
BREAKPOINT number
[, number...]
specifies a breakpoint.
TRIGGER number
[, number...]
specifies a trigger.
Usage Notes
Examples
Command Reference
7 33
Syntax
ENABLE {debugaction}
Keywords and
Parameters
debugaction
ACTION number
[, number...]
BREAKPOINT number
[, number...]
specifies a breakpoint.
TRIGGER number
[, number...]
specifies a trigger.
Usage Notes
Examples
Command Reference
7 33
Syntax
ENABLE {compileoption}
Keywords and
Parameters
compileoption
COMPILER SIZECHECK
Usage Notes
7 34
Syntax
ENABLE {compileoption}
Keywords and
Parameters
compileoption
COMPILER SIZECHECK
Usage Notes
7 34
ENABLE (Logging)
Purpose
Syntax
ENABLE {LOGGING}
Keywords and
Parameters
LOGGING
Usage Notes
enables logging.
ENABLE has no effect if no log file has been specified via the LOG
command, or if logging is already enabled. For more information, see
LOG on page 7 52.
You can temporarily disable logging with the DISABLE command. For
more information, see DISABLE(Logging) on page 7 31.
Command Reference
7 35
ENABLE (Logging)
Purpose
Syntax
ENABLE {LOGGING}
Keywords and
Parameters
LOGGING
Usage Notes
enables logging.
ENABLE has no effect if no log file has been specified via the LOG
command, or if logging is already enabled. For more information, see
LOG on page 7 52.
You can temporarily disable logging with the DISABLE command. For
more information, see DISABLE(Logging) on page 7 31.
Command Reference
7 35
EXECUTEStandalone Only
Purpose
Syntax
Keywords and
Parameters
PROGRAMUNIT name
PROCEDURE name
Usage Notes
Examples
You create a library named lib1.pll. You insert the procedure x1 into that
library using the NOSOURCE and NODIANA keywords. Although the
x1 procedure is not compiled, you can run it with the EXECUTE
command as follows:
.EXECUTE PROC x1
7 36
EXECUTEStandalone Only
Purpose
Syntax
Keywords and
Parameters
PROGRAMUNIT name
PROCEDURE name
Usage Notes
Examples
You create a library named lib1.pll. You insert the procedure x1 into that
library using the NOSOURCE and NODIANA keywords. Although the
x1 procedure is not compiled, you can run it with the EXECUTE
command as follows:
.EXECUTE PROC x1
7 36
EXPORT
Purpose
Writes the source of a library or one or more program units to a text file.
Syntax
Keywords and
Parameters
object
LIBRARY name
PROGRAMUNIT name
[, name...]
PACKAGE name
[, name...]
SUBPROGRAM name
[, name...]
PROCEDURE name
[, name...]
FUNCTION name
[, name...]
FILE
[directory]name
[extension]
SPECIFICATION
and BODY
NOWARN
Usage Notes
If you export more than one program unit, Oracle Procedure Builder
sorts the program units to avoid forward referencesthat is, each
program unit appears after the program unit(s) it references. This
enables you to re-load exported program units into Oracle Procedure
Builder using INTERPRET. For more information, see INTERPRET on
page 7 45.
Command Reference
7 37
EXPORT
Purpose
Writes the source of a library or one or more program units to a text file.
Syntax
Keywords and
Parameters
object
LIBRARY name
PROGRAMUNIT name
[, name...]
PACKAGE name
[, name...]
SUBPROGRAM name
[, name...]
PROCEDURE name
[, name...]
FUNCTION name
[, name...]
FILE
[directory]name
[extension]
SPECIFICATION
and BODY
NOWARN
Usage Notes
If you export more than one program unit, Oracle Procedure Builder
sorts the program units to avoid forward referencesthat is, each
program unit appears after the program unit(s) it references. This
enables you to re-load exported program units into Oracle Procedure
Builder using INTERPRET. For more information, see INTERPRET on
page 7 45.
Command Reference
7 37
7 38
7 38
GO
Purpose
Syntax
GO
Usage Notes
STEP, RESET
The following command resumes program execution:
.GO
Command Reference
7 39
GO
Purpose
Syntax
GO
Usage Notes
STEP, RESET
The following command resumes program execution:
.GO
Command Reference
7 39
GRANT
Purpose
Syntax
Keywords and
Parameters
LIBRARY name
specifies a library.
USER name
specifies a user.
You can specify any single valid username, or PUBLIC (all users).
Usage Notes
See Also
Examples
REVOKE
The following command grants user SCOTT access to database library
lib1:
.GRANT LIB lib1 USER scott
7 40
GRANT
Purpose
Syntax
Keywords and
Parameters
LIBRARY name
specifies a library.
USER name
specifies a user.
You can specify any single valid username, or PUBLIC (all users).
Usage Notes
See Also
Examples
REVOKE
The following command grants user SCOTT access to database library
lib1:
.GRANT LIB lib1 USER scott
7 40
HELP
Purpose
Syntax
Keywords and
Parameters
COMMAND command
SYNTAX
Usage Notes
Examples
Command Reference
7 41
HELP
Purpose
Syntax
Keywords and
Parameters
COMMAND command
SYNTAX
Usage Notes
Examples
Command Reference
7 41
Syntax
Keywords and
Parameters
Usage Notes
progunit
PACKAGE name[,name...]
SUBPROGRAM name
[,name...]
PROCEDURE name
[,name...]
FUNCTION name
[,name...]
SPECIFICATION
and BODY
LIBRARY name
NODIANA
NOSOURCE
NOWARN
7 42
Syntax
Keywords and
Parameters
Usage Notes
progunit
PACKAGE name[,name...]
SUBPROGRAM name
[,name...]
PROCEDURE name
[,name...]
FUNCTION name
[,name...]
SPECIFICATION
and BODY
LIBRARY name
NODIANA
NOSOURCE
NOWARN
7 42
The following command inserts the packages p1 and p2 into the library
named lib1:
.INSERT PACKAGE p1,p2 LIBRARY lib1
Command Reference
7 43
The following command inserts the packages p1 and p2 into the library
named lib1:
.INSERT PACKAGE p1,p2 LIBRARY lib1
Command Reference
7 43
Syntax
Keywords and
Parameters
LOADPATH
DIRECTORY
path [,path...]
CURRENTDIR
Usage Notes
Examples
7 44
Syntax
Keywords and
Parameters
LOADPATH
DIRECTORY
path [,path...]
CURRENTDIR
Usage Notes
Examples
7 44
INTERPRET
Purpose
Syntax
Keywords and
Parameters
FILE name
[, name...]
ECHO
SILENT
NOCONFIRM
Usage Notes
Command Reference
7 45
INTERPRET
Purpose
Syntax
Keywords and
Parameters
FILE name
[, name...]
ECHO
SILENT
NOCONFIRM
Usage Notes
Command Reference
7 45
Displays the program unit source text to which the specified debug
action is attached.
Syntax
LIST {debugaction}
Keywords and
Parameters
debugaction
ACTION number
BREAKPOINT number
specifies a breakpoint.
TRIGGER number
specifies a trigger.
LIST displays the text associated with the specified debug action in the
Source pane of the Interpreter. The line on which the specified debug
action appears becomes the current source location.
Usage Notes
Examples
The following command displays breakpoint number one and sets the
source location:
.LIST BREAK 1
The following command displays debug action number three and sets
the current source location:
.LIST ACTION 3
7 46
Displays the program unit source text to which the specified debug
action is attached.
Syntax
LIST {debugaction}
Keywords and
Parameters
debugaction
ACTION number
BREAKPOINT number
specifies a breakpoint.
TRIGGER number
specifies a trigger.
LIST displays the text associated with the specified debug action in the
Source pane of the Interpreter. The line on which the specified debug
action appears becomes the current source location.
Usage Notes
Examples
The following command displays breakpoint number one and sets the
source location:
.LIST BREAK 1
The following command displays debug action number three and sets
the current source location:
.LIST ACTION 3
7 46
Displays the specified program unit text and sets the current source
location.
Syntax
Keywords and
Parameters
Usage Notes
progunit
PROGRAMUNIT name
PACKAGE name
specifies a package.
SUBPROGRAM name
specifies a subprogram.
PROCEDURE name
specifies a procedure.
FUNCTION name
specifies a function.
PC
SCOPE
LINE number
SPECIFICATION
and BODY
LIST displays the text of a program unit in the Source pane of the
Interpreter. If no line is specified using LINE, the first line of the
program unit becomes the current source location.
Note: This rule does not apply if you specify ., PC, or SCOPE.
Specifying PC sets the source location to the current execution location.
Specifying SCOPE sets the source location to the current scope location.
Note: PC and SCOPE are useful only when program execution
has been interrupted.
Command Reference
7 47
Displays the specified program unit text and sets the current source
location.
Syntax
Keywords and
Parameters
Usage Notes
progunit
PROGRAMUNIT name
PACKAGE name
specifies a package.
SUBPROGRAM name
specifies a subprogram.
PROCEDURE name
specifies a procedure.
FUNCTION name
specifies a function.
PC
SCOPE
LINE number
SPECIFICATION
and BODY
LIST displays the text of a program unit in the Source pane of the
Interpreter. If no line is specified using LINE, the first line of the
program unit becomes the current source location.
Note: This rule does not apply if you specify ., PC, or SCOPE.
Specifying PC sets the source location to the current execution location.
Specifying SCOPE sets the source location to the current scope location.
Note: PC and SCOPE are useful only when program execution
has been interrupted.
Command Reference
7 47
Examples
The following command displays the source text of p1 and sets the
source location to line eighteen:
.LIST PROGRAMUNIT p1 LINE 18
7 48
Examples
The following command displays the source text of p1 and sets the
source location to line eighteen:
.LIST PROGRAMUNIT p1 LINE 18
7 48
Syntax
Keywords and
Parameters
progunit
PROGRAMUNIT name
[, name...]
PACKAGE name
[, name...]
SUBPROGRAM name
[, name...]
PROCEDURE name
[, name...]
FUNCTION name
[, name...]
LIBRARY name
SPECIFICATION
and BODY
NOCONFIRM
If you try to load a library program unit with the same name and type
as an existing program unit, an alert appears, asking if you want to
redefine the existing program unit. Specifying NOCONFIRM in the
command string suppresses the alert.
Usage Notes
Examples
The following command loads the function f1 and the procedure p3,
both of which are stored in the attached library lib1:
.LOAD PROGRAMUNIT f1, p3 LIB lib1
Command Reference
7 49
Syntax
Keywords and
Parameters
progunit
PROGRAMUNIT name
[, name...]
PACKAGE name
[, name...]
SUBPROGRAM name
[, name...]
PROCEDURE name
[, name...]
FUNCTION name
[, name...]
LIBRARY name
SPECIFICATION
and BODY
NOCONFIRM
If you try to load a library program unit with the same name and type
as an existing program unit, an alert appears, asking if you want to
redefine the existing program unit. Specifying NOCONFIRM in the
command string suppresses the alert.
Usage Notes
Examples
The following command loads the function f1 and the procedure p3,
both of which are stored in the attached library lib1:
.LOAD PROGRAMUNIT f1, p3 LIB lib1
Command Reference
7 49
Syntax
Keywords and
Parameters
FILE
[directory]name
[extension]
NOCONFIRM
Each file you specify must contain the source text of a single program
unit. If unspecified, the directory defaults to the current directory, and
the file extension defaults to pls.
Usage Notes
7 50
Syntax
Keywords and
Parameters
FILE
[directory]name
[extension]
NOCONFIRM
Each file you specify must contain the source text of a single program
unit. If unspecified, the directory defaults to the current directory, and
the file extension defaults to pls.
Usage Notes
7 50
Syntax
Keywords and
Parameters
progunit
PROGRAMUNIT
[owner]name
[, [owner]name...]
PACKAGE [owner]name
[, [owner]name...]
SUBPROGRAM [owner]name
[, [owner]name...]
PROCEDURE [owner]name
[, [owner]name...]
FUNCTION [owner]name
[, [owner]name...]
SPECIFICATION
and BODY
NOCONFIRM
Usage Notes
If you try to load a program unit with the same name and type as an
existing program unit, an alert appears, asking if you want to redefine
the existing program unit. Specifying NOCONFIRM in the command
string suppresses the alert.
Examples
Command Reference
7 51
Syntax
Keywords and
Parameters
progunit
PROGRAMUNIT
[owner]name
[, [owner]name...]
PACKAGE [owner]name
[, [owner]name...]
SUBPROGRAM [owner]name
[, [owner]name...]
PROCEDURE [owner]name
[, [owner]name...]
FUNCTION [owner]name
[, [owner]name...]
SPECIFICATION
and BODY
NOCONFIRM
Usage Notes
If you try to load a program unit with the same name and type as an
existing program unit, an alert appears, asking if you want to redefine
the existing program unit. Specifying NOCONFIRM in the command
string suppresses the alert.
Examples
Command Reference
7 51
LOG
Purpose
Syntax
Keywords and
Parameters
FILE
[directory]name
[extension]
APPEND
ENABLED and
DISABLED
OFF
Usage Notes
If the specified log file does not exist, a new file is created in the
specified directory. If no directory path is specified, the log file is
created in the current directory.
You can temporarily disable logging and then enable it again using the
DISABLE and ENABLE commands, respectively.
See Also
Examples
The following command terminates logging and saves the log file:
.LOG OFF
7 52
LOG
Purpose
Syntax
Keywords and
Parameters
FILE
[directory]name
[extension]
APPEND
ENABLED and
DISABLED
OFF
Usage Notes
If the specified log file does not exist, a new file is created in the
specified directory. If no directory path is specified, the log file is
created in the current directory.
You can temporarily disable logging and then enable it again using the
DISABLE and ENABLE commands, respectively.
See Also
Examples
The following command terminates logging and saves the log file:
.LOG OFF
7 52
OPEN
Purpose
Syntax
Keywords and
Parameters
LIBRARY
[directory]lib
name[extension]
FILESYSTEM and
DB
Usage Notes
If you attempt to open a library in the file system, the load path and the
extension pll are used when resolving libname, unless directory and
extension are specified explicitly. Note that the syntax of directory is
operating system-specific. For more information about syntax, see the
Oracle product documentation for your operating system.
Examples
The following command opens the library named lib1, which is stored
in the file system.
.OPEN LIB /private/libs/lib1
The following command opens the library named libdb, which is stored
in the current database:
.OPEN LIB libdb DB
Command Reference
7 53
OPEN
Purpose
Syntax
Keywords and
Parameters
LIBRARY
[directory]lib
name[extension]
FILESYSTEM and
DB
Usage Notes
If you attempt to open a library in the file system, the load path and the
extension pll are used when resolving libname, unless directory and
extension are specified explicitly. Note that the syntax of directory is
operating system-specific. For more information about syntax, see the
Oracle product documentation for your operating system.
Examples
The following command opens the library named lib1, which is stored
in the file system.
.OPEN LIB /private/libs/lib1
The following command opens the library named libdb, which is stored
in the current database:
.OPEN LIB libdb DB
Command Reference
7 53
Syntax
QUIT
Keywords and
Parameters
None.
7 54
Syntax
QUIT
Keywords and
Parameters
None.
7 54
RENAME (Libraries)
Purpose
Syntax
Keywords and
Parameters
LIBRARY oldname
TO newname
Usage Notes
You cannot use this command to rename libraries stored in files. You
must use operating system commands.
Examples
Command Reference
7 55
RENAME (Libraries)
Purpose
Syntax
Keywords and
Parameters
LIBRARY oldname
TO newname
Usage Notes
You cannot use this command to rename libraries stored in files. You
must use operating system commands.
Examples
Command Reference
7 55
RESET
Purpose
Syntax
Keywords and
Parameters
LEVEL number
Usage Notes
GO, STEP
The following command resets to the previous debug level:
.RESET LEVEL 1
7 56
RESET
Purpose
Syntax
Keywords and
Parameters
LEVEL number
Usage Notes
GO, STEP
The following command resets to the previous debug level:
.RESET LEVEL 1
7 56
REVERT
Purpose
Syntax
Keywords and
Parameters
Examples
LIBRARY name
[, name...]
Command Reference
7 57
REVERT
Purpose
Syntax
Keywords and
Parameters
Examples
LIBRARY name
[, name...]
Command Reference
7 57
REVOKE
Purpose
Syntax
Keywords and
Parameters
LIBRARY name
specifies a library.
USER name
specifies a user.
You can specify any single valid username, or PUBLIC (all users).
Usage Notes
See Also
Examples
GRANT
The following command revokes user SCOTTs access to database
library lib1:
.REVOKE LIB lib1 USER scott
7 58
REVOKE
Purpose
Syntax
Keywords and
Parameters
LIBRARY name
specifies a library.
USER name
specifies a user.
You can specify any single valid username, or PUBLIC (all users).
Usage Notes
See Also
Examples
GRANT
The following command revokes user SCOTTs access to database
library lib1:
.REVOKE LIB lib1 USER scott
7 58
SAVE
Purpose
Syntax
Keywords and
Parameters
LIBRARY name
[, name...]
AS name
NODIANA
NOSOURCE
Usage Notes
REVERT
The following command saves the libraries lib1 and lib2:
.SAVE LIB lib1, lib2
The following command saves the libraries lib1 and lib2 without Diana
or source:
.SAVE LIB lib1, lib2 NODIANA NOSOURCE
Command Reference
7 59
SAVE
Purpose
Syntax
Keywords and
Parameters
LIBRARY name
[, name...]
AS name
NODIANA
NOSOURCE
Usage Notes
REVERT
The following command saves the libraries lib1 and lib2:
.SAVE LIB lib1, lib2
The following command saves the libraries lib1 and lib2 without Diana
or source:
.SAVE LIB lib1, lib2 NODIANA NOSOURCE
Command Reference
7 59
SET
Purpose
Syntax
SET SCOPE {
|
|
|
|
|
Keywords and
Parameters
FRAME number
UP [COUNT number]
DOWN [COUNT number]
TOP
BOTTOM
progunit }
FRAME number
UP
DOWN
COUNT number
TOP
BOTTOM
progunit
PROGRAMUNIT name
PACKAGE name
specifies a package.
SUBPROGRAM name
specifies a subprogram.
PROCEDURE name
specifies a procedure.
FUNCTION name
specifies a function.
Usage Notes
Examples
7 60
SET
Purpose
Syntax
SET SCOPE {
|
|
|
|
|
Keywords and
Parameters
FRAME number
UP [COUNT number]
DOWN [COUNT number]
TOP
BOTTOM
progunit }
FRAME number
UP
DOWN
COUNT number
TOP
BOTTOM
progunit
PROGRAMUNIT name
PACKAGE name
specifies a package.
SUBPROGRAM name
specifies a subprogram.
PROCEDURE name
specifies a procedure.
FUNCTION name
specifies a function.
Usage Notes
Examples
7 60
Command Reference
7 61
Command Reference
7 61
Syntax
Keywords and
Parameters
STACK
SCOPE
lists the frames from the top of the call stack down
to the frame containing the current scope location.
Examples
7 62
Syntax
Keywords and
Parameters
STACK
SCOPE
lists the frames from the top of the call stack down
to the frame containing the current scope location.
Examples
7 62
Syntax
SHOW {actiontype}
Keywords and
Parameters
actiontype
Examples
ACTION
BREAKPOINTS
TRIGGERS
The following command lists all of the breakpoints that are currently
set:
.SHOW BREAKPOINTS
Command Reference
7 63
Syntax
SHOW {actiontype}
Keywords and
Parameters
actiontype
Examples
ACTION
BREAKPOINTS
TRIGGERS
The following command lists all of the breakpoints that are currently
set:
.SHOW BREAKPOINTS
Command Reference
7 63
SHOW (Libraries)
Purpose
Syntax
SHOW {LIBRARIES}
Keywords and
Parameters
LIBRARIES
7 64
SHOW (Libraries)
Purpose
Syntax
SHOW {LIBRARIES}
Keywords and
Parameters
LIBRARIES
7 64
SHOW (Locals)
Purpose
Lists the current local variables and parameters that are defined at the
current scope location.
Syntax
Keywords and
Parameters
LOCALS
PARAMETERS
VARIABLES
Examples
Command Reference
7 65
SHOW (Locals)
Purpose
Lists the current local variables and parameters that are defined at the
current scope location.
Syntax
Keywords and
Parameters
LOCALS
PARAMETERS
VARIABLES
Examples
Command Reference
7 65
Syntax
Keywords and
Parameters
progunit
Examples
PROGRAMUNITS
PACKAGES
SUBPROGRAMS
PROCEDURES
FUNCTIONS
USER and
BUILTIN
SPECIFICATION
and BODY
The following command lists the names and types of all current
user-defined program units:
.SHOW PROGRAMUNITS
7 66
Syntax
Keywords and
Parameters
progunit
Examples
PROGRAMUNITS
PACKAGES
SUBPROGRAMS
PROCEDURES
FUNCTIONS
USER and
BUILTIN
SPECIFICATION
and BODY
The following command lists the names and types of all current
user-defined program units:
.SHOW PROGRAMUNITS
7 66
STEP
Purpose
Syntax
STEP {
|
|
|
Keywords and
Parameters
INTO
OVER
OUT
TO {
|
|
[COUNT
INTO
OVER
OUT
TO ...
progunit
PROGRAMUNIT name
PACKAGE name
specifies a package.
SUBPROGRAM name
specifies a subprogram.
PROCEDURE name
specifies a procedure.
FUNCTION name
specifies a function.
actionlocation
ACTION number
BREAKPOINT number
specifies a breakpoint.
TRIGGER number
specifies a trigger.
Command Reference
7 67
STEP
Purpose
Syntax
STEP {
|
|
|
Keywords and
Parameters
INTO
OVER
OUT
TO {
|
|
[COUNT
INTO
OVER
OUT
TO ...
progunit
PROGRAMUNIT name
PACKAGE name
specifies a package.
SUBPROGRAM name
specifies a subprogram.
PROCEDURE name
specifies a procedure.
FUNCTION name
specifies a function.
actionlocation
ACTION number
BREAKPOINT number
specifies a breakpoint.
TRIGGER number
specifies a trigger.
Command Reference
7 67
LINE number
COUNT number
Control returns to the current debug level after the specified set of
statements have been executed.
Usage Notes
See Also
Examples
GO, RESET
The following command resumes execution until the first breakpoint is
reached:
.STEP TO BREAK 1
7 68
LINE number
COUNT number
Control returns to the current debug level after the specified set of
statements have been executed.
Usage Notes
See Also
Examples
GO, RESET
The following command resumes execution until the first breakpoint is
reached:
.STEP TO BREAK 1
7 68
STORE
Purpose
Syntax
Keywords and
Parameters
progunit
PACKAGE name[,name...]
SUBPROGRAM name
[,name...]
PROCEDURE name
[,name...]
FUNCTION name
[,name...]
OWNER name
SPECIFICATION
and BODY
Usage Notes
Command Reference
7 69
STORE
Purpose
Syntax
Keywords and
Parameters
progunit
PACKAGE name[,name...]
SUBPROGRAM name
[,name...]
PROCEDURE name
[,name...]
FUNCTION name
[,name...]
OWNER name
SPECIFICATION
and BODY
Usage Notes
Command Reference
7 69
TRIGGER
Purpose
Syntax
Keywords and
Parameters
progunit
PROGRAMUNIT name
PACKAGE name
specifies a package.
SUBPROGRAM name
specifies a subprogram.
PROCEDURE name
specifies a procedure.
FUNCTION name
specifies a function.
BREAKPOINT number
specifies a breakpoint.
TRIGGER number
specifies a trigger.
current
location
7 70
PC
SCOPE
LINE number
DEBUG
TRIGGER
Purpose
Syntax
Keywords and
Parameters
progunit
PROGRAMUNIT name
PACKAGE name
specifies a package.
SUBPROGRAM name
specifies a subprogram.
PROCEDURE name
specifies a procedure.
FUNCTION name
specifies a function.
BREAKPOINT number
specifies a breakpoint.
TRIGGER number
specifies a trigger.
current
location
7 70
PC
SCOPE
LINE number
DEBUG
ENABLED and
DISABLED
IS plsqlblock
Usage Notes
Command Reference
7 71
ENABLED and
DISABLED
IS plsqlblock
Usage Notes
Command Reference
7 71
7 72
7 72
CHAPTER
Oracle Procedure
Builder Packages
T
overview 8 2
81
CHAPTER
Oracle Procedure
Builder Packages
T
overview 8 2
81
Overview
Oracle Procedure Builder is shipped with several built-in packages that
contain many PL/SQL constructs you can reference while debugging
your program units.
Available Packages
DEBUG
LIST
OLE2
ORA_FFI
82
ORA_NLS
ORA_PROF
TEXT_IO
TOOL_ENV
TOOL_ERR
TOOL_RES
Overview
Oracle Procedure Builder is shipped with several built-in packages that
contain many PL/SQL constructs you can reference while debugging
your program units.
Available Packages
DEBUG
LIST
OLE2
ORA_FFI
82
ORA_NLS
ORA_PROF
TEXT_IO
TOOL_ENV
TOOL_ERR
TOOL_RES
type
syntax
description
examples
For complete information on packages and their use, see the PL/SQL
Users Guide and Reference Version 2.0.
Two packages are provided for use only by Oracle Procedure Builder
internals. There are no subprograms available for external use with
these packages.
ORA_DE
STPROC
83
type
syntax
description
examples
For complete information on packages and their use, see the PL/SQL
Users Guide and Reference Version 2.0.
Two packages are provided for use only by Oracle Procedure Builder
internals. There are no subprograms available for external use with
these packages.
ORA_DE
STPROC
83
by importing data
by exporting data
Server support
Oracle applications cannot respond to commands or requests for
data from a DDE client. Oracle applications must initiate the
DDE conversation (although data may still be transferred in
either direction).
Support Functions
These functions are used to start and stop other DDE server
applications.
Connect/Disconnect
Functions
These functions are used to connect to and disconnect from DDE server
applications.
Transaction Functions
84
by importing data
by exporting data
Server support
Oracle applications cannot respond to commands or requests for
data from a DDE client. Oracle applications must initiate the
DDE conversation (although data may still be transferred in
either direction).
Support Functions
These functions are used to start and stop other DDE server
applications.
Connect/Disconnect
Functions
These functions are used to connect to and disconnect from DDE server
applications.
Transaction Functions
84
Datatype Translation
Functions
DDE.APP_END
DDE.APP_FOCUS
DDE.INITIATE
DDE.TERMINATE
DDE.EXECUTE
DDE.POKE
DDE.REQUEST
DDE.GETFORMATNUM
DDE.GETFORMATSTR
85
Datatype Translation
Functions
DDE.APP_END
DDE.APP_FOCUS
DDE.INITIATE
DDE.TERMINATE
DDE.EXECUTE
DDE.POKE
DDE.REQUEST
DDE.GETFORMATNUM
DDE.GETFORMATSTR
85
DDE.APP_BEGIN
Syntax:
Parameters:
FUNCTION DDE.APP_BEGIN
(AppName VARCHAR2,
AppMode PLS_INTEGER)
RETURN PLS_INTEGER;
AppName
AppMode
Returns:
Description:
An application identifier.
This function begins an application program and returns an application
identifier.
The application name may contain a path. If the application name does
not contain a path, then the following directories are searched in the
order shown below:
86
DDE.APP_END, DDE.APP_FOCUS
DDE.APP_BEGIN
Syntax:
Parameters:
FUNCTION DDE.APP_BEGIN
(AppName VARCHAR2,
AppMode PLS_INTEGER)
RETURN PLS_INTEGER;
AppName
AppMode
Returns:
Description:
An application identifier.
This function begins an application program and returns an application
identifier.
The application name may contain a path. If the application name does
not contain a path, then the following directories are searched in the
order shown below:
86
DDE.APP_END, DDE.APP_FOCUS
Example:
Suppose you wanted to start Microsoft Word with the file readme.doc
loaded. You could write the following PL/SQL statements, including a
call to DDE.APP_BEGIN:
DECLARE
AppID PLS_INTEGER;
BEGIN
/* Start MS Excel with spreadsheet emp.xls loaded */
AppID := DDE.APP_BEGIN(c:\excel\excel.exe emp.xls,
DDE.APP_MODE_MINIMIZED);
END;
87
Example:
Suppose you wanted to start Microsoft Word with the file readme.doc
loaded. You could write the following PL/SQL statements, including a
call to DDE.APP_BEGIN:
DECLARE
AppID PLS_INTEGER;
BEGIN
/* Start MS Excel with spreadsheet emp.xls loaded */
AppID := DDE.APP_BEGIN(c:\excel\excel.exe emp.xls,
DDE.APP_MODE_MINIMIZED);
END;
87
DDE.APP_END
Syntax:
Parameters:
Description:
PROCEDURE DDE.APP_END
(AppID PLS_INTEGER);
AppID
See Also:
DDE.APP_BEGIN, DDE.APP_FOCUS
Example:
Suppose you wanted to start Microsoft Excel with the file emp.xls
loaded, do some processing, and then exit. You could write the
following PL/SQL statements, including a call to DDE.APP_END:
DECLARE
AppID PLS_INTEGER;
BEGIN
/* Start MS Excel with spreadsheet emp.xls loaded */
AppID := DDE.APP_BEGIN(c:\excel\excel.exe emp.xls,
DDE.APP_MODE_NORMAL);
...
/* End MS Excel program */
DDE.APP_END(AppID);
END;
88
DDE.APP_END
Syntax:
Parameters:
Description:
PROCEDURE DDE.APP_END
(AppID PLS_INTEGER);
AppID
See Also:
DDE.APP_BEGIN, DDE.APP_FOCUS
Example:
Suppose you wanted to start Microsoft Excel with the file emp.xls
loaded, do some processing, and then exit. You could write the
following PL/SQL statements, including a call to DDE.APP_END:
DECLARE
AppID PLS_INTEGER;
BEGIN
/* Start MS Excel with spreadsheet emp.xls loaded */
AppID := DDE.APP_BEGIN(c:\excel\excel.exe emp.xls,
DDE.APP_MODE_NORMAL);
...
/* End MS Excel program */
DDE.APP_END(AppID);
END;
88
DDE.APP_FOCUS
Syntax:
Parameters:
Description:
PROCEDURE DDE.APP_FOCUS
(AppID PLS_INTEGER);
AppID
See Also:
DDE.APP_BEGIN, DDE.APP_END
Example:
89
DDE.APP_FOCUS
Syntax:
Parameters:
Description:
PROCEDURE DDE.APP_FOCUS
(AppID PLS_INTEGER);
AppID
See Also:
DDE.APP_BEGIN, DDE.APP_END
Example:
89
DDE.EXECUTE
Syntax:
Parameters:
Description:
PROCEDURE DDE.EXECUTE
(ConvID PLS_INTEGER,
CmdStr VARCHAR2,
Timeout PLS_INTEGER);
ConvID
CmdStr
Timeout
See Also:
DDE.INITIATE
Example:
8 10
DDE.EXECUTE
Syntax:
Parameters:
Description:
PROCEDURE DDE.EXECUTE
(ConvID PLS_INTEGER,
CmdStr VARCHAR2,
Timeout PLS_INTEGER);
ConvID
CmdStr
Timeout
See Also:
DDE.INITIATE
Example:
8 10
DDE.GETFORMATNUM
Syntax:
Parameters:
Description:
FUNCTION DDE.GETFORMATNUM
(DataFormatName VARCHAR2)
RETURN PLS_INTEGER;
DataFormat
Name
See Also:
DDE.POKE, DDE.REQUEST
Example:
Suppose you wanted to retrieve a format number and register your own
data format. You could write the following PL/SQL statements,
including a call to DDE.GETFORMATNUM:
DECLARE
FormatNum
PLS_INTEGER;
MyFormatNum PLS_INTEGER;
BEGIN
/* Get predefined format number for CF_TEXT (should
return CF_TEXT=1) */
FormatNum := DDE.GETFORMATNUM(CF_TEXT);
/* Register a userdefined data format called
MY_FORMAT */
MyFormatNum := DDE.GETFORMATNUM(MY_FORMAT);
END;
8 11
DDE.GETFORMATNUM
Syntax:
Parameters:
Description:
FUNCTION DDE.GETFORMATNUM
(DataFormatName VARCHAR2)
RETURN PLS_INTEGER;
DataFormat
Name
See Also:
DDE.POKE, DDE.REQUEST
Example:
Suppose you wanted to retrieve a format number and register your own
data format. You could write the following PL/SQL statements,
including a call to DDE.GETFORMATNUM:
DECLARE
FormatNum
PLS_INTEGER;
MyFormatNum PLS_INTEGER;
BEGIN
/* Get predefined format number for CF_TEXT (should
return CF_TEXT=1) */
FormatNum := DDE.GETFORMATNUM(CF_TEXT);
/* Register a userdefined data format called
MY_FORMAT */
MyFormatNum := DDE.GETFORMATNUM(MY_FORMAT);
END;
8 11
DDE.GETFORMATSTR
Syntax:
Parameters:
Returns:
Description:
FUNCTION DDE.GETFORMATSTR
(DataFormatNum PLS_INTEGER)
RETURN VARCHAR2;
DataFormat
Num
See Also:
DDE.GETFORMATNUM
Example:
Suppose you wanted to retrieve the string for a predefined data format
number. You could write the the following PL/SQL statements,
including a call to DDE.GETFORMATSTR:
DECLARE
FormatStr
VARCHAR2;
BEGIN
/* Get a data format name (should return the string
CF_TEXT) */
FormatStr := DDE.GETFORMATSTR(CF_TEXT);
END;
8 12
DDE.GETFORMATSTR
Syntax:
Parameters:
Returns:
Description:
FUNCTION DDE.GETFORMATSTR
(DataFormatNum PLS_INTEGER)
RETURN VARCHAR2;
DataFormat
Num
See Also:
DDE.GETFORMATNUM
Example:
Suppose you wanted to retrieve the string for a predefined data format
number. You could write the the following PL/SQL statements,
including a call to DDE.GETFORMATSTR:
DECLARE
FormatStr
VARCHAR2;
BEGIN
/* Get a data format name (should return the string
CF_TEXT) */
FormatStr := DDE.GETFORMATSTR(CF_TEXT);
END;
8 12
DDE.INITIATE
Syntax:
Parameters:
Returns:
Description:
FUNCTION DDE.INITIATE
(Service VARCHAR2,
Topic
VARCHAR2)
RETURN PLS_INTEGER;
Service
Topic
See Also:
Example:
8 13
DDE.INITIATE
Syntax:
Parameters:
Returns:
Description:
FUNCTION DDE.INITIATE
(Service VARCHAR2,
Topic
VARCHAR2)
RETURN PLS_INTEGER;
Service
Topic
See Also:
Example:
8 13
DDE.POKE
Syntax:
Parameters:
Description:
PROCEDURE DDE.POKE
PLS_INTEGER,
(ConvID
Item
VARCHAR2,
Data
VARCHAR2,
DataFormat PLS_INTEGER,
Timeout
PLS_INTEGER);
ConvID
Item
Data
DataFormat
Timeout
See Also:
8 14
DDE.GETFORMATNUM, DDE.INITATE
DDE.POKE
Syntax:
Parameters:
Description:
PROCEDURE DDE.POKE
PLS_INTEGER,
(ConvID
Item
VARCHAR2,
Data
VARCHAR2,
DataFormat PLS_INTEGER,
Timeout
PLS_INTEGER);
ConvID
Item
Data
DataFormat
Timeout
See Also:
8 14
DDE.GETFORMATNUM, DDE.INITATE
Example:
8 15
Example:
8 15
DDE.REQUEST
Syntax:
Parameters:
Description:
PROCEDURE DDE.REQUEST
PLS_INTEGER,
(ConvID
Item
VARCHAR2,
Buffer
VARCHAR2,
DataFormat PLS_INTEGER,
Timeout
PLS_INTEGER);
ConvID
Item
Buffer
DataFormat
Timeout
See Also:
8 16
DDE.GETFORMATNUM, DDE.INITIATE
DDE.REQUEST
Syntax:
Parameters:
Description:
PROCEDURE DDE.REQUEST
PLS_INTEGER,
(ConvID
Item
VARCHAR2,
Buffer
VARCHAR2,
DataFormat PLS_INTEGER,
Timeout
PLS_INTEGER);
ConvID
Item
Buffer
DataFormat
Timeout
See Also:
8 16
DDE.GETFORMATNUM, DDE.INITIATE
Example:
8 17
Example:
8 17
DDE.TERMINATE
Syntax:
PROCEDURE DDE.TERMINATE
(ConvID PLS_INTEGER);
ConvID
Description:
See Also:
Example:
8 18
DDE.TERMINATE
Syntax:
PROCEDURE DDE.TERMINATE
(ConvID PLS_INTEGER);
ConvID
Description:
See Also:
Example:
8 18
Microsoft Windows
Predefined Data
Formats
DDE.CF_BITMAP
DDE.CF_DIB
DDE.CF_DIF
DDE.CF_DSPBITMAP
DDE.CF_DSPMETAFILE
PICT
DDE.CF_DSPTEXT
DDE.CF_METAFILEPICT
DDE.CF_OEMTEXT
DDE.CF_OWNER
DISPLAY
DDE.CF_PALETTE
DDE.CF_PENDATA
DDE.CF_RIFF
DDE.CF_SYLK
DDE.CF_TEXT
8 19
Microsoft Windows
Predefined Data
Formats
DDE.CF_BITMAP
DDE.CF_DIB
DDE.CF_DIF
DDE.CF_DSPBITMAP
DDE.CF_DSPMETAFILE
PICT
DDE.CF_DSPTEXT
DDE.CF_METAFILEPICT
DDE.CF_OEMTEXT
DDE.CF_OWNER
DISPLAY
DDE.CF_PALETTE
DDE.CF_PENDATA
DDE.CF_RIFF
DDE.CF_SYLK
DDE.CF_TEXT
8 19
DDE.CF_TIFF
DDE.CF_WAVE
DDE.DDE_APP_
FAILURE
DDE.DDE_APP_NOT_
FOUND
An application ID specified in a
DDE.APP_END or DDE.APP_FOCUS call
does not correspond to an application that
is currently running.
DDE.DDE_FMT_NOT_
FOUND
DDE.DDE_FMT_NOT_
REG
DDE.DDE_INIT_FAILED
DDE.DDE_PARAM_ERR
DDE.DMLERR_BUSY
DDE.DMLERR_DATA
ACKTIMEOUT
DDE.DMLERR_EXEC
ACK_ TIMEOUT
DDE.DMLERR_INVA
LIDPARAMETER
Exceptions
8 20
DDE.CF_TIFF
DDE.CF_WAVE
DDE.DDE_APP_
FAILURE
DDE.DDE_APP_NOT_
FOUND
An application ID specified in a
DDE.APP_END or DDE.APP_FOCUS call
does not correspond to an application that
is currently running.
DDE.DDE_FMT_NOT_
FOUND
DDE.DDE_FMT_NOT_
REG
DDE.DDE_INIT_FAILED
DDE.DDE_PARAM_ERR
DDE.DMLERR_BUSY
DDE.DMLERR_DATA
ACKTIMEOUT
DDE.DMLERR_EXEC
ACK_ TIMEOUT
DDE.DMLERR_INVA
LIDPARAMETER
Exceptions
8 20
DDE.DMLERR_NO_
CONV_ESTABLISHED
DDE.DMLERR_
NOTPROCESSED
DDE.DMLERR_POKE
ACKTIMEOUT
DDE.DMLERR_POST
MSG_FAILED
DDE.DMLERR_SERVER_
DIED
DDE.DMLERR_SYS_
ERROR
8 21
DDE.DMLERR_NO_
CONV_ESTABLISHED
DDE.DMLERR_
NOTPROCESSED
DDE.DMLERR_POKE
ACKTIMEOUT
DDE.DMLERR_POST
MSG_FAILED
DDE.DMLERR_SERVER_
DIED
DDE.DMLERR_SYS_
ERROR
8 21
DEBUG.BREAK
Syntax:
Description:
Example:
DEBUG.BREAK
EXCEPTION;
8 22
DEBUG.BREAK
Syntax:
Description:
Example:
DEBUG.BREAK
EXCEPTION;
8 22
DEBUG.GETx
Syntax:
FUNCTION DEBUG.GETC
(varname VARCHAR2)
RETURN VARCHAR2;
FUNCTION DEBUG.GETD
(varname VARCHAR2)
RETURN DATE;
FUNCTION DEBUG.GETI
(varname VARCHAR2)
RETURN PLS_INTEGER;
FUNCTION DEBUG.GETN
(varname VARCHAR2)
RETURN NUMBER;
Parameters:
Description:
Example:
varname
These functions retrieve the value of the specified local variable. This is
useful when you want to determine a locals value from within a debug
trigger.
Suppose you want to establish a conditional breakpoint on line 10 of
procedure my_proc, which will be reached only if the local CHAR
variable my_ename is JONES. You could create the following debug
trigger using DEBUG.GETC:
PL/SQL> .TRIGGER PROC my_proc LINE 10 IS
+> IF DEBUG.GETC(my_ename) = JONES THEN
+>
RAISE DEBUG.BREAK;
+> END IF;
8 23
DEBUG.GETx
Syntax:
FUNCTION DEBUG.GETC
(varname VARCHAR2)
RETURN VARCHAR2;
FUNCTION DEBUG.GETD
(varname VARCHAR2)
RETURN DATE;
FUNCTION DEBUG.GETI
(varname VARCHAR2)
RETURN PLS_INTEGER;
FUNCTION DEBUG.GETN
(varname VARCHAR2)
RETURN NUMBER;
Parameters:
Description:
Example:
varname
These functions retrieve the value of the specified local variable. This is
useful when you want to determine a locals value from within a debug
trigger.
Suppose you want to establish a conditional breakpoint on line 10 of
procedure my_proc, which will be reached only if the local CHAR
variable my_ename is JONES. You could create the following debug
trigger using DEBUG.GETC:
PL/SQL> .TRIGGER PROC my_proc LINE 10 IS
+> IF DEBUG.GETC(my_ename) = JONES THEN
+>
RAISE DEBUG.BREAK;
+> END IF;
8 23
DEBUG.INTERPRET
Syntax:
Parameters:
PROCEDURE DEBUG.INTERPRET
(input VARCHAR2);
input
Description:
Example:
8 24
DEBUG.INTERPRET
Syntax:
Parameters:
PROCEDURE DEBUG.INTERPRET
(input VARCHAR2);
input
Description:
Example:
8 24
DEBUG.SETx
Syntax:
PROCEDURE DEBUG.SETC
(varname VARCHAR2,
newvalue VARCHAR2);
PROCEDURE DEBUG.SETD
(varname VARCHAR2,
newvalue DATE);
PROCEDURE DEBUG.SETI
(varname VARCHAR2,
newvalue PLS_INTEGER);
PROCEDURE DEBUG.SETN
(varname VARCHAR2,
newvalue NUMBER);
Parameters:
Description:
Example:
varname
newvalue
These procedures set the value of a local variable to a new value. This is
useful when you want to change a locals value from a debug trigger.
Suppose you want to establish a breakpoint on line 10 of procedure
my_proc, and set the value of the local CHAR variable my_emp to
SMITH whenever the breakpoint is reached. You could create the
following breakpoint using DEBUG.SETC:
PL/SQL> .BREAK PROC my_proc LINE 10 TRIGGER
+> DEBUG.SETC(my_emp, SMITH);
Suppose youve reached a breakpoint and want to set the value of the
local DATE variable my_date to 02OCT94. You could enter the
following PL/SQL block using DEBUG.SETD:
(debug 1)PL/SQL> DEBUG.SETD(my_date, 02OCT94);
8 25
DEBUG.SETx
Syntax:
PROCEDURE DEBUG.SETC
(varname VARCHAR2,
newvalue VARCHAR2);
PROCEDURE DEBUG.SETD
(varname VARCHAR2,
newvalue DATE);
PROCEDURE DEBUG.SETI
(varname VARCHAR2,
newvalue PLS_INTEGER);
PROCEDURE DEBUG.SETN
(varname VARCHAR2,
newvalue NUMBER);
Parameters:
Description:
Example:
varname
newvalue
These procedures set the value of a local variable to a new value. This is
useful when you want to change a locals value from a debug trigger.
Suppose you want to establish a breakpoint on line 10 of procedure
my_proc, and set the value of the local CHAR variable my_emp to
SMITH whenever the breakpoint is reached. You could create the
following breakpoint using DEBUG.SETC:
PL/SQL> .BREAK PROC my_proc LINE 10 TRIGGER
+> DEBUG.SETC(my_emp, SMITH);
Suppose youve reached a breakpoint and want to set the value of the
local DATE variable my_date to 02OCT94. You could enter the
following PL/SQL block using DEBUG.SETD:
(debug 1)PL/SQL> DEBUG.SETD(my_date, 02OCT94);
8 25
DEBUG.SUSPEND
Syntax:
Description:
Example:
PROCEDURE DEBUG.SUSPEND;
8 26
DEBUG.SUSPEND
Syntax:
Description:
Example:
PROCEDURE DEBUG.SUSPEND;
8 26
LIST.APPENDITEM
Syntax:
Parameters:
Description:
PROCEDURE LIST.APPENDITEM
(list listofchar),
item VARCHAR2);
list
Is a list.
item
Is a list item.
See Also:
Example:
8 27
LIST.APPENDITEM
Syntax:
Parameters:
Description:
PROCEDURE LIST.APPENDITEM
(list listofchar),
item VARCHAR2);
list
Is a list.
item
Is a list item.
See Also:
Example:
8 27
LIST.DESTROY
Syntax:
Parameters:
Description:
Example:
PROCEDURE LIST.DESTROY
(list listofchar);
list
Is a list.
LIST.DELETEITEM
Syntax:
Parameters:
Description:
PROCEDURE LIST.DELETEITEM
(list listofchar),
pos PLS_INTEGER);
list
Is a list.
pos
This procedure deletes the item at the specified position in the list.
See Also:
Example:
Suppose you want to delete the third item of a list. You could enter the
following block using LIST.DELETEITEM:
LIST.DELETEITEM(my_package.my_list, 2));
8 28
LIST.DESTROY
Syntax:
Parameters:
Description:
Example:
PROCEDURE LIST.DESTROY
(list listofchar);
list
Is a list.
LIST.DELETEITEM
Syntax:
Parameters:
Description:
PROCEDURE LIST.DELETEITEM
(list listofchar),
pos PLS_INTEGER);
list
Is a list.
pos
This procedure deletes the item at the specified position in the list.
See Also:
Example:
Suppose you want to delete the third item of a list. You could enter the
following block using LIST.DELETEITEM:
LIST.DELETEITEM(my_package.my_list, 2));
8 28
LIST.FAIL
Syntax:
Description:
LIST.FAIL
EXCEPTION;
LIST.GETITEM
Syntax:
Parameters:
Returns:
Description:
FUNCTION LIST.GETITEM
(list listofchar,
pos PLS_INTEGER)
RETURN VARCHAR2;
list
Is a list.
pos
See Also:
Example:
Suppose you want to get the second item of my_list and print it. You
could enter the following block using LIST.GETITEM:
TEXT_IO.PUT_LINE(LIST.GETITEM(my_list, 1));
8 29
LIST.FAIL
Syntax:
Description:
LIST.FAIL
EXCEPTION;
LIST.GETITEM
Syntax:
Parameters:
Returns:
Description:
FUNCTION LIST.GETITEM
(list listofchar,
pos PLS_INTEGER)
RETURN VARCHAR2;
list
Is a list.
pos
See Also:
Example:
Suppose you want to get the second item of my_list and print it. You
could enter the following block using LIST.GETITEM:
TEXT_IO.PUT_LINE(LIST.GETITEM(my_list, 1));
8 29
LIST.INSERTITEM
Syntax:
Parameters:
Description:
PROCEDURE LIST.INSERTITEM
(list listofchar),
pos PLS_INTEGER,
item VARCHAR2);
list
Is a list.
pos
item
Is a list item.
This procedure inserts an item into the list at the specified position.
See Also:
Example:
Suppose you want to add an item to a list in the third position, then
print it to be sure it was added correctly. You could write the following
procedure using LIST.INSERTITEM:
PROCEDURE insert_item(my_list LIST.LISTOFCHAR) IS
BEGIN
LIST.INSERTITEM(my_list, 2, This is the third
item.);
TEXT_IO.PUT_LINE(LIST.GETITEM(my_list, 2));
END;
LIST.LISTOFCHAR
Syntax:
Description:
8 30
TYPE LIST.LISTOFCHAR;
LIST.INSERTITEM
Syntax:
Parameters:
Description:
PROCEDURE LIST.INSERTITEM
(list listofchar),
pos PLS_INTEGER,
item VARCHAR2);
list
Is a list.
pos
item
Is a list item.
This procedure inserts an item into the list at the specified position.
See Also:
Example:
Suppose you want to add an item to a list in the third position, then
print it to be sure it was added correctly. You could write the following
procedure using LIST.INSERTITEM:
PROCEDURE insert_item(my_list LIST.LISTOFCHAR) IS
BEGIN
LIST.INSERTITEM(my_list, 2, This is the third
item.);
TEXT_IO.PUT_LINE(LIST.GETITEM(my_list, 2));
END;
LIST.LISTOFCHAR
Syntax:
Description:
8 30
TYPE LIST.LISTOFCHAR;
LIST.MAKE
Syntax:
Description:
Example:
FUNCTION LIST.MAKE
RETURN listofchar;
This function creates a new, empty list. A list must be created before it
can be used. Any lists created with this function should be destroyed
with the LIST.DESTROY procedure.
Suppose you want to create a list of names that is not stored in the
database. You could create the following procedure using LIST.MAKE:
PROCEDURE my_proc IS
my_list LIST.LISTOFCHAR;
BEGIN
my_list := LIST.MAKE;
END;
LIST.NITEMS
Syntax:
Parameters:
Description:
FUNCTION LIST.NITEMS
(list listofchar)
RETURN PLS_INTEGER;
list
Is a list.
See Also:
Example:
Suppose you want to print all of the names stored as character strings in
my_pkg.my_list. You could write the following procedure using
LIST.NITEMS:
PROCEDURE print_list IS
BEGIN
FOR i IN 0..LIST.NITEMS(my_pkg.my_list)1 LOOP
TEXT_IO.PUT_LINE(LIST.GETITEM(my_pkg.my_list, i));
END LOOP;
END;
8 31
LIST.MAKE
Syntax:
Description:
Example:
FUNCTION LIST.MAKE
RETURN listofchar;
This function creates a new, empty list. A list must be created before it
can be used. Any lists created with this function should be destroyed
with the LIST.DESTROY procedure.
Suppose you want to create a list of names that is not stored in the
database. You could create the following procedure using LIST.MAKE:
PROCEDURE my_proc IS
my_list LIST.LISTOFCHAR;
BEGIN
my_list := LIST.MAKE;
END;
LIST.NITEMS
Syntax:
Parameters:
Description:
FUNCTION LIST.NITEMS
(list listofchar)
RETURN PLS_INTEGER;
list
Is a list.
See Also:
Example:
Suppose you want to print all of the names stored as character strings in
my_pkg.my_list. You could write the following procedure using
LIST.NITEMS:
PROCEDURE print_list IS
BEGIN
FOR i IN 0..LIST.NITEMS(my_pkg.my_list)1 LOOP
TEXT_IO.PUT_LINE(LIST.GETITEM(my_pkg.my_list, i));
END LOOP;
END;
8 31
LIST.PREPENDITEM
Syntax:
Parameters:
Description:
PROCEDURE LIST.PREPENDITEM
(list listofchar),
item VARCHAR2);
list
Is a list.
item
Is a list item.
See Also:
Example:
8 32
LIST.PREPENDITEM
Syntax:
Parameters:
Description:
PROCEDURE LIST.PREPENDITEM
(list listofchar),
item VARCHAR2);
list
Is a list.
item
Is a list item.
See Also:
Example:
8 32
OLE2.OBJ_TYPE
Syntax:
Description:
SUBTYPE OLE2.OBJ_TYPE;
See Also:
OLE2.CREATE_OBJ
OLE2.LIST_TYPE
Syntax:
Description:
SUBTYPE OLE2.LIST_TYPE;
See Also:
OLE2.CREATE_ARGLIST, OLE2.DESTROY_ARGLIST
Example:
my_arglist
OLE2.LIST_TYPE;
8 33
OLE2.OBJ_TYPE
Syntax:
Description:
SUBTYPE OLE2.OBJ_TYPE;
See Also:
OLE2.CREATE_OBJ
OLE2.LIST_TYPE
Syntax:
Description:
SUBTYPE OLE2.LIST_TYPE;
See Also:
OLE2.CREATE_ARGLIST, OLE2.DESTROY_ARGLIST
Example:
my_arglist
OLE2.LIST_TYPE;
8 33
OLE2.ADD_ARG
Syntax:
PROCEDURE OLE2.ADD_ARG
(list list_type,
value NUMBER);
PROCEDURE OLE2.ADD_ARG
(list list_type,
value VARCHAR2);
Parameters:
Description:
list
value
See Also:
OLE2.CREATE_ARGLIST, OLE2.DESTROY_ARGLIST
Example:
OLE2.CREATE_ARGLIST
Syntax:
Returns:
Description:
FUNCTION OLE2.CREATE_ARGLIST
RETURN list_type;
See Also:
OLE2.ADD_ARG, OLE2.DESTROY_ARGLIST
Example:
Suppose you want to create an argument list. You could write the
following statements to declare and initialize an argument list:
my_arglist OLE2.LIST_TYPE;
my_arglist := OLE2.CREATE_ARGLIST;
8 34
OLE2.ADD_ARG
Syntax:
PROCEDURE OLE2.ADD_ARG
(list list_type,
value NUMBER);
PROCEDURE OLE2.ADD_ARG
(list list_type,
value VARCHAR2);
Parameters:
Description:
list
value
See Also:
OLE2.CREATE_ARGLIST, OLE2.DESTROY_ARGLIST
Example:
OLE2.CREATE_ARGLIST
Syntax:
Returns:
Description:
FUNCTION OLE2.CREATE_ARGLIST
RETURN list_type;
See Also:
OLE2.ADD_ARG, OLE2.DESTROY_ARGLIST
Example:
Suppose you want to create an argument list. You could write the
following statements to declare and initialize an argument list:
my_arglist OLE2.LIST_TYPE;
my_arglist := OLE2.CREATE_ARGLIST;
8 34
OLE2.CREATE_OBJ
Syntax:
Parameters:
Returns:
Description:
FUNCTION OLE2.CREATE_OBJ
(object VARCHAR2)
RETURN OBJ_TYPE;
object
See Also:
Example:
Suppose you want to create a new Microsoft Excel 5.0 spreadsheet. You
could write the following statement using OLE2.CREATE_OBJ:
obj := OLE2.CREATE_OBJ(Excel.Application.5);
OLE2.DESTROY_ARGLIST
Syntax:
Parameters:
Description:
PROCEDURE OLE2.DESTROY_ARGLIST
(list list_type);
list
See Also:
OLE2.ADD_ARG, OLE2.CREATE_ARGLIST
Example:
Suppose you want to destroy the argument list my_arglist. You could
write the following statement using OLE2.DESTROY_ARGLIST:
OLE2.DESTROY_ARGLIST(my_arglist);
8 35
OLE2.CREATE_OBJ
Syntax:
Parameters:
Returns:
Description:
FUNCTION OLE2.CREATE_OBJ
(object VARCHAR2)
RETURN OBJ_TYPE;
object
See Also:
Example:
Suppose you want to create a new Microsoft Excel 5.0 spreadsheet. You
could write the following statement using OLE2.CREATE_OBJ:
obj := OLE2.CREATE_OBJ(Excel.Application.5);
OLE2.DESTROY_ARGLIST
Syntax:
Parameters:
Description:
PROCEDURE OLE2.DESTROY_ARGLIST
(list list_type);
list
See Also:
OLE2.ADD_ARG, OLE2.CREATE_ARGLIST
Example:
Suppose you want to destroy the argument list my_arglist. You could
write the following statement using OLE2.DESTROY_ARGLIST:
OLE2.DESTROY_ARGLIST(my_arglist);
8 35
OLE2.GET_CHAR_PROPERTY
Syntax:
Parameters:
Returns:
Description:
FUNCTION OLE2.GET_CHAR_PROPERTY
obj_type,
(object
property VARCHAR2,
arglist list_type := 0)
RETURN VARCHAR2;
object
property
arglist
A character value.
This function gets a property of an OLE2 Automation Object.
See Also:
OLE2.GET_NUM_PROPERTY, OLE2.GET_OBJ_PROPERTY
Example:
Suppose you want to get the text in an OLE2 document. You could
write the following statement using OLE2.GET_CHAR_PROPERTY:
str := OLE2.GET_CHAR_PROPERTY(obj, text);
8 36
OLE2.GET_CHAR_PROPERTY
Syntax:
Parameters:
Returns:
Description:
FUNCTION OLE2.GET_CHAR_PROPERTY
obj_type,
(object
property VARCHAR2,
arglist list_type := 0)
RETURN VARCHAR2;
object
property
arglist
A character value.
This function gets a property of an OLE2 Automation Object.
See Also:
OLE2.GET_NUM_PROPERTY, OLE2.GET_OBJ_PROPERTY
Example:
Suppose you want to get the text in an OLE2 document. You could
write the following statement using OLE2.GET_CHAR_PROPERTY:
str := OLE2.GET_CHAR_PROPERTY(obj, text);
8 36
OLE2.GET_NUM_PROPERTY
Syntax:
Parameters:
Returns:
Description:
FUNCTION OLE2.GET_NUM_PROPERTY
obj_type,
(object
property VARCHAR2,
arglist list_type := 0)
RETURN NUMBER;
object
property
arglist
A number value.
This function gets a number value from an OLE2 Automation Object.
See Also:
OLE2.GET_CHAR_PROPERTY, OLE2.GET_OBJ_PROPERTY
Example:
Suppose you want to get the X and Y settings of the center of an OLE2
Object (in this case, a map). You could write the following statements
using OLE2.GET_NUM_PROPERTY:
x := OLE2.GET_NUM_PROPERTY(Map,GetMapCenterX);
y := OLE2.GET_NUM_PROPERTY(Map,GetMapCenterY);
8 37
OLE2.GET_NUM_PROPERTY
Syntax:
Parameters:
Returns:
Description:
FUNCTION OLE2.GET_NUM_PROPERTY
obj_type,
(object
property VARCHAR2,
arglist list_type := 0)
RETURN NUMBER;
object
property
arglist
A number value.
This function gets a number value from an OLE2 Automation Object.
See Also:
OLE2.GET_CHAR_PROPERTY, OLE2.GET_OBJ_PROPERTY
Example:
Suppose you want to get the X and Y settings of the center of an OLE2
Object (in this case, a map). You could write the following statements
using OLE2.GET_NUM_PROPERTY:
x := OLE2.GET_NUM_PROPERTY(Map,GetMapCenterX);
y := OLE2.GET_NUM_PROPERTY(Map,GetMapCenterY);
8 37
OLE2.GET_OBJ_PROPERTY
Syntax:
Parameters:
Returns:
Description:
FUNCTION OLE2.GET_OBJ_PROPERTY
obj_type,
(object
property VARCHAR2,
arglist list_type := 0)
RETURN OBJ_TYPE;
object
property
arglist
See Also:
OLE2.GET_CHAR_PROPERTY, OLE2.GET_NUM_PROPERTY
Example:
8 38
OLE2.GET_OBJ_PROPERTY
Syntax:
Parameters:
Returns:
Description:
FUNCTION OLE2.GET_OBJ_PROPERTY
obj_type,
(object
property VARCHAR2,
arglist list_type := 0)
RETURN OBJ_TYPE;
object
property
arglist
See Also:
OLE2.GET_CHAR_PROPERTY, OLE2.GET_NUM_PROPERTY
Example:
8 38
OLE2.INVOKE
Syntax:
Parameters:
Description:
PROCEDURE OLE2.INVOKE
(object obj_type,
method VARCHAR2,
list
list_type := 0);
object
method
list
See Also:
Example:
8 39
OLE2.INVOKE
Syntax:
Parameters:
Description:
PROCEDURE OLE2.INVOKE
(object obj_type,
method VARCHAR2,
list
list_type := 0);
object
method
list
See Also:
Example:
8 39
OLE2.INVOKE_NUM
Syntax:
Parameters:
Returns:
Description:
FUNCTION OLE2.INVOKE_NUM
obj_type,
(object
method
VARCHAR2,
arglist list_type := 0)
RETURN NUMBER;
object
method
arglist
A number value.
This function gets a number value from an OLE2 Automation Object,
using the specified method.
See Also:
Example:
8 40
OLE2.INVOKE_NUM
Syntax:
Parameters:
Returns:
Description:
FUNCTION OLE2.INVOKE_NUM
obj_type,
(object
method
VARCHAR2,
arglist list_type := 0)
RETURN NUMBER;
object
method
arglist
A number value.
This function gets a number value from an OLE2 Automation Object,
using the specified method.
See Also:
Example:
8 40
OLE2.INVOKE_CHAR
Syntax:
Parameters:
Returns:
Description:
FUNCTION OLE2.INVOKE_CHAR
obj_type,
(object
method
VARCHAR2,
arglist list_type := 0)
RETURN VARCHAR2;
object
method
arglist
A character value.
This function gets a character value from an OLE2 Automation Object
using the specified method.
See Also:
Example:
You want to retrieve the correct spelling of a word from a spell checker
automation object by invoking the objects Spell method:
correct:=OLE2.INVOKE_CHAR(spell_obj, spell, my_arglist);
8 41
OLE2.INVOKE_CHAR
Syntax:
Parameters:
Returns:
Description:
FUNCTION OLE2.INVOKE_CHAR
obj_type,
(object
method
VARCHAR2,
arglist list_type := 0)
RETURN VARCHAR2;
object
method
arglist
A character value.
This function gets a character value from an OLE2 Automation Object
using the specified method.
See Also:
Example:
You want to retrieve the correct spelling of a word from a spell checker
automation object by invoking the objects Spell method:
correct:=OLE2.INVOKE_CHAR(spell_obj, spell, my_arglist);
8 41
OLE2.INVOKE_OBJ
Syntax:
Parameters:
Returns:
Description:
FUNCTION OLE2.INVOKE_OBJ
obj_type,
(object
method
VARCHAR2,
arglist list_type := 0)
RETURN OBJ_TYPE;
object
method
arglist
See Also
Example:
8 42
OLE2.INVOKE_OBJ
Syntax:
Parameters:
Returns:
Description:
FUNCTION OLE2.INVOKE_OBJ
obj_type,
(object
method
VARCHAR2,
arglist list_type := 0)
RETURN OBJ_TYPE;
object
method
arglist
See Also
Example:
8 42
OLE2.RELEASE_OBJ
Syntax:
Parameters:
Description:
PROCEDURE OLE2.RELEASE_OBJ
obj_type);
(object
object
See Also
OLE2.CREATE_OBJECT, OLE2.INVOKE_OBJ,
OLE2.GET_OBJ_PROPERTY
Example:
8 43
OLE2.RELEASE_OBJ
Syntax:
Parameters:
Description:
PROCEDURE OLE2.RELEASE_OBJ
obj_type);
(object
object
See Also
OLE2.CREATE_OBJECT, OLE2.INVOKE_OBJ,
OLE2.GET_OBJ_PROPERTY
Example:
8 43
OLE2.SET_PROPERTY
Syntax:
PROCEDURE OLE2.SET_PROPERTY
obj_type,
(object
property VARCHAR2,
value
NUMBER,
arglist list_type := 0);
PROCEDURE OLE2.SET_PROPERTY
obj_type,
(object
property VARCHAR2,
value
VARCHAR2,
arglist list_type := 0);
Parameters:
Description:
object
property
value
Is a property value.
arglist
See Also:
OLE2.CREATE_OBJ, OLE2.GET_CHAR_PROPERTY,
OLE2.GET_NUM_PROPERTY, OLE2.GET_OBJ_PROPERTY
Example:
Suppose you want to insert a line of text into a cell in a new Microsoft
Excel 5.0 spreadsheet. You could write the following statements using
OLE2.SET_PROPERTY:
obj := OLE2.CREATE_OBJ (Excel.Application.5);
OLE2.SET_PROPERTY (obj, row, 4);
OLE2.SET_PROPERTY (obj, column, 2);
OLE2.SET_PROPERTY (obj, Insert, Hello, World.);
8 44
OLE2.SET_PROPERTY
Syntax:
PROCEDURE OLE2.SET_PROPERTY
obj_type,
(object
property VARCHAR2,
value
NUMBER,
arglist list_type := 0);
PROCEDURE OLE2.SET_PROPERTY
obj_type,
(object
property VARCHAR2,
value
VARCHAR2,
arglist list_type := 0);
Parameters:
Description:
object
property
value
Is a property value.
arglist
See Also:
OLE2.CREATE_OBJ, OLE2.GET_CHAR_PROPERTY,
OLE2.GET_NUM_PROPERTY, OLE2.GET_OBJ_PROPERTY
Example:
Suppose you want to insert a line of text into a cell in a new Microsoft
Excel 5.0 spreadsheet. You could write the following statements using
OLE2.SET_PROPERTY:
obj := OLE2.CREATE_OBJ (Excel.Application.5);
OLE2.SET_PROPERTY (obj, row, 4);
OLE2.SET_PROPERTY (obj, column, 2);
OLE2.SET_PROPERTY (obj, Insert, Hello, World.);
8 44
ORA_FFI.FFI_ERROR
Syntax:
Description:
EXCEPTION ORA_FFI_ERROR;
This exeption is raised when an error occurs while using the ORA_FFI
package.
ORA_FFI.FIND_FUNCTION
Syntax:
FUNCTION ORA_FFI.FIND_FUNCTION
(libHandle libHandleType,
funcname
VARCHAR2)
RETURN funcHandleType;
FUNCTION ORA_FFI.FIND_FUNCTION
(libname
VARCHAR2,
funcname VARCHAR2)
RETURN funcHandleType;
Parameters:
Returns:
Description:
See Also:
libHandle
funcname
libname
8 45
ORA_FFI.FFI_ERROR
Syntax:
Description:
EXCEPTION ORA_FFI_ERROR;
This exeption is raised when an error occurs while using the ORA_FFI
package.
ORA_FFI.FIND_FUNCTION
Syntax:
FUNCTION ORA_FFI.FIND_FUNCTION
(libHandle libHandleType,
funcname
VARCHAR2)
RETURN funcHandleType;
FUNCTION ORA_FFI.FIND_FUNCTION
(libname
VARCHAR2,
funcname VARCHAR2)
RETURN funcHandleType;
Parameters:
Returns:
Description:
See Also:
libHandle
funcname
libname
8 45
ORA_FFI.FIND_LIBRARY
Syntax:
Parameters:
Returns:
Description:
See Also:
FUNCTION ORA_FFI.FIND_LIBRARY
(libname VARCHAR2)
RETURN libHandleType;
libname
ORA_FFI.FUNCHANDLETYPE
Syntax:
Description:
8 46
TYPE ORA_FFI.FUNCHANDLETYPE;
ORA_FFI.FIND_LIBRARY
Syntax:
Parameters:
Returns:
Description:
See Also:
FUNCTION ORA_FFI.FIND_LIBRARY
(libname VARCHAR2)
RETURN libHandleType;
libname
ORA_FFI.FUNCHANDLETYPE
Syntax:
Description:
8 46
TYPE ORA_FFI.FUNCHANDLETYPE;
ORA_FFI.GENERATE_FOREIGN
Syntax:
PROCEDURE ORA_FFI.GENERATE_FOREIGN
(handle libHandleType);
PROCEDURE ORA_FFI.GENERATE_FOREIGN
(handle libHandleType,
pkgname VARCHAR2);
Parameters:
Description:
handle
pkgname
ORA_FFI.IS_NULL_PTR
Syntax:
FUNCTION ORA_FFI.IS_NULL_PTR
(handle libHandleType)
RETURN BOOLEAN;
FUNCTION ORA_FFI.IS_NULL_PTR
(handle funcHandleType)
RETURN BOOLEAN;
FUNCTION ORA_FFI.IS_NULL_PTR
(handle pointerType)
RETURN BOOLEAN;
Parameters:
handle
Returns:
TRUE
FALSE
Description:
8 47
ORA_FFI.GENERATE_FOREIGN
Syntax:
PROCEDURE ORA_FFI.GENERATE_FOREIGN
(handle libHandleType);
PROCEDURE ORA_FFI.GENERATE_FOREIGN
(handle libHandleType,
pkgname VARCHAR2);
Parameters:
Description:
handle
pkgname
ORA_FFI.IS_NULL_PTR
Syntax:
FUNCTION ORA_FFI.IS_NULL_PTR
(handle libHandleType)
RETURN BOOLEAN;
FUNCTION ORA_FFI.IS_NULL_PTR
(handle funcHandleType)
RETURN BOOLEAN;
FUNCTION ORA_FFI.IS_NULL_PTR
(handle pointerType)
RETURN BOOLEAN;
Parameters:
handle
Returns:
TRUE
FALSE
Description:
8 47
ORA_FFI.LIBHANDLETYPE
Syntax:
Description:
TYPE ORA_FFI.LIBHANDLETYPE;
ORA_FFI.POINTERTYPE
Syntax:
Description:
TYPE ORA_FFI.POINTERTYPE;
ORA_FFI.REGISTER_FUNCTION
Syntax:
Parameters:
FUNCTION ORA_FFI.REGISTER_FUNCTION
(libHandle libHandleType,
funcname
VARCHAR2,
callstd
PLS_INTEGER
:= C_STD)
RETURN funcHandleType;
libHandle
funcname
callstd
Returns:
Description:
See Also:
8 48
ORA_FFI.LIBHANDLETYPE
Syntax:
Description:
TYPE ORA_FFI.LIBHANDLETYPE;
ORA_FFI.POINTERTYPE
Syntax:
Description:
TYPE ORA_FFI.POINTERTYPE;
ORA_FFI.REGISTER_FUNCTION
Syntax:
Parameters:
FUNCTION ORA_FFI.REGISTER_FUNCTION
(libHandle libHandleType,
funcname
VARCHAR2,
callstd
PLS_INTEGER
:= C_STD)
RETURN funcHandleType;
libHandle
funcname
callstd
Returns:
Description:
See Also:
8 48
ORA_FFI.LOAD_LIBRARY
Syntax:
Parameters:
Returns:
Description:
FUNCTION ORA_FFI.LOAD_LIBRARY
(dirname VARCHAR2,
libname VARCHAR2)
RETURN libHandleType;
dirname
libname
8 49
ORA_FFI.LOAD_LIBRARY
Syntax:
Parameters:
Returns:
Description:
FUNCTION ORA_FFI.LOAD_LIBRARY
(dirname VARCHAR2,
libname VARCHAR2)
RETURN libHandleType;
dirname
libname
8 49
ORA_FFI.REGISTER_PARAMETER
Syntax:
Parameters:
PROCEDURE ORA_FFI.REGISTER_PARAMETER
(funcHandle funcHandleType,
cargtype PLS_INTEGER);
funcHandle
cargtype
Description:
See Also:
8 50
ORA_FFI.REGISTER_PARAMETER
Syntax:
Parameters:
PROCEDURE ORA_FFI.REGISTER_PARAMETER
(funcHandle funcHandleType,
cargtype PLS_INTEGER);
funcHandle
cargtype
Description:
See Also:
8 50
ORA_FFI.REGISTER_RETURN
Syntax:
Parameters:
PROCEDURE ORA_FFI.REGISTER_RETURN
(funcHandle funcHandleType,
creturntype PLS_INTEGER);
funcHandle
creturntype
Description:
See Also:
8 51
ORA_FFI.REGISTER_RETURN
Syntax:
Parameters:
PROCEDURE ORA_FFI.REGISTER_RETURN
(funcHandle funcHandleType,
creturntype PLS_INTEGER);
funcHandle
creturntype
Description:
See Also:
8 51
ORA_FFI.UNLOAD_LIBARARY
Syntax:
Parameters:
Description:
8 52
PROCEDURE ORA_FFI.UNLOAD_LIBRARY
(libHandle libHandleType);
libHandle
ORA_FFI.UNLOAD_LIBARARY
Syntax:
Parameters:
Description:
8 52
PROCEDURE ORA_FFI.UNLOAD_LIBRARY
(libHandle libHandleType);
libHandle
ORA_NLS.AMERICAN
Syntax:
Returns:
Description:
FUNCTION ORA_NLS.AMERICAN
RETURN BOOLEAN;
TRUE or FALSE.
This function returns TRUE or FALSE, depending on whether the
current character set is American.
ORA_NLS.AMERICAN_DATE
Syntax:
Returns:
Description:
FUNCTION ORA_NLS.AMERICAN_DATE
RETURN BOOLEAN;
TRUE or FALSE.
This function returns TRUE or FALSE, depending on whether the
current date format is American.
8 53
ORA_NLS.AMERICAN
Syntax:
Returns:
Description:
FUNCTION ORA_NLS.AMERICAN
RETURN BOOLEAN;
TRUE or FALSE.
This function returns TRUE or FALSE, depending on whether the
current character set is American.
ORA_NLS.AMERICAN_DATE
Syntax:
Returns:
Description:
FUNCTION ORA_NLS.AMERICAN_DATE
RETURN BOOLEAN;
TRUE or FALSE.
This function returns TRUE or FALSE, depending on whether the
current date format is American.
8 53
ORA_NLS.BAD_ATTRIBUTE
Syntax:
Description:
See Also:
ORA_NLS.BAD_ATTRIBUTE EXCEPTION;
ORA_NLS.GET_LANG_SCALAR
Syntax:
Parameters:
Returns:
Description:
FUNCTION ORA_NLS.GET_LANG_SCALAR
(attribute PLS_INTEGER)
RETURN NUMBER;
attribute
A number.
This function returns the requested information about the current
language. You can use GET_LANG_SCALAR to retrieve numeric data.
See Also:
ORA_NLS.GET_LANG_STR
Example:
Suppose you wanted to print the number of the current ISO alphabet.
You could add to your subprogram the following statement using
ORA_NLS.GET_LANG_SCALAR:
TEXT_IO.PUT_LINE(ORA_NLS.GET_LANG_SCALAR
(ORA_NLS.ISO_ALPHABET));
8 54
ORA_NLS.BAD_ATTRIBUTE
Syntax:
Description:
See Also:
ORA_NLS.BAD_ATTRIBUTE EXCEPTION;
ORA_NLS.GET_LANG_SCALAR
Syntax:
Parameters:
Returns:
Description:
FUNCTION ORA_NLS.GET_LANG_SCALAR
(attribute PLS_INTEGER)
RETURN NUMBER;
attribute
A number.
This function returns the requested information about the current
language. You can use GET_LANG_SCALAR to retrieve numeric data.
See Also:
ORA_NLS.GET_LANG_STR
Example:
Suppose you wanted to print the number of the current ISO alphabet.
You could add to your subprogram the following statement using
ORA_NLS.GET_LANG_SCALAR:
TEXT_IO.PUT_LINE(ORA_NLS.GET_LANG_SCALAR
(ORA_NLS.ISO_ALPHABET));
8 54
ORA_NLS.GET_LANG_STR
Syntax:
Parameters:
Returns:
Description:
FUNCTION ORA_NLS.GET_LANG_STR
(attribute PLS_INTEGER)
RETURN VARCHAR2;
attribute
A character value.
This function returns the requested information about the current
language. You can use GET_LANG_STR to retrieve character
information.
See Also:
ORA_NLS.GET_LANG_SCALAR
Example:
Suppose you want to print the name of the current language. You
could add to your subprogram the following statement using
ORA_NLS.GET_LANG_STR:
TEXT_IO.PUT(ORA_NLS.GET_LANG_STR(ORA_NLS.LANGUAGE));
ORA_NLS.LINGUISTIC_COLLATE
Syntax:
Returns:
Description:
FUNCTION ORA_NLS.LINGUISTIC_COLLATE
RETURN BOOLEAN;
TRUE or FALSE.
This function returns TRUE or FALSE, depending on whether the
characters in the current character set need to be collated according to
special linguistic information. If this function returns TRUE, a binary
sort of two characters will not necessarily return the correct value. This
is because encoding schemes for character sets do not necessarily
define all characters in ascending numerical order.
In addition, the sort position of a character may vary for different
languages. For example, an is sorted before b in German, but
after z in Swedish.
8 55
ORA_NLS.GET_LANG_STR
Syntax:
Parameters:
Returns:
Description:
FUNCTION ORA_NLS.GET_LANG_STR
(attribute PLS_INTEGER)
RETURN VARCHAR2;
attribute
A character value.
This function returns the requested information about the current
language. You can use GET_LANG_STR to retrieve character
information.
See Also:
ORA_NLS.GET_LANG_SCALAR
Example:
Suppose you want to print the name of the current language. You
could add to your subprogram the following statement using
ORA_NLS.GET_LANG_STR:
TEXT_IO.PUT(ORA_NLS.GET_LANG_STR(ORA_NLS.LANGUAGE));
ORA_NLS.LINGUISTIC_COLLATE
Syntax:
Returns:
Description:
FUNCTION ORA_NLS.LINGUISTIC_COLLATE
RETURN BOOLEAN;
TRUE or FALSE.
This function returns TRUE or FALSE, depending on whether the
characters in the current character set need to be collated according to
special linguistic information. If this function returns TRUE, a binary
sort of two characters will not necessarily return the correct value. This
is because encoding schemes for character sets do not necessarily
define all characters in ascending numerical order.
In addition, the sort position of a character may vary for different
languages. For example, an is sorted before b in German, but
after z in Swedish.
8 55
ORA_NLS.LINGUISTIC_SPECIALS
Syntax:
Returns:
Description:
FUNCTION ORA_NLS.LINGUISTIC_SPECIALS
RETURN BOOLEAN;
TRUE or FALSE.
This function returns true or false, depending on whether there are
linguistic specials in use.
Linguistic specials are language-specific special cases for collation and
case conversion (upper and lower). An example is the uppercase for
the German sharp s (one byte), which is SS (two bytes). Sorting is
also done according to the two-byte value.
Linguistic specials are defined in a linguistic definition along with
normal collation. When there are linguistic specials defined for the
linguistic definition that is in effect for a specific language handle,
output sizes of functions handling linguistic specials can be larger than
input string sizes.
ORA_NLS.MODIFIED_DATE_FMT
Syntax:
Returns:
Description:
8 56
FUNCTION ORA_NLS.MODIFIED_DATE_FMT
RETURN BOOLEAN;
TRUE or FALSE.
This function returns true or false, depending on whether the date
format has been modified.
ORA_NLS.LINGUISTIC_SPECIALS
Syntax:
Returns:
Description:
FUNCTION ORA_NLS.LINGUISTIC_SPECIALS
RETURN BOOLEAN;
TRUE or FALSE.
This function returns true or false, depending on whether there are
linguistic specials in use.
Linguistic specials are language-specific special cases for collation and
case conversion (upper and lower). An example is the uppercase for
the German sharp s (one byte), which is SS (two bytes). Sorting is
also done according to the two-byte value.
Linguistic specials are defined in a linguistic definition along with
normal collation. When there are linguistic specials defined for the
linguistic definition that is in effect for a specific language handle,
output sizes of functions handling linguistic specials can be larger than
input string sizes.
ORA_NLS.MODIFIED_DATE_FMT
Syntax:
Returns:
Description:
8 56
FUNCTION ORA_NLS.MODIFIED_DATE_FMT
RETURN BOOLEAN;
TRUE or FALSE.
This function returns true or false, depending on whether the date
format has been modified.
ORA_NLS.NO_ITEM
Syntax:
Description:
ORA_NLS.NO_ITEM EXCEPTION;
ORA_NLS.NOT_FOUND
Syntax:
Description:
See Also:
ORA_NLS.NOT_FOUND EXCEPTION;
ORA_NLS.RIGHT_TO_LEFT
Syntax:
Returns:
Description:
FUNCTION ORA_NLS.RIGHT_TO_LEFT
RETURN BOOLEAN;
TRUE or FALSE.
This function returns true or false, depending on whether the writing
direction of the current language is righttoleft.
8 57
ORA_NLS.NO_ITEM
Syntax:
Description:
ORA_NLS.NO_ITEM EXCEPTION;
ORA_NLS.NOT_FOUND
Syntax:
Description:
See Also:
ORA_NLS.NOT_FOUND EXCEPTION;
ORA_NLS.RIGHT_TO_LEFT
Syntax:
Returns:
Description:
FUNCTION ORA_NLS.RIGHT_TO_LEFT
RETURN BOOLEAN;
TRUE or FALSE.
This function returns true or false, depending on whether the writing
direction of the current language is righttoleft.
8 57
ORA_NLS.SIMPLE_CS
Syntax:
Returns:
Description:
FUNCTION ORA_NLS.SIMPLE_CS
RETURN BOOLEAN;
TRUE or FALSE.
This function returns true or false, depending on whether the current
character set is simple (i.e., single-byte, no special characters, no special
handling).
ORA_NLS.SINGLE_BYTE
Syntax:
Returns:
FUNCTION ORA_NLS.SINGLE_BYTE
RETURN BOOLEAN;
TRUE or FALSE.
Description:
ORA_NLS Constants
Character Constants
8 58
name
description
integer
ORA_NLS.SIMPLE_CS
Syntax:
Returns:
Description:
FUNCTION ORA_NLS.SIMPLE_CS
RETURN BOOLEAN;
TRUE or FALSE.
This function returns true or false, depending on whether the current
character set is simple (i.e., single-byte, no special characters, no special
handling).
ORA_NLS.SINGLE_BYTE
Syntax:
Returns:
FUNCTION ORA_NLS.SINGLE_BYTE
RETURN BOOLEAN;
TRUE or FALSE.
Description:
ORA_NLS Constants
Character Constants
8 58
name
description
integer
Name
Description
Integer
Value
day1
sunday
day2
monday
day3
tuesday
day4
wednesday
day5
thursday
day6
friday
day7
saturday
day1_abbr
sun
day2_abbr
mon
day3_abbr
10
tue
day4_abbr
11
wed
day5_abbr
12
thu
day6_abbr
13
fri
day7_abbr
14
sat
mon1
15
january
mon2
16
february
mon3
17
march
mon4
18
april
mon5
19
may
mon6
20
june
mon7
21
july
mon8
22
august
mon9
23
september
mon10
24
october
mon11
25
november
mon12
26
december
mon1_abbr
27
jan
mon2_abbr
28
feb
mon3_abbr
29
mar
mon4_abbr
30
apr
mon5_abbr
31
may
8 59
Name
Description
Integer
Value
day1
sunday
day2
monday
day3
tuesday
day4
wednesday
day5
thursday
day6
friday
day7
saturday
day1_abbr
sun
day2_abbr
mon
day3_abbr
10
tue
day4_abbr
11
wed
day5_abbr
12
thu
day6_abbr
13
fri
day7_abbr
14
sat
mon1
15
january
mon2
16
february
mon3
17
march
mon4
18
april
mon5
19
may
mon6
20
june
mon7
21
july
mon8
22
august
mon9
23
september
mon10
24
october
mon11
25
november
mon12
26
december
mon1_abbr
27
jan
mon2_abbr
28
feb
mon3_abbr
29
mar
mon4_abbr
30
apr
mon5_abbr
31
may
8 59
8 60
Name
Description
Integer
Value
mon6_abbr
32
jun
mon7_abbr
33
jul
mon8_abbr
34
aug
mon9_abbr
35
sep
mon10_abbr
36
oct
mon11_abbr
37
nov
mon12_abbr
38
dec
yes_str
39
yes
no_str
40
no
am_str
Local equivalent of AM
41
am
pm_str
Local equivalent of PM
42
pm
ad_str
Local equivalent of AD
43
ad
bc_str
Local equivalent of BC
44
bc
decimal
Decimal character
45
groupsep
Group separator
46
int_currency
47
USD
local_currency
48
local_date_fmt
49
%m/%d/%y
local_time_fmt
50
%H:%M:%S
default_date_fmt
51
DDMONYY
default_time_fmt
52
HH.MI.SS AM
language
Language name
53
AMERICAN
language_abbr
54
US
character_set
55
US7ASCII
territory
56
AMERICA
current_decimal
57
current_groupsep
58
current_currency
59
current_date_fmt
60
DDMONYY
current_language
Current language
70
8 60
Name
Description
Integer
Value
mon6_abbr
32
jun
mon7_abbr
33
jul
mon8_abbr
34
aug
mon9_abbr
35
sep
mon10_abbr
36
oct
mon11_abbr
37
nov
mon12_abbr
38
dec
yes_str
39
yes
no_str
40
no
am_str
Local equivalent of AM
41
am
pm_str
Local equivalent of PM
42
pm
ad_str
Local equivalent of AD
43
ad
bc_str
Local equivalent of BC
44
bc
decimal
Decimal character
45
groupsep
Group separator
46
int_currency
47
USD
local_currency
48
local_date_fmt
49
%m/%d/%y
local_time_fmt
50
%H:%M:%S
default_date_fmt
51
DDMONYY
default_time_fmt
52
HH.MI.SS AM
language
Language name
53
AMERICAN
language_abbr
54
US
character_set
55
US7ASCII
territory
56
AMERICA
current_decimal
57
current_groupsep
58
current_currency
59
current_date_fmt
60
DDMONYY
current_language
Current language
70
Name
Description
Integer
Value
current_territory
Current territory
61
US
current_character_set
62
US7ASCII
Numeric Constants
Description
Integer
decimal_places
63
sign_placement
64
initcap_month
65
initcap_day
66
week_start
67
week_num_calc
68
iso_alphabet
69
8 61
Name
Description
Integer
Value
current_territory
Current territory
61
US
current_character_set
62
US7ASCII
Numeric Constants
Description
Integer
decimal_places
63
sign_placement
64
initcap_month
65
initcap_day
66
week_start
67
week_num_calc
68
iso_alphabet
69
8 61
ORA_PROF.BAD_TIMER
Syntax:
Description:
See Also:
ORA_PROF.BAD_TIMER EXCEPTION;
ORA_PROF.CREATE_TIMER
Syntax:
Parameters:
Description:
PROCEDURE ORA_PROF.CREATE_TIMER
(timer VARCHAR2);
timer
This procedure allocates the named timer. Any references to the named
timer before this service is used will raise an error.
See Also:
ORA_PROF.DESTROY_TIMER, ORA_PROF.ELAPSED_TIME,
ORA_PROF.RESET_TIMER, ORA_PROF.START_TIMER,
ORA_PROF.STOP_TIMER
Example:
8 62
ORA_PROF.BAD_TIMER
Syntax:
Description:
See Also:
ORA_PROF.BAD_TIMER EXCEPTION;
ORA_PROF.CREATE_TIMER
Syntax:
Parameters:
Description:
PROCEDURE ORA_PROF.CREATE_TIMER
(timer VARCHAR2);
timer
This procedure allocates the named timer. Any references to the named
timer before this service is used will raise an error.
See Also:
ORA_PROF.DESTROY_TIMER, ORA_PROF.ELAPSED_TIME,
ORA_PROF.RESET_TIMER, ORA_PROF.START_TIMER,
ORA_PROF.STOP_TIMER
Example:
8 62
ORA_PROF.DESTROY_TIMER
Syntax:
Parameters:
Description:
PROCEDURE ORA_PROF.DESTROY_TIMER
(timer VARCHAR2);
timer
This procedure destroys the named timer. All memory associated with
the timer is freed at that time. Any references to the named timer after
this service is used will raise an error.
See Also:
ORA_PROF.CREATE_TIMER, ORA_PROF.ELAPSED_TIME,
ORA_PROF.RESET_TIMER, ORA_PROF.START_TIMER,
ORA_PROF.STOP_TIMER
Example:
8 63
ORA_PROF.DESTROY_TIMER
Syntax:
Parameters:
Description:
PROCEDURE ORA_PROF.DESTROY_TIMER
(timer VARCHAR2);
timer
This procedure destroys the named timer. All memory associated with
the timer is freed at that time. Any references to the named timer after
this service is used will raise an error.
See Also:
ORA_PROF.CREATE_TIMER, ORA_PROF.ELAPSED_TIME,
ORA_PROF.RESET_TIMER, ORA_PROF.START_TIMER,
ORA_PROF.STOP_TIMER
Example:
8 63
ORA_PROF.ELAPSED_TIME
Syntax:
Parameters:
Returns:
Description:
FUNCTION ORA_PROF.ELAPSED_TIME
(timer PLS_INTEGER)
RETURN PLS_INTEGER;
timer
See Also:
ORA_PROF.CREATE_TIMER, ORA_PROF.DESTROY_TIMER,
ORA_PROF.RESET_TIMER, ORA_PROF.START_TIMER,
ORA_PROF.STOP_TIMER
Example:
8 64
ORA_PROF.ELAPSED_TIME
Syntax:
Parameters:
Returns:
Description:
FUNCTION ORA_PROF.ELAPSED_TIME
(timer PLS_INTEGER)
RETURN PLS_INTEGER;
timer
See Also:
ORA_PROF.CREATE_TIMER, ORA_PROF.DESTROY_TIMER,
ORA_PROF.RESET_TIMER, ORA_PROF.START_TIMER,
ORA_PROF.STOP_TIMER
Example:
8 64
ORA_PROF.RESET_TIMER
Syntax:
Parameters:
Description:
PROCEDURE ORA_PROF.RESET_TIMER
(timer VARCHAR2);
timer
See Also:
ORA_PROF.CREATE_TIMER, ORA_PROF.DESTROY_TIMER,
ORA_PROF.ELAPSED_TIME, ORA_PROF.START_TIMER,
ORA_PROF.STOP_TIMER
Example:
Suppose you wanted to track the amount of time spent in several parts
of a procedure. You could track this time usage by adding the
ORA_PROF.START_TIMER and ORA_PROF.STOP_TIMER calls to
your procedure.
PL/SQL> PROCEDURE multi_time IS
+>
i PLS_INTEGER;
+> BEGIN
+>
ORA_PROF.CREATE_TIMER(loop);
+>
+>
First loop...
+>
+>
ORA_PROF.START_TIMER(loop);
+>
FOR i IN 1..10 LOOP
+>
TEXT_IO.PUT_LINE(Hello);
+>
END LOOP;
+>
ORA_PROF.STOP_TIMER(loop);
+>
+>
Second loop...
+>
+>
ORA_PROF.START_TIMER(loop);
+>
FOR i IN 1..10 LOOP
+>
TEXT_IO.PUT_LINE(Hello);
+>
END LOOP;
+>
ORA_PROF.STOP_TIMER(loop);
+>
ORA_PROF.DESTROY_TIMER(loop);
+> END;
8 65
ORA_PROF.RESET_TIMER
Syntax:
Parameters:
Description:
PROCEDURE ORA_PROF.RESET_TIMER
(timer VARCHAR2);
timer
See Also:
ORA_PROF.CREATE_TIMER, ORA_PROF.DESTROY_TIMER,
ORA_PROF.ELAPSED_TIME, ORA_PROF.START_TIMER,
ORA_PROF.STOP_TIMER
Example:
Suppose you wanted to track the amount of time spent in several parts
of a procedure. You could track this time usage by adding the
ORA_PROF.START_TIMER and ORA_PROF.STOP_TIMER calls to
your procedure.
PL/SQL> PROCEDURE multi_time IS
+>
i PLS_INTEGER;
+> BEGIN
+>
ORA_PROF.CREATE_TIMER(loop);
+>
+>
First loop...
+>
+>
ORA_PROF.START_TIMER(loop);
+>
FOR i IN 1..10 LOOP
+>
TEXT_IO.PUT_LINE(Hello);
+>
END LOOP;
+>
ORA_PROF.STOP_TIMER(loop);
+>
+>
Second loop...
+>
+>
ORA_PROF.START_TIMER(loop);
+>
FOR i IN 1..10 LOOP
+>
TEXT_IO.PUT_LINE(Hello);
+>
END LOOP;
+>
ORA_PROF.STOP_TIMER(loop);
+>
ORA_PROF.DESTROY_TIMER(loop);
+> END;
8 65
ORA_PROF.START_TIMER
Syntax:
Parameters:
Description:
PROCEDURE ORA_PROF.START_TIMER
(timer VARCHAR2);
timer
See Also:
ORA_PROF.CREATE_TIMER, ORA_PROF.DESTROY_TIMER,
ORA_PROF.ELAPSED_TIME, ORA_PROF.RESET_TIMER,
ORA_PROF.STOP_TIMER
Example:
Suppose you wanted to track the amount of time spent in several parts
of a procedure. You could track this time usage by adding the
ORA_PROF.START_TIMER and ORA_PROF.STOP_TIMER calls to
your procedure.
PL/SQL> PROCEDURE multi_time IS
+>
i PLS_INTEGER;
+> BEGIN
+>
ORA_PROF.CREATE_TIMER(loop);
+>
+>
First loop...
+>
+>
ORA_PROF.START_TIMER(loop);
+>
FOR i IN 1..10 LOOP
+>
TEXT_IO.PUT_LINE(Hello);
+>
END LOOP;
+>
ORA_PROF.STOP_TIMER(loop);
+>
+>
Second loop...
+>
+>
ORA_PROF.START_TIMER(loop);
+>
FOR i IN 1..10 LOOP
+>
TEXT_IO.PUT_LINE(Hello);
+>
END LOOP;
+>
ORA_PROF.STOP_TIMER(loop);
+>
ORA_PROF.DESTROY_TIMER(loop);
+> END;
8 66
ORA_PROF.START_TIMER
Syntax:
Parameters:
Description:
PROCEDURE ORA_PROF.START_TIMER
(timer VARCHAR2);
timer
See Also:
ORA_PROF.CREATE_TIMER, ORA_PROF.DESTROY_TIMER,
ORA_PROF.ELAPSED_TIME, ORA_PROF.RESET_TIMER,
ORA_PROF.STOP_TIMER
Example:
Suppose you wanted to track the amount of time spent in several parts
of a procedure. You could track this time usage by adding the
ORA_PROF.START_TIMER and ORA_PROF.STOP_TIMER calls to
your procedure.
PL/SQL> PROCEDURE multi_time IS
+>
i PLS_INTEGER;
+> BEGIN
+>
ORA_PROF.CREATE_TIMER(loop);
+>
+>
First loop...
+>
+>
ORA_PROF.START_TIMER(loop);
+>
FOR i IN 1..10 LOOP
+>
TEXT_IO.PUT_LINE(Hello);
+>
END LOOP;
+>
ORA_PROF.STOP_TIMER(loop);
+>
+>
Second loop...
+>
+>
ORA_PROF.START_TIMER(loop);
+>
FOR i IN 1..10 LOOP
+>
TEXT_IO.PUT_LINE(Hello);
+>
END LOOP;
+>
ORA_PROF.STOP_TIMER(loop);
+>
ORA_PROF.DESTROY_TIMER(loop);
+> END;
8 66
ORA_PROF.STOP_TIMER
Syntax:
Parameters:
Description:
PROCEDURE ORA_PROF.STOP_TIMER
(timer VARCHAR2);
timer
See Also:
ORA_PROF.CREATE_TIMER, ORA_PROF.DESTROY_TIMER,
ORA_PROF.ELAPSED_TIME, ORA_PROF.RESET_TIMER,
ORA_PROF.STOP_TIMER
Example:
Suppose you wanted to track the amount of time spent in several parts
of a procedure. You could track this time usage by adding the
ORA_PROF.START_TIMER and ORA_PROF.STOP_TIMER calls to
your procedure.
PL/SQL> PROCEDURE multi_time IS
+>
i PLS_INTEGER;
+> BEGIN
+>
ORA_PROF.CREATE_TIMER(loop);
+>
+>
First loop...
+>
+>
ORA_PROF.START_TIMER(loop);
+>
FOR i IN 1..10 LOOP
+>
TEXT_IO.PUT_LINE(Hello);
+>
END LOOP;
+>
ORA_PROF.STOP_TIMER(loop);
+>
+>
Second loop...
+>
+>
ORA_PROF.START_TIMER(loop);
+>
FOR i IN 1..10 LOOP
+>
TEXT_IO.PUT_LINE(Hello);
+>
END LOOP;
+>
ORA_PROF.STOP_TIMER(loop);
+>
ORA_PROF.DESTROY_TIMER(loop);
+> END;
8 67
ORA_PROF.STOP_TIMER
Syntax:
Parameters:
Description:
PROCEDURE ORA_PROF.STOP_TIMER
(timer VARCHAR2);
timer
See Also:
ORA_PROF.CREATE_TIMER, ORA_PROF.DESTROY_TIMER,
ORA_PROF.ELAPSED_TIME, ORA_PROF.RESET_TIMER,
ORA_PROF.STOP_TIMER
Example:
Suppose you wanted to track the amount of time spent in several parts
of a procedure. You could track this time usage by adding the
ORA_PROF.START_TIMER and ORA_PROF.STOP_TIMER calls to
your procedure.
PL/SQL> PROCEDURE multi_time IS
+>
i PLS_INTEGER;
+> BEGIN
+>
ORA_PROF.CREATE_TIMER(loop);
+>
+>
First loop...
+>
+>
ORA_PROF.START_TIMER(loop);
+>
FOR i IN 1..10 LOOP
+>
TEXT_IO.PUT_LINE(Hello);
+>
END LOOP;
+>
ORA_PROF.STOP_TIMER(loop);
+>
+>
Second loop...
+>
+>
ORA_PROF.START_TIMER(loop);
+>
FOR i IN 1..10 LOOP
+>
TEXT_IO.PUT_LINE(Hello);
+>
END LOOP;
+>
ORA_PROF.STOP_TIMER(loop);
+>
ORA_PROF.DESTROY_TIMER(loop);
+> END;
8 67
output (write)
operations
input (read)
operations
TEXT_IO.FCLOSE
Syntax:
Parameters:
Description:
PROCEDURE TEXT_IO.FCLOSE
(file file_type);
file
See Also:
Example:
Suppose you have a procedure that closes the file specified by variable
out_file. You could include the following PL/SQL statement using
TEXT_IO.FCLOSE:
TEXT_IO.FCLOSE(out_file);
8 68
output (write)
operations
input (read)
operations
TEXT_IO.FCLOSE
Syntax:
Parameters:
Description:
PROCEDURE TEXT_IO.FCLOSE
(file file_type);
file
See Also:
Example:
Suppose you have a procedure that closes the file specified by variable
out_file. You could include the following PL/SQL statement using
TEXT_IO.FCLOSE:
TEXT_IO.FCLOSE(out_file);
8 68
TEXT_IO.FILE_TYPE
Syntax:
Description:
TYPE TEXT_IO.FILE_TYPE;
See Also:
Example:
TEXT_IO.FOPEN
Syntax:
Parameters:
FUNCTION TEXT_IO.FOPEN
VARCHAR2,
(spec
filemode VARCHAR2)
RETURN TEXT_IO.FILE_TYPE;
spec
filemode
W
Open the file for reading and writing after
deleting all existing lines in the file.
A
Open the file for reading and writing without
deleting existing lines (i.e., appending).
Returns:
Description:
See Also:
8 69
TEXT_IO.FILE_TYPE
Syntax:
Description:
TYPE TEXT_IO.FILE_TYPE;
See Also:
Example:
TEXT_IO.FOPEN
Syntax:
Parameters:
FUNCTION TEXT_IO.FOPEN
VARCHAR2,
(spec
filemode VARCHAR2)
RETURN TEXT_IO.FILE_TYPE;
spec
filemode
W
Open the file for reading and writing after
deleting all existing lines in the file.
A
Open the file for reading and writing without
deleting existing lines (i.e., appending).
Returns:
Description:
See Also:
8 69
Example:
Suppose you have a procedure that reads data from one file and then
writes data to another file. To do this, you must declare and assign the
variables in_file and out_file to two files, salary.txt and bonus.txt,
respectively. You could include the following PL/SQL statements
using TEXT_IO.FOPEN:
in_file
out_file
in_file
out_file
TEXT_IO.FILE_TYPE;
TEXT_IO.FILE_TYPE;
:= TEXT_IO.FOPEN(salary.txt, r);
:= TEXT_IO.FOPEN(bonus.txt, w);
TEXT_IO.IS_OPEN
Syntax:
Parameters:
Returns:
Description:
FUNCTION TEXT_IO.IS_OPEN
(file file_type)
RETURN BOOLEAN;
file
TRUE or FALSE.
This function checks to see if the specified file is currently open.
See Also:
Example:
Suppose you have a procedure that checks whether the file specified by
out_file is currently open, and if it is closes it. You could include the
following PL/SQL statement using TEXT_IO.IS_OPEN:
IF TEXT_IO.IS_OPEN(out_file) THEN
TEXT_IO.FCLOSE(out_file);
8 70
Example:
Suppose you have a procedure that reads data from one file and then
writes data to another file. To do this, you must declare and assign the
variables in_file and out_file to two files, salary.txt and bonus.txt,
respectively. You could include the following PL/SQL statements
using TEXT_IO.FOPEN:
in_file
out_file
in_file
out_file
TEXT_IO.FILE_TYPE;
TEXT_IO.FILE_TYPE;
:= TEXT_IO.FOPEN(salary.txt, r);
:= TEXT_IO.FOPEN(bonus.txt, w);
TEXT_IO.IS_OPEN
Syntax:
Parameters:
Returns:
Description:
FUNCTION TEXT_IO.IS_OPEN
(file file_type)
RETURN BOOLEAN;
file
TRUE or FALSE.
This function checks to see if the specified file is currently open.
See Also:
Example:
Suppose you have a procedure that checks whether the file specified by
out_file is currently open, and if it is closes it. You could include the
following PL/SQL statement using TEXT_IO.IS_OPEN:
IF TEXT_IO.IS_OPEN(out_file) THEN
TEXT_IO.FCLOSE(out_file);
8 70
TEXT_IO.GET_LINE
Syntax:
Parameters:
Description:
PROCEDURE TEXT_IO.GET_LINE
(file file_type,
item OUT VARCHAR2);
file
item
This procedure retrieves the next line of an open file and places it in
item. TEXT_IO.GET_LINE reads characters until a newline character
(i.e., carriage return) is read or an endoffile (EOF) condition is
encountered.
If the line to be read exceeds the size of item, the VALUE_ERROR
exception is raised. If there are no more characters remaining in the
file, the NO_DATA_FOUND exception is raised.
See Also:
Example:
Suppose you have a procedure that declares variables, opens a file, and
reads the first line of an open file into linebuf. You could include the
following PL/SQL statements using TEXT_IO.GET_LINE:
in_file TEXT_IO.FILE_TYPE;
linebuf VARCHAR2(80);
in_file := TEXT_IO.FOPEN(salary.txt, r);
TEXT_IO.GET_LINE(in_file, linebuf);
8 71
TEXT_IO.GET_LINE
Syntax:
Parameters:
Description:
PROCEDURE TEXT_IO.GET_LINE
(file file_type,
item OUT VARCHAR2);
file
item
This procedure retrieves the next line of an open file and places it in
item. TEXT_IO.GET_LINE reads characters until a newline character
(i.e., carriage return) is read or an endoffile (EOF) condition is
encountered.
If the line to be read exceeds the size of item, the VALUE_ERROR
exception is raised. If there are no more characters remaining in the
file, the NO_DATA_FOUND exception is raised.
See Also:
Example:
Suppose you have a procedure that declares variables, opens a file, and
reads the first line of an open file into linebuf. You could include the
following PL/SQL statements using TEXT_IO.GET_LINE:
in_file TEXT_IO.FILE_TYPE;
linebuf VARCHAR2(80);
in_file := TEXT_IO.FOPEN(salary.txt, r);
TEXT_IO.GET_LINE(in_file, linebuf);
8 71
TEXT_IO.NEW_LINE
Syntax:
PROCEDURE TEXT_IO.NEW_LINE
(file file_type,
n
PLS_INTEGER := 1);
PROCEDURE TEXT_IO.NEW_LINE
(n PLS_INTEGER := 1);
Parameters:
Description:
file
Is an integer.
See Also:
Example:
Suppose you have a procedure that writes the current date to the file
specified by out_file, with a newline character at the end and a blank
line appearing below it. You could include the following PL/SQL
statements using TEXT_IO.NEW_LINE:
TEXT_IO.PUT(out_file, SYSDATE);
TEXT_IO.NEW_LINE(out_file, 2);
8 72
TEXT_IO.NEW_LINE
Syntax:
PROCEDURE TEXT_IO.NEW_LINE
(file file_type,
n
PLS_INTEGER := 1);
PROCEDURE TEXT_IO.NEW_LINE
(n PLS_INTEGER := 1);
Parameters:
Description:
file
Is an integer.
See Also:
Example:
Suppose you have a procedure that writes the current date to the file
specified by out_file, with a newline character at the end and a blank
line appearing below it. You could include the following PL/SQL
statements using TEXT_IO.NEW_LINE:
TEXT_IO.PUT(out_file, SYSDATE);
TEXT_IO.NEW_LINE(out_file, 2);
8 72
TEXT_IO.PUT
Syntax:
PROCEDURE TEXT_IO.PUT
(file file_type,
item VARCHAR2);
PROCEDURE TEXT_IO.PUT
(item VARCHAR2);
PROCEDURE TEXT_IO.PUT
(item DATE);
PROCEDURE TEXT_IO.PUT
(file file_type,
item DATE);
PROCEDURE TEXT_IO.PUT
(file file_type,
item NUMBER);
PROCEDURE TEXT_IO.PUT
(item NUMBER);
PROCEDURE TEXT_IO.PUT
(file file_type,
item PLS_INTEGER);
PROCEDURE TEXT_IO.PUT
(item PLS_INTEGER);
Parameters:
Description:
file
item
See Also:
Example:
Suppose you have a procedure that writes the current date and a
newline character to the file specified by out_file, then outputs a
message to the Interpreter. You could include the following PL/SQL
statements using TEXT_IO.PUT:
TEXT_IO.PUT(out_file, SYSDATE);
TEXT_IO.NEW_LINE(out_file);
TEXT_IO.PUT(Processing ends...);
8 73
TEXT_IO.PUT
Syntax:
PROCEDURE TEXT_IO.PUT
(file file_type,
item VARCHAR2);
PROCEDURE TEXT_IO.PUT
(item VARCHAR2);
PROCEDURE TEXT_IO.PUT
(item DATE);
PROCEDURE TEXT_IO.PUT
(file file_type,
item DATE);
PROCEDURE TEXT_IO.PUT
(file file_type,
item NUMBER);
PROCEDURE TEXT_IO.PUT
(item NUMBER);
PROCEDURE TEXT_IO.PUT
(file file_type,
item PLS_INTEGER);
PROCEDURE TEXT_IO.PUT
(item PLS_INTEGER);
Parameters:
Description:
file
item
See Also:
Example:
Suppose you have a procedure that writes the current date and a
newline character to the file specified by out_file, then outputs a
message to the Interpreter. You could include the following PL/SQL
statements using TEXT_IO.PUT:
TEXT_IO.PUT(out_file, SYSDATE);
TEXT_IO.NEW_LINE(out_file);
TEXT_IO.PUT(Processing ends...);
8 73
TEXT_IO.PUTF
Syntax:
PROCEDURE TEXT_IO.PUTF
(arg
VARCHAR2);
PROCEDURE TEXT_IO.PUTF
(file
file_type,
arg
VARCHAR2);
PROCEDURE TEXT_IO.PUTF
file_type,
(file
format VARCHAR2,
[arg1 [,..., arg5] VARCHAR2]);
PROCEDURE TEXT_IO.PUTF
(format VARCHAR2,
[arg1 [,..., arg5] VARCHAR2]);
Parameters:
Description:
arg
format
file
See Also:
Example:
8 74
TEXT_IO.PUTF
Syntax:
PROCEDURE TEXT_IO.PUTF
(arg
VARCHAR2);
PROCEDURE TEXT_IO.PUTF
(file
file_type,
arg
VARCHAR2);
PROCEDURE TEXT_IO.PUTF
file_type,
(file
format VARCHAR2,
[arg1 [,..., arg5] VARCHAR2]);
PROCEDURE TEXT_IO.PUTF
(format VARCHAR2,
[arg1 [,..., arg5] VARCHAR2]);
Parameters:
Description:
arg
format
file
See Also:
Example:
8 74
TEXT_IO.PUT_LINE
Syntax:
Parameters:
Description:
PROCEDURE TEXT_IO.PUT_LINE
(file file_type,
item VARCHAR2);
file
item
See Also:
Example:
Suppose you have a procedure that writes the current date to the file
specified by out_file, then outputs a message to the Interpreter. You
could include the following PL/SQL statements using
TEXT_IO.PUT_LINE:
TEXT_IO.PUT_LINE(out_file,TO_CHAR(SYSDATE));
TEXT_IO.PUT_LINE(Starting test procedures...);
Using TEXT_IO
Constructs
8 75
TEXT_IO.PUT_LINE
Syntax:
Parameters:
Description:
PROCEDURE TEXT_IO.PUT_LINE
(file file_type,
item VARCHAR2);
file
item
See Also:
Example:
Suppose you have a procedure that writes the current date to the file
specified by out_file, then outputs a message to the Interpreter. You
could include the following PL/SQL statements using
TEXT_IO.PUT_LINE:
TEXT_IO.PUT_LINE(out_file,TO_CHAR(SYSDATE));
TEXT_IO.PUT_LINE(Starting test procedures...);
Using TEXT_IO
Constructs
8 75
TOOL_ENV.GETVAR
Syntax:
Parameters:
Description:
Example:
PROCEDURE TOOL_ENV.GETVAR
(varname VARCHAR2,
varvalue VARCHAR2);
varname
varvalue
8 76
TOOL_ENV.GETVAR
Syntax:
Parameters:
Description:
Example:
PROCEDURE TOOL_ENV.GETVAR
(varname VARCHAR2,
varvalue VARCHAR2);
varname
varvalue
8 76
TOOL_ERR.CLEAR
Syntax:
Description:
See Also:
PROCEDURE TOOL_ERR.CLEAR;
TOOL_ERR.CODE
Syntax:
Parameters:
Returns:
FUNCTION TOOL_ERR.CODE
(i PLS_INTEGER := TOPERROR)
RETURN NUMBER;
Description:
This function returns the error code for the ith error on the error stack
(the default is the top-most error). If there are no errors on the stack,
zero is returned.
See Also:
8 77
TOOL_ERR.CLEAR
Syntax:
Description:
See Also:
PROCEDURE TOOL_ERR.CLEAR;
TOOL_ERR.CODE
Syntax:
Parameters:
Returns:
FUNCTION TOOL_ERR.CODE
(i PLS_INTEGER := TOPERROR)
RETURN NUMBER;
Description:
This function returns the error code for the ith error on the error stack
(the default is the top-most error). If there are no errors on the stack,
zero is returned.
See Also:
8 77
TOOL_ERR.ENCODE
Syntax:
Parameters:
Returns:
Description:
See Also:
FUNCTION TOOL_ERR.ENCODE
(prefix VARCHAR2,
offset PLS_INTEGER)
RETURN NUMBER;
prefix
offset
An error code.
This function constructs an error code given a prefix and an offset.
TOOL_ERR.CLEAR, TOOL_ERR.CODE, TOOL_ERR.MESSAGE,
TOOL_ERR.NERRORS, TOOL_ERR.POP, TOOL_ERR.TOOL_ERROR,
TOOL_ERR.TOP_ERROR
TOOL_ERR.MESSAGE
Syntax:
Parameters:
Returns:
Description:
See Also:
8 78
FUNCTION TOOL_ERR.MESSAGE
(i PLS_INTEGER := TOPERROR)
RETURN VARCHAR2;
An error message.
This function returns the formatted message associated with the ith
error on the error stack (the default is the top-most error).
TOOL_ERR.CLEAR, TOOL_ERR.CODE, TOOL_ERR.ENCODE,
TOOL_ERR.NERRORS, TOOL_ERR.POP, TOOL_ERR.TOOL_ERROR,
TOOL_ERR.TOP_ERROR
TOOL_ERR.ENCODE
Syntax:
Parameters:
Returns:
Description:
See Also:
FUNCTION TOOL_ERR.ENCODE
(prefix VARCHAR2,
offset PLS_INTEGER)
RETURN NUMBER;
prefix
offset
An error code.
This function constructs an error code given a prefix and an offset.
TOOL_ERR.CLEAR, TOOL_ERR.CODE, TOOL_ERR.MESSAGE,
TOOL_ERR.NERRORS, TOOL_ERR.POP, TOOL_ERR.TOOL_ERROR,
TOOL_ERR.TOP_ERROR
TOOL_ERR.MESSAGE
Syntax:
Parameters:
Returns:
Description:
See Also:
8 78
FUNCTION TOOL_ERR.MESSAGE
(i PLS_INTEGER := TOPERROR)
RETURN VARCHAR2;
An error message.
This function returns the formatted message associated with the ith
error on the error stack (the default is the top-most error).
TOOL_ERR.CLEAR, TOOL_ERR.CODE, TOOL_ERR.ENCODE,
TOOL_ERR.NERRORS, TOOL_ERR.POP, TOOL_ERR.TOOL_ERROR,
TOOL_ERR.TOP_ERROR
TOOL_ERR.NERRORS
Syntax:
Returns:
FUNCTION TOOL_ERR.NERRORS
RETURN PLS_INTEGER;
Description:
This function returns the number of errors currently on the error stack.
See Also:
TOOL_ERR.POP
Syntax:
Description:
See Also:
PROCEDURE TOOL_ERR.POP;
TOOL_ERR.TOOL_ERROR
Syntax:
Description:
See Also:
TOOL_ERR.TOOL_ERROR EXCEPTION;
This exception defines a generic error you can raise to indicate that one
or more errors have been pushed onto the error stack.
TOOL_ERR.CLEAR, TOOL_ERR.CODE, TOOL_ERR.ENCODE,
TOOL_ERR.MESSAGE, TOOL_ERR.NERRORS, TOOL_ERR.POP,
TOOL_ERR.TOP_ERROR
8 79
TOOL_ERR.NERRORS
Syntax:
Returns:
FUNCTION TOOL_ERR.NERRORS
RETURN PLS_INTEGER;
Description:
This function returns the number of errors currently on the error stack.
See Also:
TOOL_ERR.POP
Syntax:
Description:
See Also:
PROCEDURE TOOL_ERR.POP;
TOOL_ERR.TOOL_ERROR
Syntax:
Description:
See Also:
TOOL_ERR.TOOL_ERROR EXCEPTION;
This exception defines a generic error you can raise to indicate that one
or more errors have been pushed onto the error stack.
TOOL_ERR.CLEAR, TOOL_ERR.CODE, TOOL_ERR.ENCODE,
TOOL_ERR.MESSAGE, TOOL_ERR.NERRORS, TOOL_ERR.POP,
TOOL_ERR.TOP_ERROR
8 79
TOOL_ERR.TOPERROR
Syntax:
Description:
See Also:
Using TOOL_ERR
Constructs
8 80
TOOL_ERR.TOPERROR
Syntax:
Description:
See Also:
Using TOOL_ERR
Constructs
8 80
Building Resource
Files
RESPR21
Use the following syntax when you create strings for the resource file:
Resource resource_name
Type
string
Content
table
{
string string 1 character_count
content of string
}
where:
resource_name
character_count
content of string
8 81
Building Resource
Files
RESPR21
Use the following syntax when you create strings for the resource file:
Resource resource_name
Type
string
Content
table
{
string string 1 character_count
content of string
}
where:
resource_name
character_count
content of string
8 81
Example
8 82
Example
8 82
TOOL_RES.BAD_FILE_HANDLE
Syntax:
Description:
See Also:
TOOL_RES.BAD_FILE_HANDLE EXCEPTION;
TOOL_RES.BUFFER_OVERFLOW
Syntax:
Description:
See Also:
TOOL_RES.BUFFER_OVERFLOW EXCEPTION;
This exception is raised when you tried to get a resource that was
longer than the supplied buffer.
TOOL_RES.BAD_FILE_HANDLE, TOOL_RES.FILE_NOT_FOUND,
TOOL_RES.NO_RESOURCE, TOOL_RES.RFCLOSE,
TOOL_RES.RFHANDLE, TOOL_RES.RFOPEN, TOOL_RES.RFREAD
8 83
TOOL_RES.BAD_FILE_HANDLE
Syntax:
Description:
See Also:
TOOL_RES.BAD_FILE_HANDLE EXCEPTION;
TOOL_RES.BUFFER_OVERFLOW
Syntax:
Description:
See Also:
TOOL_RES.BUFFER_OVERFLOW EXCEPTION;
This exception is raised when you tried to get a resource that was
longer than the supplied buffer.
TOOL_RES.BAD_FILE_HANDLE, TOOL_RES.FILE_NOT_FOUND,
TOOL_RES.NO_RESOURCE, TOOL_RES.RFCLOSE,
TOOL_RES.RFHANDLE, TOOL_RES.RFOPEN, TOOL_RES.RFREAD
8 83
TOOL_RES.FILE_NOT_FOUND
Syntax:
Description:
See Also:
TOOL_RES.FILE_NOT_FOUND EXCEPTION;
This exception is raised when the specified file cannot be opened, most
likely because of one of the following reasons:
TOOL_RES.BAD_FILE_HANDLE, TOOL_RES.BUFFER_OVERFLOW,
TOOL_RES.NO_RESOURCE, TOOL_RES.RFCLOSE,
TOOL_RES.RFHANDLE, TOOL_RES.RFOPEN, TOOL_RES.RFREAD
TOOL_RES.NO_RESOURCE
Syntax:
8 84
TOOL_RES.NO_RESOURCE EXCEPTION;
Description:
This exception is raised when the named resource could not be found.
If a file was specified, the resource does not exist in that file. If no file
was specified, the resource does not exist in any of the resource files
that are currently open.
See Also:
TOOL_RES.BAD_FILE_HANDLE, TOOL_RES.BUFFER_OVERFLOW,
TOOL_RES.FILE_NOT_FOUND, TOOL_RES.RFCLOSE,
TOOL_RES.RFHANDLE, TOOL_RES.RFOPEN, TOOL_RES.RFREAD
TOOL_RES.FILE_NOT_FOUND
Syntax:
Description:
See Also:
TOOL_RES.FILE_NOT_FOUND EXCEPTION;
This exception is raised when the specified file cannot be opened, most
likely because of one of the following reasons:
TOOL_RES.BAD_FILE_HANDLE, TOOL_RES.BUFFER_OVERFLOW,
TOOL_RES.NO_RESOURCE, TOOL_RES.RFCLOSE,
TOOL_RES.RFHANDLE, TOOL_RES.RFOPEN, TOOL_RES.RFREAD
TOOL_RES.NO_RESOURCE
Syntax:
8 84
TOOL_RES.NO_RESOURCE EXCEPTION;
Description:
This exception is raised when the named resource could not be found.
If a file was specified, the resource does not exist in that file. If no file
was specified, the resource does not exist in any of the resource files
that are currently open.
See Also:
TOOL_RES.BAD_FILE_HANDLE, TOOL_RES.BUFFER_OVERFLOW,
TOOL_RES.FILE_NOT_FOUND, TOOL_RES.RFCLOSE,
TOOL_RES.RFHANDLE, TOOL_RES.RFOPEN, TOOL_RES.RFREAD
TOOL_RES.RFCLOSE
Syntax:
Parameters:
Description:
PROCEDURE TOOL_RES.RFCLOSE
(file rfhandle);
file
Is a file to close.
This procedure closes the specified resource file. All files opened with
TOOL_RES.RFOPEN should be closed using TOOL_RES.RFCLOSE
before quitting the application.
The following exceptions may be raised by RFCLOSE:
BAD_FILE_HANDLE
TOOL_ERR.TOOL_ERROR
See Also:
TOOL_RES.BAD_FILE_HANDLE, TOOL_RES.BUFFER_OVERFLOW,
TOOL_RES.FILE_NOT_FOUND, TOOL_RES.NO_RESOURCE,
TOOL_RES.RFHANDLE, TOOL_RES.RFOPEN, TOOL_RES.RFREAD
Example:
8 85
TOOL_RES.RFCLOSE
Syntax:
Parameters:
Description:
PROCEDURE TOOL_RES.RFCLOSE
(file rfhandle);
file
Is a file to close.
This procedure closes the specified resource file. All files opened with
TOOL_RES.RFOPEN should be closed using TOOL_RES.RFCLOSE
before quitting the application.
The following exceptions may be raised by RFCLOSE:
BAD_FILE_HANDLE
TOOL_ERR.TOOL_ERROR
See Also:
TOOL_RES.BAD_FILE_HANDLE, TOOL_RES.BUFFER_OVERFLOW,
TOOL_RES.FILE_NOT_FOUND, TOOL_RES.NO_RESOURCE,
TOOL_RES.RFHANDLE, TOOL_RES.RFOPEN, TOOL_RES.RFREAD
Example:
8 85
TOOL_RES.RFHANDLE
Syntax:
Description:
TYPE TOOL_RES.RFHANDLE;
See Also:
TOOL_RES.BAD_FILE_HANDLE, TOOL_RES.BUFFER_OVERFLOW,
TOOL_RES.FILE_NOT_FOUND, TOOL_RES.NO_RESOURCE,
TOOL_RES.RFCLOSE, TOOL_RES.RFOPEN, TOOL_RES.RFREAD
Example:
8 86
TOOL_RES.RFHANDLE
Syntax:
Description:
TYPE TOOL_RES.RFHANDLE;
See Also:
TOOL_RES.BAD_FILE_HANDLE, TOOL_RES.BUFFER_OVERFLOW,
TOOL_RES.FILE_NOT_FOUND, TOOL_RES.NO_RESOURCE,
TOOL_RES.RFCLOSE, TOOL_RES.RFOPEN, TOOL_RES.RFREAD
Example:
8 86
TOOL_RES.RFOPEN
Syntax:
Parameters:
Returns:
Description:
FUNCTION TOOL_RES.RFOPEN
(spec VARCHAR2)
RETURN rfhandle;
spec
TOOL_ERR.TOOL_ERROR
See Also:
TOOL_RES.BAD_FILE_HANDLE, TOOL_RES.BUFFER_OVERFLOW,
TOOL_RES.FILE_NOT_FOUND, TOOL_RES.NO_RESOURCE,
TOOL_RES.RFCLOSE, TOOL_RES.RFHANDLE, TOOL_RES.RFREAD
Example:
8 87
TOOL_RES.RFOPEN
Syntax:
Parameters:
Returns:
Description:
FUNCTION TOOL_RES.RFOPEN
(spec VARCHAR2)
RETURN rfhandle;
spec