W$BROWSERINFO

The W$BROWSERINFO routine provides information about a requesting Web browser. This routine is used in conjunction with the ACUCOBOL-GT Web Runtime.

Usage

CALL "W$BROWSERINFO" 
    USING BROWSERINFO-DATA

Parameters

BROWSERINFO-DATA Group item as follows:

01 BROWSERINFO-DATA.
   03 USER-AGENT-STRING       PIC X(50).
   03 BROWSWER-MAJOR-VERSION  PIC X COMP-X.
   03 BROWSWER-MINOR-VERSION  PIC X COMP-X.
BROWSERINFO-DATA is found in the COPY library acucobol.def. The values are as follows:
USER-AGENT-STRING This is the browser's user_agent field. It contains the name of the browser as it is sent to the HTTP server. It may also contain version numbers, product name, and operating system name. Netscape browsers set the first seven characters of this field to Mozilla. Microsoft Internet Explorer sets this field to Microsoft Internet Explorer.
BROWSER-MAJOR-VERSION    This is the major version number reported by the browser. This is not the same as the major version number displayed in the browser's About screen. Many browsers simply place a 0 in this field.
BROWSER-MINOR-VERSION This is the minor version number reported by the browser. This is not the same as the minor version number displayed in the browser's About screen.

Description

Upon return from W$BROWSERINFO, all of the data elements contained in BROWSWERINFO-DATA are filled in. If you call W$BROWSERINFO when the COBOL application is not running in a Web browser via the Web Runtime, the first field is set to spaces, and the last two fields are set to zero (0).