The following list describes the enhancements made to ILE COBOL in V4R2:
- User-defined data types
A user-defined data type is defined by specifying
a level-01 entry containing the TYPEDEF clause; all entries that are subordinate
to the level-01 entry are considered part of the user-defined data type. A
user-defined data type can be used to define new data items of level-01, -77,
or -02 through -49, by specifying a TYPE clause for the new data item, that
references the user-defined data type.
- Program profiling support
The PRFDTA parameter has been added to both
the CRTCBLMOD and CRTBNDCBL commands, and to the PROCESS statement, to allow
a program to be profiled for optimization.
- Null-values support
Null-values support (by way of the NULL-MAP and
NULL-KEY-MAP keywords) has been added to the following statements and clauses
to allow the manipulation of null values in database records:
- ASSIGN clause
- COPY-DDS statement
- DELETE statement
- READ statement
- REWRITE statement
- START statement
- WRITE statement.
- Locale support
IBM® i Locale objects (*LOCALE) specify certain cultural
elements such as a date format or time format. This cultural information
can be associated with
ILE COBOL date, time, and numeric-edited items. The following
new characters, clauses, phrases and statements were added to support this:
- The LOCALE clause of the SPECIAL-NAMES paragraph
- Associates an IBM i locale object with a COBOL mnemonic-name
- The LOCALE phrase of a date, time, or numeric-edited item
- Allows you to specify a locale mnemonic-name, so that the data item is
associated with an IBM i locale object
- Along with specific locales defined in the LOCALE clause of the SPECIAL-NAMES
paragraph, a current locale, and a default locale have been defined. The current
locale can be changed with the new SET LOCALE statement (Format 8).
- A locale object is made up of locale categories, each locale category
can be changed with the SET LOCALE statement.
- Locale categories have names such as LC_TIME and LC_MONETARY. These names
include the underscore character. This character has been added to the COBOL
character set.
- The SUBSTITUTE phrase of the COPY DDS statement has been enhanced to allow
the underscore character to be brought in.
The following new intrinsic functions allow you to return culturally-specific
dates and times as character strings:
- Additions to Century support
The following enhancements have been made
to the
ILE COBOL Century support:
- A new class of data items, class date-time, has been added. Class date-time
includes date, time, and timestamp categories. Date-time data items are declared
with the new FORMAT clause of the Data Description Entry.
- Using COPY-DDS and the following values for the CVTOPT compiler parameter, IBM i
DDS data types date, time, and timestamp can be brought into COBOL programs
as COBOL date, time, and timestamp items:
- Using the CVTOPT parameter value *CVTTODATE, packed, zoned, and character IBM i
DDS data types with the DATFMT keyword can be brought into COBOL as date items.
- The following new intrinsic functions allow you to do arithmetic on items
of class date-time, convert items to class date-time, test to make sure a
date-time item is valid, and extract part of a date-time item:
- ADD-DURATION
- CONVERT-DATE-TIME
- EXTRACT-DATE-TIME
- FIND-DURATION
- SUBTRACT-DURATION
- TEST-DATE-TIME.