W$GETURL works with the Web Runtime. It tells the runtime to pass a given URL (Uniform Resource Locator) to the host browser. The browser handles this URL as if it were typed into the URL entry field. After a CALL to W$GETURL, subsequent URL requests are ignored until the CALL completes. See the Acucorp manual A Programmer's Guide to the Internet for a description of the Web Runtime.




URL PIC X(n) Contains the complete URL. This can be of any type, such as http, ftp, news, mailto, gopher, or javascript.
TARGET PIC X(n) Represents the destination for displaying the URL. This can be the name of a window or a frame, or one of several special target names. If you specify _current or _self or _top, the response data is written to the browser window, and the Web Runtime is unloaded. If you specify _new or _blank, the response data is written to a new browser window.

You can also write the response data to a frame by specifying the frame name as the target parameter.


After a CALL is made to W$GETURL, subsequent URL requests are ignored until the CALL completes.


Each URL that you pass with the W$GETURL routine contains a protocol and a path, separated by a colon. For example, http://www.acucorp.com/ tells the browser to use the HyperText Transfer Protocol and to contact the Web server www.acucorp.com and to ask for the root page (/).

Sending e-mail uses themailto protocol. For example, mailto:support@acucorp.com opens an e-mail message to the user support at the machine acucorp.com.

JavaScript is also supported as a protocol, so you can execute JavaScript sequences that display dialog boxes, create Web pages, build text files, and so forth.

Note: This routine is available only when the calling COBOL program is running in a Web browser window via the ACUCOBOL-GT Web Runtime. The routine is not available to programs run by the standard runtime when the standard runtime is executed by a Web browser. The RETURN-CODE register is set to 1 after a successful call and set to "0" if this routine is unavailable.