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