WIN$VERSION

Returns version information for Windows host platforms.
Note: This ACUCOBOL-GT library routine is available in this COBOL version. Any compatibility issues in this COBOL system are in the Compatibility Issues section at the end of the topic.

This routine provides more information about the system than is returned by the ACCEPT FROM SYSTEM-INFO statement.

Note: To determine your Windows operating system, we recommend that you call the WIN$VERSIONHELPER library routine from your COBOL program rather than using WIN$VERSION for this purpose. The WIN$VERSIONHELPER library routine enables you to access Windows Version Helper functions. See WIN$VERSIONHELPER for details.

Usage

CALL "WIN$VERSION" 
    USING WINVERSION-DATA

Parameters

WINVERSION-DATA Group item. The WINVERSION-DATA group item is found in the COPY library winvers.def.

Comments

Upon return from WIN$VERSION, all of the data elements contained in WINVERSION-DATA are filled in. If you call WIN$VERSION and the host machine is not a Windows system, the fields are set to zero.

The following list provides a description of each WINVERSION-DATA field. For a list of possible values for any given field, see the Microsoft operating-system-version Web page.

  • WIN-MAJOR-VERSION - The major version number reported by Windows.
  • WIN-MINOR-VERSION - The minor version number reported by Windows.
  • WIN-PLATFORM - Provides a general description of the host system.
  • WIN-WORDSIZE - This item is set to WIN-WORDSIZE-32 for a 32-bit operating system, and WIN-WORDSIZE-64 for a 64-bit operating system.
  • WIN-BUILDNUMBER - Identifies the build number of the operating system.
  • WIN-CSDVERSION - Indicates the latest Service Pack installed on the system. If no Service Pack has been installed the string is empty.
  • WIN-SERVICEPACK-MAJOR - Indicates the major version number of the latest Service Pack installed on the system. If no Service Pack has been installed the value is 0.
  • WIN-SERVICEPACK-MINOR - Indicates the minor version number of the latest Service Pack installed on the system. If no Service Pack has been installed the value is 0.
  • WIN-SUITEMASK - This is a bit mask that identifies the product suites available on the system.
  • WIN-PRODUCTTTYPE - Identifies additional information about the system.

Compatibility Issues

The copybook winvers.def is not available in this COBOL system.

The following fields are not supported in this COBOL system:

  • WIN-BUILDNUMBER
  • WIN-CSDVERSION
  • WIN-SERVICEPACK-MAJOR
  • WIN-SERVICEPACK-MINOR
  • WIN-SUITEMASK
  • WIN-PRODUCTTTYPE

These fields will return spaces or zeroes, as appropriate.