MPE version
PARM vers_parm=!hprelversion “Vers” script# react to MPE version stringsetvar vers "!vers_parm”# convert to integer, e.g.. "C.65.02" => 6502setvar vers str(vers,3,2) + rht(vers,2)setvar vers !versif vers >= 7000 then echo On 7.0!elseif vers >= 6500 then echo On 6.5!elseif vers >= 6000 then echo On 6.0!endif
Notes:
- The CI does not support a direct mechanism to let the programmer know if a certain command, function, variable or other new feature is present on the system at hand. The bound() function lets you test for the existence of any variable prior to referencing it. It is trickier to test for the existence of a function prior to invoking it. Thus, it may be necessary to test the MPE OS version prior to using a new feature.
- :showvar @vers@HPOSVERSION = C.70.00HPRELVERSION = C.70.01HPVERSION = X.70.11
- :vers On 7.0! :vers C.65.01 On 6.5!