There may be more than one way of doing this but this is how I would do it….
From a command line type DSPJOB OUTPUT(*PRINT) and press ENTER. This will create a spool file containing information about your current interactive job. At the top of almost every AS/400 Operating System report like the one generated by the DSPJOB command you will find the Operating System Version. For example:
In the above example the second block of characters on the top line of the spool file is the version of OS/400 currently installed. In this case V5R4M0 which means Version 5 Release 4 Modification level 0 commonly known as OS/400 5.4.
Updated Feb 20th 2015:
Thanks to Jose for leaving a comment below pointing out that the DSPPTF (Display Program Temporary Fix) command is probably the best way to find the version of IBM i / AS400 operating system you have installed. The original method shown above will work with minimal access rights but if you have access to the DSPPTF command then best to use this instead. In the example shown below the machine is running OS/400 Version 7 Release 1 Modification Level 0.
How to find what Tech Refresh (TR) is installed?
It is worth noting that from OS/400 7.1 IBM decided to increase the frequency between actual OS point upgrades e.g. from 7.1 to 7.2 as these can be costly and disruptive to perform. At the same time IBM wanted to be able to accelerate the pace at which new features are added to OS/400. So from 7.1 IBM have now added the concept of “Tech Refreshes” (TR). In other words not all 7.1 and 7.2 systems are equal you now need to know the OS/400 version AND the TR level to know if a particular feature is available.
To do this you use the command DSPPTF 5770999 and then page through and look for the highest PTF starting MF99… For example:
This system has OS/400 7.1 Tech Refresh (TR) 9 installed, and you can see below it that TR8, 7, 6, 5, 4 etc were previously installed.