The SYSGEN configuration utility/Gateways

From CometWiki

Jump to: navigation, search

[GATEWAYS]

Minimum Requirements: 
                                                                                                                            .
This group is not required.
                                                                                                                            .
Refer to the minimal INI file to see the minimum requirements to configure Comet.

The GATEWAYS group contains information about the configured gateways. Gateways provide MTB programs with access to special facilities in Comet, such as the sort driver, Winsock communications, XAP capability (for eComet applications), the Comet2000 ODBC Client driver, and the universal gateway (fax driver).

This group contains the following segment title:

           Gateway = gateway-type,gateway-subtype;

For example:

Gateway = 2,0;    Sort driver gateway
Gateway = 3,0;    Winsock gateway
Gateway = 4,0;    XAP gateway (eComet)
Gateway = 5,0;    ODBC gateway
Gateway = 6,0;    Serial gateway
Gateway = 7,0;    Universal gateway (fax)

Segment Title

Gateway = gateway-type,gateway-subtype;

This is the only segment title in the GATEWAYS group. Each entry corresponds to a gateway device name in the form "Gxx", where xx is a numeric value between 00 and 99. Thus, the first entry corresponds to G00, the second entry to G01, and so forth. The total number of gateways that can be configured is 100 (G00 through G99).

The Gateway segment title contains the following parameters:

gateway-type

This parameter specifies the type of gateway. The following types are currently supported:

Type Description
2 Sort driver gateway
3 Winsock gateway
4 XAP gateway (for eComet applications)
5 ODBC client gateway
6 Serial gateway
7 Universal gateway (fax)

See below for background information about these gateways.

gateway-subtype

This parameter is not currently used.

Configuration Recommendations

Gateways configured in the global section of an INI file apply to all nodes. However, a gateway configured in the local section (i.e., within a [NODE] group) will override all of the global gateway definitions. Since gateways are not numbered in the INI file, SYSGEN has no way to know which ones you might want to override. Therefore, when declaring gateways in the [NODE] group, declare and redeclare all the gateways that node might need or want.

Any program that wants to use a gateway should "find" the gateway it wants by cycling through all gateways, using DSTAT to determine if this is the gateway type it needs. Here is a general-purpose MTB 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  GateName$
!
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


Gateways Types

Sort driver gateway

The sort driver gateway provides an efficient sorting method for both the Reporter and your MTB 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).

If multiple users want to perform sorting operations simultaneously, you will need to configure more than one sort driver gateway. Each configured sort driver gateway requires 64K of system memory above and beyond the other memory requirements of Comet. Additionally, the number of partitions that can be configured for a Comet system will be reduced by 1, if one or more sort driver gateways are configured.

Note: We suggest that you configure one gateway for each Reporter user.

Winsock gateway

The Winsock gateway, available with Comet2000 and higher, provides a way for MTB applications to communicate over the Internet using industry-standard application-layer protocols. For example, Signature Systems provides a sample program that shows how to send e-mail using the Simple Mail Transfer Protocol (SMTP). This sample program is available in the “download” section of www.signature.net.

XAP gateway (for eComet applications)

The XAP gateway, available with Comet2000 and higher, provides a way to create eComet applications. The many features of this gateway are described in the eComet tutorial.

ODBC client gateway

The ODBC client gateway, available with Comet2000 and higher, provides a way for MTB 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.

Serial gateway

The serial gateway allows a MoreThanBasic (MTB) 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.

Universal Gateway

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.

Personal tools