Enhancements in this release

This release provides the following functional enhancements that are described in this and the other IBM® PL/I books.

Enhancements in usability

  • The JSONTRIMR attribute indicates that the JSON functions will trim away any trailing blanks for the specified field. See JSONTRIMR attribute.
  • The UCHAR attribute specifies that a string holds UTF-8 data and that functions such as INDEX, SUBSTR, and VERIFY will handle it in a UTF-8 sensitive manner. See UCHAR data and UX (hex) UCHAR constant.
  • The character // specifies that the rest of a line is a comment. See Delimiters and operators.
  • The VALUELIST attribute limits the set of values that a variable, an argument, or a returned value can have.
  • The VALUELISTFROM attribute specifies an unsubscripted reference whose VALUELIST attribute should also be applied to the current declaration.
  • The XMLNAME attribute provides the ability to specify the name that is used for a variable in the XMLCHAR built-in function.
  • The LIKE attribute can be used in ENTRY descriptions and parameter declarations. See LIKE attribute.
  • The SUPPRESS(NOGLOBAL) attribute causes the compiler not to flag any use of the variable in nested procedures. See SUPPRESS attribute.
  • The compiler supports specifying different ROUTCDE and DESC values in different DISPLAY statements. See DISPLAY statement.
  • The compiler supports the date/time patterns YYYY/MM/DD, YY/MM/DD, YYYY-MM-DDTHH:MI:SS.999999, DD/MM/YYYY, and DD/MM/YY. See Date/time built-in functions.
  • The compiler deduces an array's extent from its INITIAL attribute. See DIMENSION attribute.
  • The compiler supports the use of STATIC NONASGN array elements as constants. See Restricted expressions.
  • The compiler supports the use of named constants in PUT DATA statements. See Data specification options.
  • The compiler accepts type name references consisting of a series of identifiers separated by dots (such as paint.color).
  • The compiler supports the use of assigning the null string (specified as either '' or ''b) to HANDLE, OFFSET, ENTRY, and AREA variables. See Non-computational targets.

New or changed built-in functions, pseudovariables, and subroutines

  • The built-in function XMLUCHAR writes XML corresponding to a structure to a buffer as UTF-8.
  • The built-in function SUBTO returns a substring, specified by its ending position, of a string.
  • The SUBTO pseudovariable assigns a substring, specified by its ending position, of a string.
  • The built-in function ALLOCNEXT provides fast allocation with AREAs.
  • The built-in function BYTELENGTH returns a FIXED BINARY(31) value that is the number of bytes used by a UCHAR type string.
  • The built-in function FILEDDWORD lets you use the DSORG option to get the data set organization of the file reference.
  • The built-in function FOLDEDFULLMATCH returns a FIXED BINARY(31) value that indicates whether two strings are identical when folded to lowercase according to the Unicode full case folding rules.
  • The built-in function FOLDEDSIMPLEMATCH returns a FIXED BINARY(31) value that indicates whether two strings are identical when folded to lowercase according to the Unicode simple case folding rules.
  • The built-in function GETSYSINT returns a size_t value that is the value of the requested system information.
  • The built-in function GETSYSWORD accepts ASID, ACTINFO, MSGCLASS, JESNODE, JOBCLASS, JOBNUMBER, and SMFID as keywords.
  • The built-in function IFTHENELSE provides an equivalent for the C conditional expression (x?y:z).
  • The built-in function INARRAY returns a BIT(1) value that indicates whether an expression is equal to any of the elements of an array.
  • The built-in function ISJCLSYMBOL returns a BIT(1) value that indicates whether the input argument name is a valid exported JCL symbol.
  • The built-in functions JSONPUTMEMBER and JSONPUTVALUE accept an optional parameter that specifies whether the name should be written in lowercase, uppercase, or asis.
  • The built-in function LOWERASCII returns a UCHAR string with all of its ASCII characters converted to their corresponding lowercase characters.
  • The built-in function LOWERLATIN1 returns a UCHAR string with all of its ASCII and Latin-1 supplement characters converted to their corresponding lowercase characters.
  • The built-in function MAXDATE returns a character string containing the latest date/time value corresponding to a specified date/time pattern.
  • The built-in function MEMCONVERT has a parameter t that specifies the technique to be used in the conversion.
  • The built-in function MEMREPLACE fills a target buffer with the contents of a source buffer with one or more occurrences of a specified third buffer replaced by a fourth buffer, and returns a size_t value that indicates the number of bytes that are written to the target buffer.
  • The built-in function ONOPERATOR returns a CHARACTER(2) string whose value is the operator in an ASSERT COMPARE statement that raised an ASSERTION condition.
  • The built-in function ONUCHAR returns a UCHAR(1) string containing the UTF-8 data that caused a CONVERSION condition.
  • The ONUCHAR pseudovariable sets the current value of the ONUCHAR built-in function.
  • The built-in function ONUSOURCE returns a UCHAR string whose value is the contents of the field that was being processed when a CONVERSION condition was raised.
  • The ONUSOURCE pseudovariable sets the current value of the ONUSOURCE built-in function.
  • The built-in function PLISTCKLOCAL generates the corresponding store clock hardware instruction and adjusts the STCK value to give the local time.
  • The built-in function PLISTCKUTC generates the corresponding store clock hardware instruction and adjusts the STCK value to give the UTC time.
  • The built-in function PLISTCKELOCAL generates the corresponding store clock hardware instruction and adjusts the STCKE value to give the local time.
  • The built-in function PLISTCKEUTC generates the corresponding store clock hardware instruction and adjusts the STCKE value to give the UTC time.
  • The built-in function PRECVAL returns the precision for a numeric expression.
  • The built-in function QUICKSORT performs a quick-sort of an array by using a simple compare.
  • The built-in function QUICKSORTX performs a quick-sort of an array by using a specified compare function.
  • The built-in function REGEX returns a FIXED BINARY(31) that indicates the success of matching a specified regular expression or pattern against a string.
  • The built-in function REPLACE replaces one or more occurrences of a substring by another substring within a target string and returns the target string with replaced substring.
  • The built-in function STCKETODATE converts STCKE values to date/time strings.
  • The built-in function STCKTODATE converts STCK values to date/time strings.
  • The built-in function SCALEVAL returns the scale factor for a numeric expression.
  • The built-in function SCRUBOUT returns a string with all the characters from a second string removed.
  • The built-in function UHIGH returns a UCHAR string of length x with each UTF-8 data item having the highest UCHAR value ('F48FBFBF'ux).
  • The built-in function ULOW returns a UCHAR string of length x with each UTF-8 data item having the lowest UCHAR value ('00'ux).
  • The built-in function UNHEX performs the reverse of the HEX built-in function.
  • The built-in function UPPERASCII returns a UCHAR string with all of its ASCII characters converted to their corresponding uppercase characters.
  • The built-in function UPPERLATIN1 returns a UCHAR string with all of its ASCII and Latin-1 supplement characters converted to their corresponding uppercase characters.
  • The built-in function UUID4 returns a CHARACTER(36) string that is a version 4 universally unique identifier.
  • The JSON built-in functions are supported under CMPAT(V1).
  • The built-in function VALIDVALUE returns a value that indicates whether the value of an expression matches one of the elements in a variable's value set.
  • The XDEFINE ALIAS statement is the same as the DEFINE ALIAS statement except if the specified name has already appeared in a previous (X)DEFINE ALIAS statement, this XDEFINE statement will be ignored.
  • The XDEFINE ORDINAL statement is the same as the DEFINE ORDINAL statement except if the specified name has already appeared in a previous (X)DEFINE ORDINAL statement, this XDEFINE statement will be ignored.
  • The XDEFINE STRUCTURE statement is the same as the DEFINE STRUCTURE statement except if the specified name has already appeared in a previous (X)DEFINE STRUCTURE statement, this XDEFINE statement will be ignored.

New or changed statements and conditions:

  • The QUALIFY statement and a corresponding END statement delimit a qualify block, and thus create a namespace for ORDINALs, other types, and named constants.