Pro*COBOL® Programmer's Guide Release 9.2 Part Number A96109-03 |
|
|
View PDF |
This section describes new features of Oracle9i releases and provides pointers to additional information. New features information from previous releases is also retained to help those users migrating to the current release.
The following sections describe the new features in Oracle Pro*COBOL:
TBD
There is no new feature added in Pro*COBOL for this release.
The Oracle9i Release 1(9.0.1) Pro*COBOL features and enhancements described in this section enables Pro*COBOL programs to use new Datetime types.
This section contains these topics:
Globalization Support
National Language Support (NLS) was re-named Globalization Support.
New Datetime Datatypes
Pro*COBOL supports five new datetime datatypes: INTERVAL DAY TO SECOND
, INTERVAL YEAR TO MONTH
, TIMESTAMP
, TIMESTAMP WITH TIMEZONE
, and TIMESTAMP WITH LOCAL TIMEZONE
. You can select from columns of these datatypes onto the OCIInterval
and OCIDateTime
host variables and into objects where attributes are datetime types.
The features and enhancements described in this section enable Pro*COBOL programs to use multiple threads for better performance.
This section contains these topics:
Support for Pro*COBOL Multithreading application
Pro*COBOL 8.1.6 now supports multithreading applications. A context variable can now be declared using the SQL-CONTEXT pseudo-type. Also, declarations for host variables are now allowed in the LOCAL-STORAGE and THREAD-LOCAL-STORAGE sections.
The Oracle8i Release 8.1.5 Pro*COBOL features and enhancements described in this section comprise the overall effort to make Pro*COBOL application development simpler.
This section contains these topics:
Enhancement to WHENEVER statement
Pro*COBOL 8.1.5 now allows the call of a subroutine as the action in the WHENEVER statement. The new syntax is: EXEC SQL WHENEVER <condition> DO CALL <subprogram> [USING id1 id2 ... idn] END-EXEC. This new functionality is very useful when writing nested programs.
Support for COBOL in-line comments
Pro*COBOL 8.1.5 supports COBOL in-line comments that begin with two contiguous charaters "*>" preceded by a separator space, and ends with the last character position of the line. An in-line comment cannot be continued and can only be used in COBOL code.
Support for DECIMAL-POINT IS COMMA
Pro*COBOL 8.1.5 has been enhanced to support the DECIMAL-POINT IS COMMA clause in the ENVIRONMENT DIVISION. If the clause appears in the source file, then the comma will be allowed as a period is in any numeric literal in the VALUE clause.
Support for Optional Division Headers
Previously, IDENTIFICATION, ENVIRONMENT, and DATA DIVISION headers were required to precede their respective division contents. As of Pro*COBOL 8.1.5, these headers are optional. Please note that the entire divisions were already optional, this enhancement addresses only the division "headers".
The Oracle8i Release 8.1.3 Pro*COBOL features and enhancements described in this section includes the use of LOB in the Pro*COBOL application with other features.
This section contains these topics:
Large Object (LOB) support
Pro*COBOL 8.1.3 supports a way to declare LOB locators for all LOB types (BLOB, CLOB, NCLOB, and BFILE), provides the ability to allocate and free the LOB locators, and also provides a full set of embedded SQL statements for direct manipulation of LOB locators and their values. The values of certain attributes of LOBS are available through a new LOB DESCRIBE embedded SQL statement.
ANSI Dynamic SQL support
Pro*COBOL 8.1.3 provides support for ANSI Dynamic SQL (also known as the SQL92 dynamic SQL) which should be used for new Method 4 applications. In ANSI dynamic SQL, descriptors are internally maintained by Oracle, while in the older Oracle dynamic SQL, the descriptors are defined in the user's program.
Support for universal rowid
Pro*COBOL 8.1.3 provides a mechanism to ALLOCATE and FREE rowid descriptors that are compatible with both physical rowids (associated with heap tables) and logical rowids (associated with index organized tables) Users declare rowid descriptors using a new Pro*COBOL pseudotype SQL-ROWID.
Support for DML returning
Pro*COBOL 8.1.3 supports an optional RETURNING clause in the VALUES clause of an INSERT statement, and after the optional WHERE clause of a DELETE and UPDATE statement.
Support for Tables of Group Items as host variables
Pro*COBOL 8.1.3 supports tables of group items with elementary subordinate items as host variables in embedded SQL statements. The host tables of group items can be referenced in the INTO clause of a SELECT or a FETCH statement, and in the VALUES list of an INSERT statement.
Support for SYSDBA and SYSOPER modes in the CONNECT statement
In previous versions, users could connect with sysdba privileges by specifying:
EXEC SQL CONNECT :<uid> IDENTIFIED BY :<pwd> END-EXEC where <uid> is a host variable containing "SYS" and <pwd> is a host variable containing "CHANGE_ON_INSTALL". The SYSDBA privileges are no longer available by default by using the preceding, thus Pro*COBOL 8.1.3 supports an optional IN MODE clause in the embedded CONNECT statement for the user to specify the SYSDBA or SYSOPER mode.
Support for user specification of runtime context
Pro*COBOL 8.1.3 provides a way to declare a handle to a runtime context and use that handle with some new CONTEXT embedded SQL statements and directives (CONTEXT ALLOCATE, CONTEXT FREE, and CONTEXT USE). Pro*COBOL 8.1.3 does not support multithreaded applications.
Support for pre-fetching
Oracle supports the notion of pre-fetching a number of rows when a query is executed. This increases performance by eliminating the need for a server round-trip when the rows are subsequently fetched.
The Oracle8 Database Release 8.0.x Pro*COBOL features and enhancements described in this section comprises the use of nested program structures among others.
This section contains these topics:
Support for Nested Programs
Pro*COBOL 2.0.2 allows nested programs with embedded SQL within a single source file.
Improved error reporting
Errors will be associated with the proper line in any list file produced or in any terminal output. "Invalid host variable" errors will clearly state why the given COBOL variable is invalid for use in embedded SQL.
See Also: Improved Error Reporting on page A-6 |
Support for using REDEFINES clause with group items
The REDEFINES clause is allowed to redefine group items and be used in host variable declarations.
Support for FILLER
The word FILLER can be used in host variable declarations.
New default datatype for PIC X
The default datatype for PIC X variables has changed from VARCHAR2 (1) to CHARF (96). A new precompiler option is provided for backward compatibility.
Support for NCHAR data
NCHAR data is now fully supported by the kernel. Previous releases of the precompiler supported this datatype with the NLS_LOCAL option.