The Comet Gateways

From CometWiki

(Difference between revisions)
Jump to: navigation, search
Line 6: Line 6:
'''[GATEWAYS]'''
'''[GATEWAYS]'''
-
Gateway = 2,0;    Sort driver gateway    (gateway G00)
+
Gateway = 2,0;    Sort driver gateway    (gateway G00)
-
 
+
Gateway = 3,0;    Winsock gateway        (gateway G01)
-
Gateway = 3,0;    Winsock gateway        (gateway G01)
+
Gateway = 4,0;    XAP gateway (eComet)    (gateway G02)
-
 
+
Gateway = 5,0;    ODBC gateway            (gateway G03)
-
Gateway = 4,0;    XAP gateway (eComet)    (gateway G02)
+
Gateway = 6,0;    Serial gateway          (gateway G04)
-
 
+
Gateway = 7,0;    Universal gateway (fax) (gateway G05)
-
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:
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:

Revision as of 10:07, 23 May 2009

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:

[GATEWAYS]

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.



.

Personal tools