xcall MIAMEX, MX_OSVER, os'name, {,osver, osrel, asplatform}
This function retrieves information about the current host operating system or ATE, including its name, version, and release, plus the platform that this copy of A-Shell was compiled for. This can be useful in applications which wish to take advantage of features that are only available under certain platforms.
Parameters
osname (String, 10+) [out]
returns the name of the host operating system. For Windows, the possibilities are: “Win95”, “Win98”, “WinME”, “WinNT 3.51”, “WinNT 4.0”, “Win2000”, and “WinXP”. (.NET Server currently is indistinguishable in this field from XP.) If the version information is not recognized, it will be reported as “Win X.Y” where X is the major version number and Y is the minor version number. For 64-bit versions, "/64" will be appended to the end. For UNIX/Linux, OSNAME will return the same as the “uname -s” command, e.g. “Linux,” “SCO_SV,” “AIX.”
osver (String, 16+) [out]
returns the “version” of the operating system. For Windows, this might contain “OSR2” for Win95, “SE” for Win98, or “Service Pack 6” for NT. For UNIX/Linux, it will be what “uname -v” returns, e.g. a date string for Linux, or “5.0.5” (SC0), or “4” (AIX 4.3).
osrel (String, 16+) [out]
returns the “release” of the operating system. For Windows, this will be the build number. For UNIX/Linux, this will be what “uname -r” returns, e.g. “2.4.2-2” (Linux), “3.2” (SCO), “3” (AIX 4.3).
asplatform (String, 16+) [out]
returns the generic platform that this copy of A-Shell was compiled for. (This is the same string that would be returned in the SYSDOS field in GETJTB.SBR.) Examples are: “AIX”, “SCO Unix”, “Linux”, “Windows/32”.
ATE
Beginning with A-Shell 4.9.988 of May 2007, which is required on both the A-Shell and ATE ends, MIAMEX MX_OSVER supports returning information about the ATE client. The expanded syntax is:
xcall MIAMEX, MX_OSVER, osname {,osver, {,osrel {,asplatform {,ate'osname {,ate'osver {,ate'osrel {,ate'platform}}}}}}}
The parameters ate'osname, ate'osver, ate'osrel, and ate'platform are equivalent to the osname, osver, osrel and asplatform parameters, except they return the information about the ATE client, if applicable. Otherwise they return null strings.
The MIAMEX.BP sample program in [908,30] of the SOSLIB has been updated to illustrate the new fields.
History
2011 June, A-Shell 5.1.1221
The osname parameter will now be returned with "/64" appended to the end when running a 64 bit Windows OS.