


The W$BROWSERINFO routine provides information about a requesting Web browser. This routine is used in conjunction with the ACUCOBOL-GT Web Plug-In. See the separate Acucorp book titled A Programmer's Guide to the Internet for more information about using the Web plug-in.
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
BROWSERINFO-DATA is found in the COPY library "acucobol.def".
USER-AGENT-STRING 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 PIC X COMP-X
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. For example, both Netscape Navigator 3.03 and Microsoft Internet Explorer 3.0 put "0" in this field.
BROWSER-MINOR-VERSION PIC X COMP-X
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. For example, both Netscape Navigator 3.03 and Microsoft Internet Explorer 3.0 put "9" in this field.
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 plug-in, then the first field is set to spaces, and the last two fields are set to zero ("0").