Give this a test......... Original code came from Iseries network and I tweaked it a bit........
PHP Code:
h DFTACTGRP(*NO) bnddir('QC2LE') Option(*SrcStmt: *NoDebugIO)
d Date s d
d Date1 s d inz(D'2004-07-01')
d UsaDate s 8 0
d getversion PR 6
d atoll pr 20i 0 extproc('atoll')
d string * value options(*string)
/free
if getversion() = 'V5R1M0';
usaDate = atoll(%char(date1: *usa0));
else;
date = %date();
usaDate = %int(%char(date : *usa0));
endif;
*inlr = *on;
/end-free
*------------------------------------------------
* Use QSZRTVPR API to get the current OS release
*------------------------------------------------
P getversion B
d getversion PI 6A
d ErrorCode DS qualified
d BytesProv 10I 0 INZ(0)
d BytesAvail 10I 0 INZ(0)
d PRDI0100 DS qualified
d ProdID 7A inz('*OPSYS')
d version 6A inz('*CUR')
d ProdOpt 4A inz('0000')
d LoadID 10A inz('*CODE')
d QSZRTVPR PR extpgm('QSZRTVPR')
d RecVar 32767A options(*varsize)
d RecVarLen 10I 0 const
d FormatName 8A const
d ProdInfo like(PRDI0100) const
d ErrCode 32767A options(*varsize)
d PRDR0100 DS qualified
d BytesRtn 10I 0
d BytesAval 10I 0
d 10I 0
d ProdID 7A
d version 6A
/free
QSZRTVPR( PRDR0100
: %size(PRDR0100)
: 'PRDR0100'
: PRDI0100
: ErrorCode );
return PRDR0100.version;
/end-free
P E
Comment