Code:
- // This program is free software: you can redistribute it and/or modify
- // it under the terms of the GNU General Public License as published by
- // the Free Software Foundation, either version 3 of the License, or
- // (at your option) any later version.
- //
- // This program is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- // GNU General Public License for more details.
- //
- // You should have received a copy of the GNU General Public License
- // along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- H dftactgrp(*no)
-
- DosIsAtLeast PR N
- D pMinimumOs 9 const
-
- /free
- if osIsAtLeast('V05R01M00');
- dsply 'V5R1M0';
- endif;
-
- if osIsAtLeast('V05R02M00');
- dsply 'V5R2M0';
- endif;
-
- if osIsAtLeast('V05R03M00');
- dsply 'V5R3M0';
- endif;
-
- if osIsAtLeast('V05R04M00');
- dsply 'V5R4M0';
- endif;
-
- if osIsAtLeast('V06R01M00');
- dsply 'V6R1M0';
- endif;
-
- *inlr = *on;
-
- /end-free
-
- PosIsAtLeast B export
- D PI N
- D pMinimumOs 9 const
-
- DibmQUSROBJD PR extpgm(QUSROBJD)
- D pReciver 32767 options(*varsize)
- D pReciverLen 10I 0 const
- D pFormat 8 const
- D pObjLib 20 const
- D pObjType 10 const
- D pError likeds(QUSEC)
-
- D OBJD0300data DS likeds(QUSD0300)
- D pass S N inz(*off)
- D error DS likeds(QUSEC)
- D qsysLibrary DS qualified
- D name 10 inz('QSYS')
- D lib 10 inz('*LIBL')
- D releaseLevel S 9 inz(*blank) static
-
- /copy QSYSINC/QRPGLESRC,QUSROBJD
- /copy QSYSINC/QRPGLESRC,QUSEC
-
- /free
- if releaseLevel = *blank;
- // we only need to get the system level of QSYS once, as
- // the release level can't change in the same job.
-
- // get the system level for library QSYS
- ibmQUSROBJD(OBJD0300data:%size(OBJD0300data):'OBJD0300':
- qsysLibrary:'*LIB':error);
- releaseLevel = OBJD0300data.QUSSL08;
- endif;
-
- // compare the value to the passed in release
- pass = (releaseLevel >= pMinimumOS);
-
- return pass;
- /end-free
- P E
|
|