Ever wanted to find your IBM i OS Version using SQL?
Following on from this blog about how to find the OS version from an RPG Program, a nice chap called Tomas Petris left a comment showing a slick way of pulling the IBM i Version with one SQL statement:
The SQL statement is simple and looks like this:
SELECT substring(DATA_AREA_VALUE, 1, 8) FROM qsys2.data_area_info
WHERE data_area_library = 'QUSRSYS' and data_area_name = 'QSS1MRI'
You can enter this into your ACS SQL Script tool or simply into the terminal mode (5250 Emulator) using STRSQL:
The results are simple and clear: