Prior to V7 you could use ver$ to get some information like the serial number in 4GL code.(similar to below)
But starting with V7 and changes in license system in Enterprise management, now license is stored in MongoDb, so how would you go about writing code to check the license for example serial number.
This is possible thanks to methods already developed for license retrieval.
Before we get to the example review the online help for the list of these methods by searching for "License"
So here is the example how you would use these methods in Classic code, of course in V7 style code I could instantiate the license class, but in classic code thanks to existing contexts you can use below:
So in the actual code it would be something like below:
Local Char ZSERIAL(30)
ZSERIAL = fmet GACTX.AGETLIC_SERIAL("1")
Conclusion: You can use methods like AGETLIC_SERIAL to get the serial number of your installed license.