One of the first things I do when I first signon to an IBM i is to check what release of operating system it is running. Armed with that information I then know what version programming tools and language features I will need to use.
Fortunately there is a quick way and a not so quick way, that takes just a few more key strokes.
Quick way
I can use the "Display PTF Status" command. All I do is to type : DSPPTF at any command line and press Enter. I am only interested in the third line of the screen which displays the release, see below.
Display PTF Status Product ID . . . . . . . . . . . . . : 5770999 IPL source . . . . . . . . . . . . . : ##MACH#B Release of base option . . . . . . . : V7R2M0 L00 |
Despite IBM i having abandoned the former OS400 and i5/OS naming convention for releases, the release is still displayed using the old style VxRxMx.
Not so quick way
I know that is a feeble description for an alternate method, but I thought it sounded better than "The Other Way". If you are not authorized to use the DSPPTF command you will have to use this method.
The release number is held in a data area, QSS1MRI, which can be found in two libraries: QGPL and QUSRSYS. I have no idea why IBM would need to have the identical information in two places, seems redundant.
I can use the "Display Data Area" command, DSPDTAARA, to view QSS1MRI:
DSPDTAARA QGPL/QSS1MRIOr DSPDTAATA QUSRSYS/QSS1MRI |
The first six characters are the version and release.
Display Data Area Data area . . . . . . . : QSS1MRI Library . . . . . . . : QGPL Type . . . . . . . . . : *CHAR Length . . . . . . . . : 750 Text . . . . . . . . . : Value Offset *...+....1....+....2....+....3....+....4....+....5 0 'V7R2M000 2924 ' |
The other parameter, starting at position 26, is the Feature code for the language used on this server. 2924 is English. You can see a full list of the language codes here.
This article was written for IBM i 7.2, and it should work with all other releases.
With the additions of the Technology Refresh process it would also be nice if IBM added the TR level to the Release and Version information on the screen and dataarea.
ReplyDeleteMike Cunningham
I agree it would be easier than having to know the PTF numbers to look for to know if a TR had been applied.
DeleteI did see a rumor that the TR level could replace the modification number. For example V7R2M1 would mean IBM i 7.2 TR 1. But that was some time ago.
The introduction of the TR has complicated matters but there is a Group PTF for the Technology Release, so WRKPTFGRP will show the current TR level. SF99707 is for 7.1 and SF99717 for 7.2.
ReplyDeleteIt gets worse, because certain enhancements aren't delivered as part of a TR, but as a separate PTF. Fully free RPG is one example of that. Some enhancements are part of a group PTF like Node.js (HTTP group).
It's becoming complicated enough that it's very hard to know what's on the system unless the system is very current.
DSPPGM QCMD is a shortcut of sorts...
ReplyDelete- Keith
I am using IBM i 7.2 and when I do DSPPGM QCMD the only mention I see for release is: "Earliest release that program can run" which states V7R1M0.
DeleteAm I looking in the wrong place?
I have always used GO LICPGM, then Option 10. Display installed licensed programs, then F11=Display release.
ReplyDeleteThat works too
DeleteSTRPDM, use option (6=Print) source member, wrksplf, display spool file, the version is in the top left corner V7R2M0
ReplyDeleteSimon, as you know, you can now also use IBM i Services to get the OS version. I found two ways, and there may be more:
ReplyDelete`select os_version, os_release from sysibmadm.env_sys_info`
and
`select * from qsys2.license_info`
With that last one, you'd want to pick out the right value, so maybe something like
`select release_level from qsys2.license_info where product_id = 5770SS1 limit 1`