Built-in functions and subroutines are procedures provided by the Open PL/I language. They can be used wherever an expression is valid.
The built-in functions and subroutines provided by Open PL/I can be grouped into the following classes:
These include:
|
|
|
|
Condition-handling built-in functions include:
|
|
|
|
|
|
|
|
|
|
Some functions do not support WIDECHAR data.
String handling built-in functions include:
|
|
|
|
JSON (Java Script Object Notation) is a human readable text for transmission of data objects consisting of name-value pairs. It is the most common data format used for browser/server communication and is meant to be a replacement for XML. Whitespace is permitted wherever a delimiter is allowed but is otherwise ignored but counts toward the number of bytes read or written. JSON text must be UTF-8 encoded.
PL/I supports manipulation (reading and writing) of JSON objects via several built-in functions and with the use of some new attributes. JSON objects map on to a subset of PL/I data types - both scalar and aggregates.
Example of a JSON object:
{ "Last": "Presley", "First": "Elvis", "Address" : [ "4860 Las Vegas Blvd", "Las Vegas", "NV 89139" ], "Title": "The King", "Born" : 1935, "Alive": true }
It maps to:
dcl 1 King, 3 Last char(30) varying, 3 First char(30) varying, 3 Address(3) char(30) varying, 3 Title char(30) varying, 3 Born fixed bin(31), 3 Alive bit;
JSON built-in function arguments
All JSON built-in functions have either two or three argument:
The JSON built-in functions are:
|
|
This section describes each built-in. The built-ins are presented in alphabetical order by name. Each built-in definition includes a purpose, syntax, and description (the effect of the built-in). Examples (one or more examples of the built-in usage and results) and restrictions (any restrictions in the use of the built-in) may also be included.
Arguments to built-ins are effectively passed by value, that is, no alteration of the arguments is done.