Ultimo aggiornamento: 30-Dic-2018

Reperimento livello sistema operativo

In questo articolo vi propongo diversi metodi per reperire il livello di sistema operativo.

API QSZRTVPR

PGM
 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(&ERRCODE) TYPE(*CHAR) LEN(4) +
   VALUE(X'00000000')

 CALL PGM(QSYS/QSZRTVPR) PARM(&RCVR &RCVRLEN +
   &FORMAT &PRDINFO &ERRCODE)

 SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('RELEASE +
   = ' *CAT %SST(&RCVR 20 6))

ENDPGM

AREA DATI QSS1MRI

PGM
 DCL VAR(&REL) TYPE(*CHAR) LEN(6)

 RTVDTAARA QGPL/QSS1MRI &REL
 
 /* RTVDTAARA QUSRSYS/QSS1MRI &REL */
 SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('RELEASE +
   = ' *CAT &REL)

ENDPGM

SQL

select OS_NAME concat ' ' concat OS_VERSION concat '.' concat OS_RELEASE as RELEASE, OS_NAME, OS_VERSION, OS_RELEASE
  from sysibmadm/env_sys_info;