Devoted exclusively to the Pro*PL/1 Precompiler, this manual supplements the language-independent Oracle Database Programmer's Guide to the Oracle Precompilers. An understanding of the material in the Programmer's Guide is assumed.

This companion book guides you in writing PL/1 programs that use the powerful database language, SQL, to access and manipulate Oracle data. It provides easy-to-follow examples, instructions, and programming tips, as well as several full-length programs to aid your understanding of embedded SQL and demonstrate its usefulness.

This Preface contains these topics:

Intended Audience

The Pro*PL/1 Supplement to the Oracle Precompilers Guide is intended for developers who are either writing new PL/1 applications or converting existing PL/1 applications to run in the Oracle environment. Though written specially for programmers, it will also be of value to systems analysts, project managers, and other Oracle users who are interested in embedded SQL applications.

To use this document, you need familiarity with the following:

Documentation Accessibility

Our goal is to make Oracle products, services, and supporting documentation accessible, with good usability, to the disabled community. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Accessibility standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For more information, visit the Oracle Accessibility Program Web site at

Accessibility of Code Examples in Documentation

Screen readers may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, some screen readers may not always read a line of text that consists solely of a bracket or brace.

Accessibility of Links to External Web Sites in Documentation

This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.

TTY Access to Oracle Support Services

Oracle provides dedicated Text Telephone (TTY) access to Oracle Support Services within the United States of America 24 hours a day, 7 days a week. For TTY support, call 800.446.2398. Outside the United States, call +1.407.458.2479.


This document contains the following chapters and appendixes:

Chapter 1, "Writing a Pro*PL/1 Program"

This chapter provides the basic information required for writing a Pro*PL/1 program. You learn programming guidelines, coding conventions, language-specific features and restrictions, as well as how to equivalence the datatypes.

Chapter 2, "Error Handling and Diagnostics"

This chapter discusses error reporting and recovery. It shows you how to use the SQLCA and the WHENEVER statement to detect errors and status changes. It also shows you how to use the ORACA to diagnose problems.

Chapter 3, "Running the Pro*PL/1 Precompiler"

This chapter details the requirements for running the Pro*PL/1 Precompiler. You learn how to issue the precompiler command, how to specify useful precompiler options, and when to do separate and conditional precompilations.

Chapter 4, "Sample Programs"

This chapter provides several embedded SQL programs to guide you in writing your own. These well-commented programs illustrate the key concepts and features of Pro*PL/1 programming.

Chapter 5, "Implementing Dynamic SQL Method 4"

This chapter shows you how to implement dynamic SQL Method 4, an advanced programming technique that lets you write highly flexible applications. Numerous examples, including a full-length sample program, are used to illustrate the method.

Appendix A, "Differences from Previous Release"

This appendix lists differences between Pro*PL/1 precompiler release 1.5 and 1.6.

Appendix B, "Operating System Dependencies"

Some details of Pro*PL/1 programming vary from system to system. So, occasionally, you are referred to other manuals. For convenience, this appendix collects all external references to system-specific information.

Related Documents

For more information, see these Oracle resources:

Occasionally, this manual refers you to other Oracle manuals for system-specific information. Typically, these manuals are called installation or user's guides, but their exact names vary depending on operating system and platform. For convenience, Appendix B collects all external references to system-specific information.

Many of the examples in the documentation library use the sample schemas of the seed database, which is installed by default when you install Oracle. Refer to Oracle Database Sample Schemas for information on how these schemas were created and how you can use them yourself.

Printed documentation is available for sale in the Oracle Store at

To download free release notes, installation documentation, white papers, or other collateral, please visit the Oracle Technology Network (OTN). You must register online before using OTN; registration is free and can be done at

If you already have a username and password for OTN, then you can go directly to the documentation section of the OTN Web site at


Important terms being defined for the first time are italicized. In discussions, uppercase is used for database objects and SQL keywords, and boldface uppercase is used for the names of PL/1 functions and procedures. All PL/1 code is in uppercase.

The following notational conventions are used in code examples:

Convention Meaning
< > Angle brackets enclose the name of a syntactic element.
[ ] Brackets indicate that the enclosed items are optional.
{ } Braces indicate that one, and only one, of the enclosed items is required.
| A vertical bar separates options within brackets or braces.
... An ellipsis indicates that the preceding argument or parameter can be repeated, or that statements or clauses irrelevant to the discussion were left out.

ANSI Compliance

The Version 1.6 Pro*PL/1 Precompiler complies completely with the following standards:

Compliance with these standards has been tested and validated using the appropriate National Institute of Standards and Technology (NIST) test suites.

ANSI compliance is governed by the MODE option. For more information about ANSI compliance and the MODE option, see the Oracle Database Programmer's Guide to the Oracle Precompilers