没有合适的资源?快使用搜索试试~ 我知道了~
Pro*COBOL Programmer's Guide 11g Release 2 (11.2)-520
需积分: 5 0 下载量 106 浏览量
2023-06-18
06:18:53
上传
评论
收藏 7.79MB PDF 举报
温馨提示
试读
520页
Pro*COBOL Programmer's Guide 11g Release 2 (11.2)-520
资源推荐
资源详情
资源评论
Pro*COBOL®
Programmer's Guide
11g Release 2 (11.2)
E10826-01
July 2009
Pro*COBOL Programmer's Guide, 11g Release 2 (11.2)
E10826-01
Copyright © 1996, 2009, Oracle and/or its affiliates. All rights reserved.
Primary Author: Simon Watt
Contributing Author: Syed Mujeed Ahmed, Jack Melnick, Neelam Singh, Subhranshu Banerjee, Beethoven
Cheng, Michael Chiocca, Nancy Ikeda, Alex Keh, Thomas Kurian, Shiao-Yen Lin, Diana Lorentz, Ajay Popat,
Chris Racicot, Pamela Rothman, Simon Slack, Gael Stevens
Contributor: Valarie Moore
This software and related documentation are provided under a license agreement containing restrictions on
use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your
license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license,
transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse
engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is
prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If
you find any errors, please report them to us in writing.
If this software or related documentation is delivered to the U.S. Government or anyone licensing it on
behalf of the U.S. Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data
delivered to U.S. Government customers are "commercial computer software" or "commercial technical data"
pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As
such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and
license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of
the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software
License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
This software is developed for general use in a variety of information management applications. It is not
developed or intended for use in any inherently dangerous applications, including applications which may
create a risk of personal injury. If you use this software in dangerous applications, then you shall be
responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use
of this software. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of
this software in dangerous applications.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks
of their respective owners.
This software and documentation may provide access to or information on content, products, and services
from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all
warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and
its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of
third-party content, products, or services.
iii
Contents
Preface ............................................................................................................................................................. xxv
Intended Audience.................................................................................................................................. xxv
Documentation Accessibility................................................................................................................. xxv
Related Documents ................................................................................................................................. xxvi
Conventions ............................................................................................................................................. xxvi
What's New in Pro*COBOL?.............................................................................................................. xxvii
Oracle 11g Release 2 (11.2) New Features in Pro*COBOL ............................................................... xxvii
Oracle 11g Release 1 (11.1) New Features in Pro*COBOL ............................................................... xxvii
1 Introduction
What is Pro*COBOL?............................................................................................................................... 1-1
The Pro*COBOL Precompiler................................................................................................................ 1-1
Language Alternatives ..................................................................................................................... 1-2
Advantages of the Pro*COBOL Precompiler...................................................................................... 1-3
The SQL Language................................................................................................................................... 1-3
The PL/SQL Language............................................................................................................................. 1-3
Pro*COBOL Features and Benefits....................................................................................................... 1-3
Directory Structure................................................................................................................................... 1-5
Header Files ........................................................................................................................................ 1-5
Library File.......................................................................................................................................... 1-6
Known Problems, Restrictions, and Workarounds ...................................................................... 1-6
Compatibility, Upgrading, and Migration .......................................................................................... 1-6
2 Precompiler Concepts
Key Concepts of Embedded SQL Programming ............................................................................... 2-1
Steps in Developing an Embedded SQL Application .................................................................. 2-1
Embedded SQL Statements .............................................................................................................. 2-2
Executable versus Declarative Statements.............................................................................. 2-3
Embedded SQL Syntax ..................................................................................................................... 2-4
Static Versus Dynamic SQL Statements ......................................................................................... 2-5
Embedded PL/SQL Blocks .............................................................................................................. 2-5
Host Variables and Indicator Variables ......................................................................................... 2-5
Oracle Datatypes ............................................................................................................................... 2-6
Tables ................................................................................................................................................... 2-6
iv
Errors and Warnings ......................................................................................................................... 2-6
SQLCODE/SQLSTATE Status Variables ................................................................................ 2-7
SQLCA Status Variable.............................................................................................................. 2-7
WHENEVER Statement ............................................................................................................. 2-8
ORACA......................................................................................................................................... 2-8
Precompiler Options and Error Handling .............................................................................. 2-8
SQL99 Syntax Support....................................................................................................................... 2-8
Programming Guidelines ....................................................................................................................... 2-8
Abbreviations...................................................................................................................................... 2-8
Case-Insensitivity............................................................................................................................... 2-8
COBOL Versions Supported ............................................................................................................ 2-8
Coding Areas ...................................................................................................................................... 2-9
Commas............................................................................................................................................... 2-9
Comments ........................................................................................................................................... 2-9
Continuation Lines.......................................................................................................................... 2-10
Copy Statements.............................................................................................................................. 2-10
Decimal-Point is Comma ............................................................................................................... 2-10
Delimiters ......................................................................................................................................... 2-11
Division Headers that are Optional.............................................................................................. 2-11
Embedded SQL Syntax................................................................................................................... 2-11
Figurative Constants....................................................................................................................... 2-11
File Length........................................................................................................................................ 2-12
FILLER is Allowed.......................................................................................................................... 2-12
Host Variable Names...................................................................................................................... 2-12
Hyphenated Names........................................................................................................................ 2-12
Level Numbers ................................................................................................................................ 2-12
MAXLITERAL Default................................................................................................................... 2-12
Multibyte Datatypes ....................................................................................................................... 2-13
NULLs in SQL ................................................................................................................................. 2-13
Paragraph and Section Names ...................................................................................................... 2-13
REDEFINES Clause......................................................................................................................... 2-13
Relational Operators....................................................................................................................... 2-14
Sentence Terminator....................................................................................................................... 2-14
The Declare Section .............................................................................................................................. 2-14
Contents of a Declare Section........................................................................................................ 2-14
An Example............................................................................................................................... 2-15
Precompiler Option DECLARE_SECTION................................................................................. 2-15
Using the INCLUDE Statement .................................................................................................... 2-15
Filename Extensions................................................................................................................ 2-16
Search Paths.............................................................................................................................. 2-16
Nested Programs.................................................................................................................................... 2-16
Support for Nested Programs ....................................................................................................... 2-17
Declaring the SQLCA.............................................................................................................. 2-18
Nested Program Example....................................................................................................... 2-18
Conditional Precompilations .............................................................................................................. 2-18
An Example...................................................................................................................................... 2-19
Defining Symbols............................................................................................................................ 2-19
v
Separate Precompilations ................................................................................................................... 2-19
Guidelines ........................................................................................................................................ 2-19
Referencing Cursors ................................................................................................................ 2-20
Specifying MAXOPENCURSORS ......................................................................................... 2-20
Using a Single SQLCA ............................................................................................................ 2-20
Using a Single DATE_FORMAT............................................................................................ 2-20
Restrictions....................................................................................................................................... 2-20
Compiling and Linking ....................................................................................................................... 2-21
Sample DEPT and EMP Tables........................................................................................................... 2-21
Sample DEPT and EMP Data ........................................................................................................ 2-21
Sample EMP Program: SAMPLE1.PCO ........................................................................................... 2-22
3 Database Concepts
Connecting to Oracle ............................................................................................................................... 3-1
Default Databases and Connections .................................................................................................... 3-2
Concurrent Logons ............................................................................................................................ 3-3
Using Username/Password ............................................................................................................. 3-4
Named Database Connections.................................................................................................. 3-4
Automatic Logons.............................................................................................................................. 3-7
The AUTO_CONNECT Precompiler Option ......................................................................... 3-7
Changing Passwords at Runtime..................................................................................................... 3-7
Connect Without Alter Authorization............................................................................................ 3-8
Standard CONNECT.................................................................................................................. 3-8
SYSDBA or SYSOPER Privileges .............................................................................................. 3-8
Using Links ......................................................................................................................................... 3-9
Key Terms .................................................................................................................................................. 3-9
How Transactions Guard a Database ................................................................................................... 3-9
Beginning and Ending Transactions.................................................................................................. 3-10
Using the COMMIT Statement .......................................................................................................... 3-10
WITH HOLD Clause in DECLARE CURSOR Statements........................................................ 3-11
CLOSE_ON_COMMIT Precompiler Option............................................................................... 3-11
Using the ROLLBACK Statement...................................................................................................... 3-12
Statement-Level Rollbacks............................................................................................................. 3-13
Using the SAVEPOINT Statement..................................................................................................... 3-13
Using the RELEASE Option................................................................................................................ 3-14
Using the SET TRANSACTION Statement..................................................................................... 3-15
Overriding Default Locking................................................................................................................ 3-15
Using the FOR UPDATE OF Clause............................................................................................. 3-16
Restrictions................................................................................................................................ 3-16
Fetching Across Commits .................................................................................................................... 3-16
Using the LOCK TABLE Statement.............................................................................................. 3-17
Handling Distributed Transactions ................................................................................................... 3-17
Guidelines for Transaction Processing ............................................................................................. 3-18
Designing Applications.................................................................................................................. 3-18
Obtaining Locks .............................................................................................................................. 3-18
Using PL/SQL ................................................................................................................................. 3-18
X/Open Applications..................................................................................................................... 3-19
剩余519页未读,继续阅读
资源评论
weixin_40191861_zj
- 粉丝: 62
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 单相桥式全控整流MATALB Simulink仿真文件
- Dolby Vision安装包(解决杜比视界版本高清片源颜色不正问题)
- Python实现的简单二叉堆(最小堆)示例
- 嵌入式基础学习资料0000
- content_1714465331721.xls
- HM3401-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- Chainbase+Web3+APi+Data warehouse
- HM3401D-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- GEE案例-1990-2023年计算某个区域的NDVI时序变化轨迹(以徐州市为例)含全部代码.pdf
- HM3401C-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功