This DLL exports functions to get and set the values in a SYSLEVEL file.
SYSLEVEL files are used by OS/2 to save information about the version of a component. The name of a SYSLEVEL file is always SYSLEVEL.xxx, where xxx represents the component for which the particular SYSLEVEL file is used. For example, the file SYSLEVEL.OS2 contains the version information about the base OS/2 operating system; the file SYSLEVEL.MPT contains the version information on the MPTS component, and so on.
You can use the OS/2 program SYSLEVEL to view the information contained in all SYSLEVEL files currently on your system.
Unfortunately, no documentation is available for the REXX DLL file, SYSLVL.DLL.
So far, I've found the following information about this DLL:
The exported functions are:
Below is a sample REXX program using only the GET functions from this DLL:
/* sample REXX program using the GET functions from the DLL */ /* SYSLVL.DLL */ /* It seems that the only parameter for the GET functions is the name */ /* of the SYSLEVEL file. If the fully qualified path of the SYSLEVEL */ /* file is missing, the functions search the file on all local */ /* hard disk partitons. If the file is not found, the functions */ /* return -2. */ /* install some error handlers */ /* to ensure that ReleaseMemory is called in all */ /* cases */ signal on halt name ProgExit signal on syntax name ProgExit signal on error name ProgExit signal on failure name ProgExit /* stem with the exported GET functions */ i=0; functions.0 = i i=i+1; functions.i = 'GETSYSID' i=i+1; functions.i = 'GETSYSEDITION' i=i+1; functions.i = 'GETSYSVERSION' i=i+1; functions.i = 'GETSYSMODIFY' i=i+1; functions.i = 'GETSYSDATE' i=i+1; functions.i = 'GETCSDLEVEL' i=i+1; functions.i = 'GETCSDPREV' i=i+1; functions.i = 'GETSYSNAME' i=i+1; functions.i = 'GETCOMPID' i=i+1; functions.i = 'GETREFRESHLVL' functions.0 = i /* name of the syslevel file for testing */ syslevelFile = 'C:\MPTN\SYSLEVEL.MPT' /* load the functions */ Call RxFuncAdd 'SysLvlLoadFuncs' , 'SYSLVL' , 'SysLvlLoadFuncs' Call SysLvlLoadFuncs , 'SYSLVL' , 'SysLvlLoadFuncs' /* now call the GET functions */ do i = 1 to functions.0 curFunction = functions.i say 'Now calling the function ' || curFunction || '...' iLine = 'call ' curFunction 'syslevelFile' interpret iLine say ' ... the result is "' || result || '".' end /* do i = 1 to functions.0 */ ProgExit: /* this call seems to be necessary! */ Call ReleaseMemory exit
The output of the program above is shown below. (Note that the function GetSysEdition returns binary data. Therefore, the return code of GetSysEdition is not included in the output listing!):
Now calling the function GETSYSID... ... the result is "24609". Now calling the function GETSYSEDITION... ... the result is <binary data> Now calling the function GETSYSVERSION... ... the result is "5.11". Now calling the function GETSYSMODIFY... ... the result is "1". Now calling the function GETSYSDATE... ... the result is "0". Now calling the function GETCSDLEVEL... ... the result is "WRG8415_". Now calling the function GETCSDPREV... ... the result is "WRG8400_". Now calling the function GETSYSNAME... ... the result is "IBM OS/2 TCP/IP Stack". Now calling the function GETCOMPID... ... the result is "5639B1700". Now calling the function GETREFRESHLVL... ... the result is "1".