|
|
|
/* COPYRIGHT JÜRGEN REULE 2010-2023 */ |
|
|
|
|
|
|
|
|
PGM |
PARM(&MODEL &PRCGRP &PRCFEAT + |
|
|
|
|
&SYSNAME &RELEASE &LASTIPL) |
|
|
|
|
|
|
|
|
DCL |
VAR(&MODEL) TYPE(*CHAR) LEN(4) |
|
|
|
DCL |
VAR(&RLSLVL) TYPE(*CHAR) LEN(6) |
|
|
|
DCL |
VAR(&PRCGRP) TYPE(*CHAR) LEN(3) |
|
|
|
DCL |
VAR(&PRCFEAT) TYPE(*CHAR) LEN(4) |
|
|
|
DCL |
VAR(&SYSNAME) TYPE(*CHAR) LEN(8) |
|
|
|
DCL |
VAR(&RELEASE) TYPE(*CHAR) LEN(10) |
|
|
|
DCL |
VAR(&LASTIPL) TYPE(*CHAR) LEN(13) |
|
|
|
|
|
|
|
|
DCL |
VAR(&PRD) TYPE(*CHAR) LEN(27) |
|
|
|
DCL |
VAR(&PRDID) TYPE(*CHAR) LEN(7) |
|
|
|
DCL |
VAR(&PRDINF) TYPE(*CHAR) LEN(17) |
|
|
|
DCL |
VAR(&OPTION) TYPE(*CHAR) LEN(4) |
|
|
|
DCL |
VAR(&JOB) TYPE(*CHAR) LEN(26) |
|
|
|
DCL |
VAR(&INT) TYPE(*CHAR) LEN(16) |
|
|
|
|
|
|
|
|
DCL |
VAR(&RCV) TYPE(*CHAR) LEN(256) |
|
|
|
DCL |
VAR(&RCVLEN) TYPE(*CHAR) LEN(4) |
|
|
|
DCL |
VAR(&RCVLENN) TYPE(*DEC) LEN(4) VALUE(256) |
|
|
|
|
|
|
|
|
DCL |
VAR(&ERR) TYPE(*CHAR) LEN(16) |
|
|
|
DCL |
VAR(&ERRLEN) TYPE(*CHAR) LEN(4) |
|
|
|
DCL |
VAR(&ERRLENN) TYPE(*DEC) LEN(4) VALUE(16) |
|
|
|
|
|
|
|
|
DCL |
VAR(&V) TYPE(*CHAR) LEN(1) |
|
|
|
DCL |
VAR(&R) TYPE(*CHAR) LEN(1) |
|
|
|
DCL |
VAR(&M) TYPE(*CHAR) LEN(1) |
|
|
|
DCL |
VAR(&VRM) TYPE(*CHAR) LEN(6) |
|
|
|
DCL |
VAR(&ZERO) TYPE(*CHAR) LEN(1) VALUE('0') |
|
|
|
|
|
|
|
|
MONMSG |
MSGID(CPF0000) |
|
|
|
|
|
|
|
|
/* |
------------- + |
|
|
|
Längen setzen + |
|
|
|
------------- */ |
|
|
|
CHGVAR |
VAR(%BIN(&RCVLEN)) VALUE(&RCVLENN) |
|
|
|
CHGVAR |
VAR(%BIN(&ERRLEN)) VALUE(&ERRLENN) |
|
|
|
CHGVAR |
VAR(&ERR) VALUE(&ERRLEN) |
|
|
|
|
|
|
|
|
/* |
------------------------ + |
|
|
|
Rückgabewerte vorbelegen + |
|
|
|
------------------------ */ |
|
|
|
CHGVAR |
VAR(&MODEL) VALUE(' ') |
|
|
|
CHGVAR |
VAR(&RLSLVL) VALUE(' ') |
|
|
|
CHGVAR |
VAR(&PRCGRP) VALUE(' ') |
|
|
|
CHGVAR |
VAR(&PRCFEAT) VALUE(' ') |
|
|
|
CHGVAR |
VAR(&SYSNAME) VALUE(' ') |
|
|
|
CHGVAR |
VAR(&RELEASE) VALUE(' ') |
|
|
|
CHGVAR |
VAR(&LASTIPL) VALUE(' ') |
|
|
|
|
|
|
|
|
/* |
-------------------- + |
|
|
|
Systemname ermitteln + |
|
|
|
-------------------- */ |
|
|
|
RTVNETA |
SYSNAME(&SYSNAME) |
|
|
|
|
|
|
|
|
/* |
-------------------------------------- + |
|
|
|
Modell und Prozessor-Feature ermitteln + |
|
|
|
-------------------------------------- */ |
|
|
|
RTVSYSVAL |
SYSVAL(QMODEL) RTNVAR(&MODEL) |
|
|
|
RTVSYSVAL |
SYSVAL(QPRCFEAT) RTNVAR(&PRCFEAT) |
|
|
|
|
|
|
|
|
/* |
------------------------------------ + |
|
|
|
Zeitpunkt des letzten IPLs ermitteln + |
|
|
|
------------------------------------ */ |
|
|
|
CHGVAR |
VAR(&RCV) VALUE(' ') |
|
|
|
CHGVAR |
VAR(&JOB) VALUE('SCPF QSYS 000000') |
|
|
|
CALL |
PGM(QUSRJOBI) PARM(&RCV &RCVLEN + |
|
|
|
|
JOBI0400 &JOB &INT &ERR) |
|
|
|
CHGVAR |
VAR(&LASTIPL) VALUE(%SST(&RCV 63 13)) |
|
|
|
|
|
|
|
|
/* |
----------------- + |
|
|
|
Release ermitteln + |
|
|
|
----------------- */ |
|
|
|
CHGVAR |
VAR(&RCV) VALUE(' ') |
|
|
|
CHGVAR |
VAR(&PRD) VALUE('*OPSYS *CUR 0000*CODE ') |
|
|
|
CALL |
PGM(QSZRTVPR) PARM(&RCV &RCVLEN + |
|
|
|
|
PRDR0100 &PRD &ERR) |
|
|
|
CHGVAR |
VAR(&PRDID) VALUE(%SST(&RCV 13 7)) |
|
|
|
CHGVAR |
VAR(&RLSLVL) VALUE(%SST(&RCV 20 6)) |
|
|
|
CHGVAR |
VAR(&OPTION) VALUE(%SST(&RCV 30 4)) |
|
|
|
|
|
|
|
|
/* |
------------------------- + |
|
|
|
Prozessorgruppe ermitteln + |
|
|
|
------------------------- */ |
|
|
|
CHGVAR |
VAR(&RCV) VALUE(' ') |
|
|
|
CHGVAR |
VAR(&PRDINF) VALUE(&PRDID + |
|
|
|
|
*CAT &RLSLVL + |
|
|
|
|
*CAT &OPTION) |
|
|
|
CALL |
PGM(QLZARTV) PARM(&RCV &RCVLEN + |
|
|
|
|
LICR0200 &PRDINF + |
|
|
|
|
LICP0100 &ERR) |
|
|
|
CHGVAR |
VAR(&PRCGRP) VALUE(%SST(&RCV 48 3)) |
|
|
|
|
|
|
|
|
/* |
----------------- + |
|
|
|
Release ermitteln + |
|
|
|
----------------- */ |
|
|
|
CHGVAR |
VAR(&VRM) VALUE(&RLSLVL) |
|
|
|
|
|
|
|
|
IF |
COND(%SST(&VRM 1 1) *EQ &ZERO) + |
|
|
|
|
THEN(CHGVAR VAR(%SST(&VRM 1 1)) VALUE(V)) |
|
|
|
IF |
COND(%SST(&VRM 3 1) *EQ &ZERO) + |
|
|
|
|
THEN(CHGVAR VAR(%SST(&VRM 3 1)) VALUE(R)) |
|
|
|
IF |
COND(%SST(&VRM 5 1) *EQ &ZERO) + |
|
|
|
|
THEN(CHGVAR VAR(%SST(&VRM 5 1)) VALUE(M)) |
|
|
|
|
|
|
|
|
IF |
COND(%SST(&VRM 1 1) *NE V) THEN(CHGVAR + |
|
|
|
|
VAR(&V) VALUE(V)) |
|
|
|
IF |
COND(%SST(&VRM 3 1) *NE R) THEN(CHGVAR + |
|
|
|
|
VAR(&R) VALUE(R)) |
|
|
|
IF |
COND(%SST(&VRM 5 1) *NE M) THEN(CHGVAR + |
|
|
|
|
VAR(&M) VALUE(M)) |
|
|
|
|
|
|
|
|
CHGVAR |
VAR(&RELEASE) VALUE(+ |
|
|
|
|
&V *TCAT %SST(&VRM 1 2) + |
|
|
|
|
*TCAT &R *TCAT %SST(&VRM 3 2) + |
|
|
|
|
*TCAT &M *TCAT %SST(&VRM 5 2)) |
|
|
ENDPGM: |
ENDPGM |
|
|