There are lots of way of checking the operating system version on your IBM i Server. On your command line type DSPSFWRSC and with F11 you will see the Software Version of all the products installed on your iSeries. You could also use the DSPPTF command to show the current release as well as the current Cumulative PTF Package (SF99540).
Or you could write a a little something and using an IBM API the CLP code is very simple
DCL VAR(&VERSION) TYPE(*CHAR) LEN(6) DCL VAR(&RCVR) TYPE(*CHAR) LEN(128) DCL VAR(&RCVRLEN) TYPE(*CHAR) LEN(4) VALUE(X'00000080') DCL VAR(&FORMAT) TYPE(*CHAR) LEN(8) VALUE('PRDR0100') DCL VAR(&PRDINFO) TYPE(*CHAR) LEN(27) + VALUE('*OPSYS *CUR 0000*CODE ') DCL VAR(&APIERROR) TYPE(*CHAR) LEN(4) VALUE(X'00000000') CALL PGM(QSZRTVPR) PARM(&RCVR &RCVRLEN &FORMAT + &PRDINFO &APIERROR) CHGVAR VAR(&VERSION) VALUE(%SST(&RCVR 20 6)) SNDPGMMSG MSG('IBMi Version is' *bcat &RELEASE)
For example, on my little AS400e iSeries 270 eServer System i Power System running IBMi5.4 this will return a status message saying: » IBMi Version is V5R4M0
IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Alpha Nerd and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and in the words of the most interesting man in the world: Stay thirsty my friend.
How to encrypt or hide CL/RPG Source Code in ILE Debug Views
IBM CL Control Language Layout with RDi Rational Developer
#IBMi Control Language, Templates and Subroutines
Interview Question and Answer – *CLP AS400 Control Language
CL coding tip #73 – using [COPYRIGHT]
How to Install IBM Access Client Solutions (ACS)
IBM i Data Obfuscation – Making Data Foggy Murky and Squinty
How to rename Fresche (BCD) Presto Library – XL_PRESTO
What is AS400 modernization?