The Comet Gateways
Comet Gateways There are several gateways available in Comet98 and Comet2000. These gateways provide access to features that are external to Comet, such as a high-speed sorting function, Internet application-layer protocols and advanced Common Gateway Interface processing, ODBC data sources, the serial port on a PC, and an internal fax/modem.
There are two basic steps for using a gateway: configuration and programming. The configuration step is accomplished with the [GATEWAYS] section in the INI file (which is processed by the SYSGEN program). Each configured gateway is listed in sequence. For example:
Gateway = 2,0; Sort driver gateway (gateway G00) Gateway = 3,0; Winsock gateway (gateway G01) Gateway = 4,0; XAP gateway (eComet) (gateway G02) Gateway = 5,0; ODBC gateway (gateway G03) Gateway = 6,0; Serial gateway (gateway G04) Gateway = 7,0; Universal gateway (fax) (gateway G05)
The programming step starts with opening a specific gateway device. For example, the following statement opens the Winsock gateway shown in the above [GATEWAYS] configuration:
OPEN (20) “G01” ! open Winsock gateway
Note: The Reporter automatically generates the IB code to open the sort gateway, and the eComet Extensions automatically open the XAP gateway and assign the logical unit numbers to it.
For the other types of gateways, here is a general-purpose IB routine that shows how to locate and open a specific type of gateway on LUN (1). In the following example, the program searches for a type 6 gateway (serial gateway), which is signified by the ‘@06@’ returned by the DSTAT function.
length 3.0 & local I length 3 & local Ga teName$ Open.Gateway: print(0) 'Opening Gateway . . .' for I = 100 TO 199 GateName$ = 'G' + SUB(STRIP(STR(I)), 2, 2) if SUB(DSTAT(GateName$, excp=Try.Next.Gateway), 4, 1) EQ '@06@'_ goto Found.Gateway Try.Next.Gateway: next I print(0) 'Cannot Locate Gateway.' goto Abort Found.Gateway: open(1) GateName$ print(0) 'Gateway found as ';GateName$ return
The following chart shows each type of gateway, whether it is available in Comet98 or Comet2000 (and whether it is included with the base level or available as a add-on product), and describes its basic features. There are also links to documentation and sample programs.
|The sort driver gateway provides an efficient sorting method for both the Reporter and your IB applications. If the data to be sorted takes up less than 64K bytes, the sort driver performs the sort function in memory, and offers the fastest sort available on a Comet system. For data greater than 64K, the sort driver performs it's sorting using temporary disk files (either RAM or hard disk).
You need to configure one sort driver gateway for each user performing sorting operations simultaneously. We suggest configuring one sort gateway for each Reporter user. Each configured sort driver gateway requires 64K of system memory above and beyond the other memory requirements of Comet. Additionally, if one or more sort driver gateways are configured, the number of partitions that can be configured for a Comet system is reduced by 1.
For information on using the sort gateway from within an IB program, see the sort gateway section in the MoreThanBasic documentation.
|included||The Winsock gateway provides a way for IB applications to communicate over the Internet using industry-standard application-layer protocols. Introduced with Comet 2005, the Comet Email Printer provides a simple method for sending email from your Comet app.|
|add-on||The XAP gateway provides advanced Common Gateway Interface processing, and offers a way to create interactive web pages and eComet applications. XAP technology is patent pending. The many features of the XAP gateway are described in the eComet tutorial.
|add-on||The ODBC client gateway provides a way for IB applications to interact with external data sources, including Microsoft Access databases, Excel spreadsheets, and other ODBC-compliant data sources. For more information, see the ODBC client gateway documentation|
|add-on||The serial gateway allows an InternetBasic (IB) program to communicate with an external serial device connected to the COM port of the Comet system. For more information, see the serial gateway documentation|
|included||The universal gateway allows generic communication between Comet and an external driver program. The fax driver is the first example that uses the universal gateway. For information about the fax driver, see the fax driver documentation.|
|included||The local XAP gateway allows development of web applications without an XAP license. These applications are limited to pages served by the local host. It's a great way to develop and test your site before implementing a full XAP configuration. For more info on using Comet to host your web site, check out the XAP tutorials..|