This release provides the following functional enhancements
that are described in this and the other IBM PL/I books.
Changes in GC27-8930-00, August 2017
The compiler now supports five time-only patterns: HHMISS, HH:MI:SS, HHMI, HH:MI, HH.
See Date/time built-in functions.
Changes in GC27-8930-00, April 2017
Enhancements
in usability:- The compiler now flags unreachable ASSERT UNREACHABLE
statements with a different message than it flags other unreachable
statements.
- The compiler now expands in the AGGREGATE listing
typed structures that are member of other structures.
- The attributes listing now shows the contents
of the VALUE attribute for CHARACTER and BIT constants of length 256
or less and also for numeric PICTURE constants
New or changed statements and conditions:- The ASSERT statement now supports a new ASSERT
COMPARE statement that provides a more information-rich way to test
an assertion that the actual value of an expression compares correctly
with an expected value.
- The new ASSERTION condition will be raised
when an ASSERT statement fails and the ASSERT(CONDITION) compiler
option is in effect.
- The PROCEDURE statement and ENTRY statement now support the EXTERNAL attribute
as an optional argument.
New or changed built-in functions, pseudovariables,
and subroutines:- The new BASE64ENCODE built-in
function encodes a source buffer into a buffer holding its base 64
value in the character set specified by the ASCII/EBCDIC suboption
of the DEFAULT compiler option, and the new BASE64DECODE built-in function decodes a source
buffer from base 64 that is encoded in the character set specified
by the ASCII/EBCDIC suboption of the DEFAULT compiler option.
- The new BINSEARCH and BINSEARCHX built-in functions generate code
to perform binary searches for a specified value within an array either
by doing a simple comparison or by invoking a user-specified function
to perform the desired comparison.
- The new CODEPAGE built-in
function helps you write code conditional on the value of the compiler’s
CODEPAGE option and to query the value of that compiler option.
- The new COLLAPSE and SQUEEZE built-in functions return a string
that reduces all multiple occurrences of a character to one, starting
from an optional specified position or with an optionally specified
starting position.
- The new DAYSTOMICROSECS built-in
function returns a number of microseconds that corresponds to a number
of days.
- The new FILENEW built-in
function returns a FILE variable that points to a new file constant
in automatic storage.
- The new GETJCLSYMBOL and GETSYSWORD built-in functions return a CHARACTER
string value that represents the requested exported JCL symbol or
the value of the requested system information.
- The new HEX8 and HEXIMAGE8 built-in functions return the hex
value of an expression as a UTF-8 string.
- The LOWERCASE and UPPERCASE built-in functions now accept an
second optional argument, so that you can specify a code page that
all characters will be converted to their lowercase equivalent or
uppercase equivalent. All A-Z/a-z values and Ä-unlaut/ä-umlaunt
values will be converted to it's equivalent.
- The new MEMCOLLAPSE built-in function
fills a target buffer with the contents of a source buffer with all
multiple occurrences of a specified character replaced by one, while
the leading and trailing instances of that character are also trimmed.
It returns a size_t value that indicates the number of bytes
written to the target buffer.
- The new MEMSQUEEZE built-in function
fills a target buffer with the contents of a source buffer with all
multiple occurrences of a specified character replaced by one. It
returns a size_t value that indicates the number of bytes written
to the target buffer.
- The new built-in functions MICROSECS, MICROSECSTODATE, MICROSECSTODAYS and UTCMICROSECS provide the ability to use an
8-byte integer microseconds value to hold a time value and to convert
between it and a date/time string without the rounding problem inherent
in the floating-point seconds value.
- The new MINVAL and MAXVAL built-in functions return the minimum
value or the maximum value that its numeric operand could assume.
- The new ONACTUAL and ONEXPECTED built-in functions return a character
string that is the value of the “actual” expression or
"expected' expression in an ASSERT COMPARE statement when the ASSERTION
condition is raised.
- The new ONTEXT built-in function
returns a character string that is the value of the TEXT string in
an ASSERT statement when the ASSERTION condition is raised.
- The new ONPACKAGE built-in function
returns a character string that is the name of the PACKAGE when the
ASSERTION condition is raised.
- The new ONPROCEDURE built-in
function returns the name of a procedure in which a condition is raised.
ONPROCEDURE and ONPROC now are supported as the preferred name of
the ONLOC built-in function.
- The REPATTERN and TIMESTAMP built-in functions now can be used
to obtain the current date and time in the z system format of YYYY-MM-DD HH:MI:SS.999999.
- The ROUNDDEC built-in function has been renamed
as ROUNDAWAYFROMZERO.
- The new ROUNDTOEVEN built-in function
returns the value of x rounded at a digit specified by n following
the rounding rule of round half to even.
CICS enhancements:- The CICS preprocessor output now includes a listing of all the
CICS options in effect when the preprocessor run.
Enhancements in usability
- The compiler now supports 64-bit applications
under the LP(64) option. This means that under this option, POINTER
and HANLDE can be eight bytes in size, structures and arrays can be
larger than 2G in size, and many built-in functions (such as PLIMOVE)
can take 8-byte integer arguments and return 8-byte integer results.
- The INITIAL attribute is now allowed on macro declare statements.
- The JSONNAME attribute provides the ability to specify the name
that is used or expected for a variable in jsonPut or jsonGet functions.
In particular, with this attribute you can specify a name that does
not conform to PL/I name rules.
- The JSONOMIT attribute indicates that fields of certain data items
must be omitted from output that is generated by JSON functions. In
particular, if a variable has the JSONOMIT attribute, the jsonPut
functions will omit this variable from the generated text if the variable
is equal to a null string ‘’.
- The SUPPRESS attribute now accepts NOPADDING as a subattribute,
which can be applied on a variable. If specified on a level-1 structure
name, SUPPRESS(NOPADDING) causes the RULES(NOPADDING) compiler option
to be ignored for that structure.
- The compiler now issues a W-level message rather
than an I-level message if attributes other than FIXED BIN(p,0) are
used with REFER objects.
- Some assignments to UNIONs and, more generally,
to structures that contain UNIONs are now supported.
- The XMLCONTENT attribute specifies that when a variable is included
in the text that is generated by the XMLCHAR built-in function, it
is presented as tagless text.
New or changed built-in functions, pseudovariables,
and subroutines
- The new ALLOC31 built-in function allocates storage of the specified
size in below-the-bar heap.
- The new BETWEENEXCLUSIVE, BETWEENLEFTEXCLUSIVE, and BETWEENRIGHTEXCLUSIVE
built-in functions make it easier to write code that tests whether
a variable is in between two specified values. These built-in functions
also make it easier for the compiler to generate better code for such
tests.
- The new CHECKSUM built-in function can be used to get the checksum
value for a buffer of data.
- The new HEXDECODE and HEXDECODE8 built-in functions make it easy
to translate character data that contains a hexadecimal representation
of data into data with the corresponding value.
- The new ICLZ built-in function provides a quick way to count the
number of leading zeros in an integer value.
- The new MAINNAME built-in function returns the
name of the MAIN function on the current calling chain.
- The new ONSUBCODE2 built-in function gives your program more information
about VSAM failures.
- The new PLIATTN built-in subroutine gives you explicit control
over where the compiler sets attention breakpoints.
- The TIMESTAMP built-in function now can be used to obtain the
current date and time in the z system format of YYYY-MM-DD-HH.MI.SS.999999 .
- The new UTCDATETIME and UTCSECS built-in functions can be used
to obtain the UTC date and time as a string and as a number of Lilian
seconds.
- The new UTF8STG built-in function makes it easier to write code
that parses UTF-8 text.
- The new UUID built-in function can be used to obtain a universally
unique identifier.
Performance improvements
- Some fixed decimal divides with large precision are now done using
the Decimal Floating-Point (DFP) facility. This might cause some ZERODIVIDE
exceptions to be reported as INVALIDOP.
SQL enhancements
- The INDFOR attribute makes it easy to declare a structure of indicator
variables to match another PL/I structure.