JANUS DEFINEREMOTE: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (1 revision)
(No difference)

Revision as of 00:13, 1 July 2011

<section begin="desc" />Define remote port and characteristics for OPENSERV port.<section end="desc" />

This command associates a remote server with a Janus OPENSERV port and specifies characteristics of connections with that remote server.

See JANUS DEFINE for a discussion of when you need to issue the JANUS DEFINE command.

Syntax

<section begin="syntax" /> JANUS DEFINEREMOTE portname remotename host portnum [optional parms...] <section end="syntax" />

JANUS DEFINEREMOTE command syntax

Where each of the first four parameters is positional and required:

portname The name of the Janus port(s) with which a remote server is being associated. Wildcard characters may be used in portname, indicating that the remote server is associated with all previously defined SDS or OPENSERV ports matching the pattern. There must be at least one previously defined SDS or OPENSERV port matching portname. Any ports which match portname but have not yet been defined will not be associated with remotename, even if they are subsequently defined.
remotename A 1 - 30 character name for the remote server to which this Janus port will connect and/or from which connections will be accepted. The remote server may be a Sybase SQL server, a Sybase or Janus Open Server, or another vendor's Open Server. Wildcard characters may not be used in the remotename specification.
host The IP address or hostname for the device on which the server specified in remotename is running.
portnum The port number on which the server specified in remotename is running.

Janus Open Server, Sybase Open Server, and SQL Server names are case sensitive. If you are using server names that contain lower case characters, execute a *LOWER before running the JANUS DEFINEREMOTE.

Valid abbreviations for DEFINEREMOTE are DEFREM, DEFREMOTE and DEFINEREM.

Optional parameters

The optional parameters are shown in the following sections.

CHARSET xxx

This parameter specifies the character set to use for this remote port, allowing override of either the default character set or the character set specified on the JANUS CHARSET subcommand. The default character set is iso_1. CHARSET has no effect on the operation of any application in Model 204. The name of the specified character set is simply forwarded to the target server for a Janus Open Client application. For further discussion, see JANUS CHARSET.

INONLY

This parameter specifies that only incoming calls are allowed from this remote server, that is, Janus Open Client applications which are running on portname are not allowed to use $DB_xxx functions to connect with remotename. The default is to allow connections both to and from the remote server. If a site does not have Janus Open Client, INONLY is the default since outgoing connections cannot be established without Janus Open Client

LANGUAGE xxx

This parameter specifies the language to use for this remote port, allowing override of either the default language or the language specified on the JANUS LANGUAGE subcommand. The default language is us_english. LANGUAGE has no effect on the operation of any application in Model 204. For further discussion, see JANUS LANGUAGE.

NOSITE

This parameter specifies that an outgoing (Janus Open Client) connection is not to use a site handler, that is, it is to appear as a client to server rather than a server to server connection to the target server. Use of NOSITE makes it possible to connect to a remote server without the Janus port being defined to the that server; this is required for Microsoft SQL Server. When using Sybase or Omni SQL Server or Sybase Adaptive Server, the sp_addremotelogin procedure, which normally can translate M204 user IDs to Sybase user IDs, cannot be used on a client to server connection.

OPTSITE

This parameter specifies that an outgoing (Janus Open Client) connection can choose to not use a site handler by using the NOSITE parameter on the $DB_OPEN call. That is, it can appear as a client to server rather than a server to server connection to the target server.

OUTONLY

This parameter specifies that only outgoing calls to this remote server are allowed. The default is to allow connections both to and from the remote server. If a site does not have Janus Open Server, OUTONLY is the default since incoming connections cannot be handled without Janus Open Server.

SITEACCT xxx

This parameter specifies the Model 204 ACCOUNT for the site handler for the remote server. If no SITEACCT is specified the ACCOUNT for the user executing the DEFINEREMOTE command is used.

SITEUSER xxx

This parameter specifies the Model 204 user ID for the site handler for the remote server. If no SITEUSER is specified the user ID for the user executing the DEFINEREMOTE command is used.

TIMEOUT xxx

This parameter specifies the number of seconds without a logical connection after which the site handlers will log off and the connection to the remote server will be broken. The default TIMEOUT is 60 seconds.

TRUST, JANUS DEFINEREMOTE

This parameter permits the port to initiate a user session for an incoming user ID by performing a trusted login and ignoring the password. To minimize the security hole introduced by this parameter, the VERIP parameter should also be specified when TRUST is specified.

VERIP

This parameter specifies validation of the IP address of the connecting remote server. This indicates that Janus should reject a connection attempt by the remote server if the IP address does not match either the IP address specified on the JANUS DEFINEREMOTE command or the IP address found by doing a DNS name lookup on the host name specified on the JANUS DEFINEREMOTE command. VERIP does not provide bullet-proof security because it is not a difficult task to spoof (fake) an IP address. Nevertheless, it is better than nothing and should certainly be used whenever the TRUST parameter is specified.

Janus remote server processing and examples

Note that several of the optional parameters of JANUS DEFINEREMOTE use the term site handler. One reason a remote port must be defined is to allow a Janus Open Server port to accept requests from remote server host. A site handler is used for this purpose, and for Janus Open Client communications to remote servers without the NOSITE parameter.

A site handler is an sdaemon that performs the task of multiplexing logical user connections across a physical connection to a remote server. The site handler appears as a Model 204 user the first time a logical connection is established with the remote server. The site handler remains logged on for as long as any logical connection exists. Then, after TIMEOUT seconds have elapsed the site handler also logs off. The site handler occupies an sdaemon thread and counts as a Janus connection.

If a site handler is bumped, it is disconnected immediately irrespective of TIMEOUT, and all logical user connections to the remote server are lost. It is recommended that site handlers not be bumped.

The rest of this section contains several examples of JANUS DEFINEREMOTE.

JANUS DEFINE AGENTS OPENSERV 4021 CMD 'MAILLIST' JANUS DEFREM AGENTS AGENTS_SQL_SERVER - RS6000 3010 INONLY SITEUSER 'GHOST'

In the previous example the remote server AGENTS_SQL_SERVER is associated with port AGENTS. AGENTS_SQL_SERVER is running on a host name RS6000 at port number 3010. INONLY specifies that the port cannot be used by Janus Open Client functions. The site handler will appear as user ID &OSQ.GHOST&CSQ. and will timeout 60 seconds after the last user connection terminates (using the default TIMEOUT). Each user connecting from the remote server is thrown directly into subsystem MAILLIST by the JANUS DEFINE command.

JANUS DEFINE PRODUCERS OPENSERV 4022 - CMD 'CONTACTS' JANUS DEFREM PRODUCERS big_shots RS6000 3030 - SITEUSER 'CASPER' JANUS START PRODUCERS

In this example we first set the session to mixed case with *LOWER to allow us to define a lower-case remote server name. Next we define the Janus Open Server port PRODUCERS and associate it with port number 4022 and the subsystem "CONTACTS". We designate the remote server (for incoming and outgoing connections) as a server named big_shots running on host RS6000 at port 3030 with the site handler having Model 204 user id CASPER. Then we start port PRODUCERS, making it available for connections.

JANUS DEFINE DIRECTORS OPENSERV 4027 - CMD 'WANNABE' MASTER UPCASE JANUS DEFINEREMOTE DIR* lights_cameras_action - RS6000 3037 SITEUSER 'ICHABOD' OUTONLY JANUS START DIRECTORS

In this example we set the session to mixed case with *LOWER to allow us to define a lower-case remote server name. Next we define the Janus Open Server port DIRECTORS and associate it with a port and subsystem. The port also acts as the MASTER port for Janus Open Client connections and forces upper case translation of parameter names.

We designate the remote server as a server named lights_cameras_action running on host RS6000 at port 3037 with the site handler having 204 user ID ICHABOD. The port allows only outgoing connections. Then we start port DIRECTORS, making it available for connections, and reset *UPPER status.

JANUS DEFINE WRITERS_CONTRACT OPENSERV 4012 - CMD 'UTILITIES' UPCASE JANUS DEFINE WRITERS_INHOUSE OPENSERV 4013 - CMD 'LOGOFF' UPCASE MASTER JANUS DEFINEREMOTE WRITERS* SCRIBBLERS SPARC2 3013 JANUS START WRI*

In the above example port WRITERS_CONTRACT is defined at port 4012 and WRITERS_INHOUSE defined at port 4013, and a remote server SCRIBBLERS is associated with both of them. SCRIBBLERS runs on host SPARC2 at port 3013. Note that we don't specify OUTONLY on port 4013 but if any client attempts to connect, a 'LOGOFF' command will execute, making this effectively a port for the exclusive use of Janus Open Client applications front-ended within the Model 204 online.

Port WRITERS_CONTRACT however will put externally front-ended clients into subsystem UTILITIES, and the DEFINEREMOTE definition will allow the UTILITIES application to access the same remote server as users going out on WRITERS_INHOUSE. A configuration such as the one above shows how a similar Open Client access is made available to two versions of an application, a 3270 version running in the Model 204 online, and a workstation version accessing Model 204 over Janus Open Server connections.

References and links

See: Janus command list