I've written a little CL command that returns the IBM i VxRyMz level of the operating system.
I use the CEEGPID API to retrieve that information and then return it to the caller.
I'm going to be using this when the next release of IBM i comes out to test things in CL and then avoid using them if they aren't supported at the current release level. I do this now in RPG and in C using this API.
If anyone needs a copy, let me know. It'll be included the next release of the Cozzi APPTOOLS package but it is a stand-alone and fairly simple program so I could post the source just for fun.