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.
How to check DB2 version in AS400
On IBMi DB/2 is an integrated and integral part of the operating system and not a separate installed product, therefore you need to focus on which version of the OS/400 Operating System you have installed. If you want to know more about DB/2 cross platform compatibility see this guide on the IBM site.
What is the latest version of AS400?
This is a question I still get asked. The short answer is IBM haven’t sold AS/400 for more than 20 years and the last AS/400 release must have been around OS/400 V5. Although many still call the system AS/400, IBM have evolved the system and first called it iSeries and more recently IBMi. IBM officially now call the Operating System “i” or “IBMi” but most still refer to the Operating System itself as OS/400 as the newer names are less than great. So if allowing for name changes, the latest version is 7.4. See my Introduction to IBMi / AS400 blog for more information.
How to get iseries DB2 version?
Please refer to the above couple of answers if you want to know more about iSeries DB2.