The __librel() function provides the release level of the z/OS® C/C++ runtime library. To use this function, you
must enable the runtime library
extensions.
Returned value
The __librel() function returns the z/OS C/C++ runtime library release level that your
application is using. The value is printed in hexadecimal format. The first byte of the value
returned contains the product and version, second byte the release, and the third and fourth bytes
contain the modification level.
Figure 1 shows the format of the hexadecimal
value returned by the __librel() function. Figure 1. Format of the __librel() function
return value
0xPVRRMMMM
||||||||
||||++++ Modification Level (M)
||++---- Release (R)
|+------ Version (V)
+------- Product Number (P)
Table 2 correlates library release level with the corresponding
__librel() return value.
Table 2. Library
release level and value returned by the __librel() function
Library release level
Return value
z/OS 3.2
0x43020000
z/OS 3.1
0x43010000
z/OS 2.5
0x42050000
Example
CELEBL04
/* CELEBL04
This example calls the __librel() function that returns
the library release level your program is currently
using in the following hexadecimal format 0xPVRRMMMM.
*/
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
printf("The current release of the library is: %X\n",__librel());
}