JANUS DEFINE
<section begin="desc" />Define and set characteristics of a Janus port<section end="desc" />
Overview
The JANUS DEFINE command is used to specify the characteristics of a Janus port. It defines the usage of the named port as one of the following:
- Access by IFDIAL clients
- Open Server or Open Client connections
- Specialty Data Store access
- Web access
- FTP server connections
- Telnet server connections
- Generic Sockets usage -- with the Model 204 online either requesting (CLSOCK) or accepting (SRVSOCK) the connection
- Connection between the Janus Debugger or Sirius Debugger workstation GUI and programs being debugged in Model 204
For any except a CLSOCK or DEBUGGERCLIENT port, this subcommand associates a service with a TCP/IP port number.
Among the characteristics specified by JANUS DEFINE is whether the port will use Secure Sockets Layer (SSL) for encrypted communications.
See "JANUS DEFINE and JANUS DEFINEREMOTE subcommands" for a discussion of when you need to issue the JANUS DEFINE command.
The JANUS DEFINE command syntax is described below.
Syntax
<section begin="syntax" /> JANUS DEFINE portname portnum type maxcon other_parms... <section end="syntax" />
Where each of the first four parameters is positional and required:
portname | A 1- to 30-character name by which the port is identified. It is used on other JANUS subcommands, such as JANUS START and JANUS DISPLAY. It is used on the $Sock_Conn function or the Socket object New constructor to name the CLSOCK port defining a connection. | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
portnum | The TCP/IP port number at which the service is available. portnum is the server port number, and it must be between 1 and 65535, inclusive. This number is used by client applications on the network when they require access to the Model 204 server. The server port number must be unique on the host. Several "well-known" port numbers for various TCP/IP services (for example, 53 for nameserver) should be avoided, unless you are implementing that service using Janus Sockets.
For CLSOCK and DEBUGGERCLIENT ports, an asterisk (*) is used as the port number, since they are used to create, rather than accept, connections, and these port numbers are not determined until the time of the connection. For WEBSERV ports, 80 is customary for non-secure HTTP and 443 for secure HTTP (SSL); you can, however, use other numbers for WEBSERV ports if required. For FTPSERVER ports, 21 is customary; you can, however, use other numbers for FTPSERVER ports if required. | ||||||||||||||||||||||||
type | Port type. Valid types are:
For Janus Open Client usage, you must define one or more ports of type SDS or OPENSERV, and you may need to use the MASTER parameter on a port definition. For JANUS server ports, specify SRVSOCK; for JANUS client ports, specify CLSOCK; for JANUS FTP server ports, specify FTPSERVER; for JANUS telnet server ports, specify TNSERV. TNSERV ports require that the system TNDEV parameter be set to indicate the IODEV that daemon threads switch to while in full-screen mode for a telnet connection. | ||||||||||||||||||||||||
maxcon | Maximum number of simultaneous active connections to be allowed on the port. This number must be less than or equal to the number of TCP/IP connections for which the site is licensed. Before Sirius Mods Version 6.8, the maxcon value had to be less than or equal to the number of sdaemons defined to the online, except for non-CLSOCK ports. If you are defining multiple ports for your site, however, the sum of the maxcon connections you define is allowed to be greater than the number for which the site is licensed. In this case, Janus Web Server will automatically prevent any connection that would exceed the site license limit. For Janus Open Client, note that a server-to-server connection requires an extra connection for the site handler. Thus, a single connection to a remote server would use two connections, while 10 connections to a remote server would use 11.
Under Sirius Mods Version 6.8 and later, restrictions on the allowed values for maxcon are no longer present, but licensed thread limits are still enforced at the time a connection is made. You can use the JANUS TSTATUS command to view the thread usage and connection limits for your port, and you can use the JANUS LIMITS command to view similar information for your Online. | ||||||||||||||||||||||||
other_parms | A set of blank-delimited parameters that describe the characteristics of and processing to be performed on the port. These parameters are keywords, sometimes followed by values, and they are described individually in the subsections that follow. They are all optional, except:
|
Examples
The parameters you might use on a port definition vary by port type (that is, communication protocol), the security requirements of your shop and application, performance considerations and the applications that will run inside the Model 204 Online as a client or a service on this port.
There is no such thing as a "typical" port — each one is customized to the service or services running over the port.
JANUS DEFINE JANWEB 80 WEBSERV 50 WEBUSER WEBUSER TRACE 0 UPCASE - OBSIZE 10240 IBSIZE 10240 RBSIZE 10240 TIMEOUT 600 - OPEN FILE JANWEB MAXTEMP 14000 BINDADDR 198.242.244.47 - LOG REQ WEBLOGJW LOGCLOSET 57 NOAUDTERM COMPRESS 2 KEEPALIVE 30
In the above example, a Janus Web Server port is defined, named JANWEB. It runs at port 80 (the default web port) and allows 50 simultaneous connections. Buffer sizes are increases over the default settings and a variety of logging, compressions and other settings are specified.
JANUS DEFINE SOAP * CLSOCK 5 TIMEOUT 240 REMOTE * * MASTER
In the above example, a client socket "master" port called SOAP
is defined, permitting 5 simultaneous outgoing connections to any remote hosts.
JANUS DEFINE parameters
ALLOCC | Indicates that input, output and request buffers are to be allocated when a connection is established and are to be freed when the connection is closed. |
ANONYMOUS | Indicates that anonymous access is permitted to the FTP server being defined. |
ANONUSER | Lets you change the name of the anonymous user, ANONUSER may be specified only if ANONYMOUS is also specified. |
AUDTERM | Controls whether the server thread sends "non-compiler terminal output" to the audit trail. |
AUTODONE | Requests Janus Web Server to treat a return to command mode after all port and ON rules CMDs have been processed as an implicit $Web_Done. |
AUTOLOAD | Indicates that the incore copy of Janus tables are to be reloaded at the first request subsequent to a table redefinition. |
AUTOON | Requests Janus Web Server to issue an implicit $Web_On before executing the commands specified in a JANUS WEB ON rule. |
AUTOSYS | Sets the Model 204 AUTOSYS parameter to the indicated (subsys) value when a connection is received on a TNSERV port. |
BINARY | Requests Janus Sockets to send and receive strings with $SOCK_ functions or Socket methods using no translation. |
BINDADDR | Specifies the IP address to which the port will be bound, if the host (machine) on which Model 204 is running supports multiple IP addresses. |
BSIZE | Specifies the size of the TCP/IP input and output buffers. |
CHAR | Requests Janus Sockets to translate strings (sent and received with Janus Sockets functions or methods) between the internal representation within Model 204 (EBCDIC) and the character representation used by the remote end of the connection. |
CHARSET | Indicates, to the remote host, the character set being used by Janus. |
CLIENTSOCKET | Names the client socket port to use to open connections back to the FTP client, if the client requests active file transfers. |
CLOSEIMMED | Indicates that if a lost connection is noticed by the Janus PST, the PST should BUMP the Model 204 thread associated with the connection immediately. |
CLOSEREAD | Indicates that web threads should “put up” a TCP/IP read after receiving the entire request but before processing it. |
CMD | Specifies the Model 204 commands to be executed after the files and groups specified in the OPEN parameter are opened. |
COMPRESS | Indicates the type of compression to be performed on outgoing Janus Web Server data. |
CR | Indicates that lines of text data sent to a browser should be separated by the ASCII carriage return character (X'0D'). |
CRLF | Indicates that lines of text data sent to a browser should be separated by the ASCII carriage return and line feed characters (X'0D0A'). |
CSSINSP | Indicates whether or not Janus Web Legacy support is to insert a space to represent the attribute byte on a 3270 screen. |
CSSTITLEDIV and CSSTITLESPAN | Indicates whether Janus Web Legacy support is to use a <div> (CSSTITLEDIV) or <span> (CSSTITLESPAN) tag for the title line of a screen. |
DBCS and NODBCS | Indicates whether or not the Model 204 DBCS parameter is to be automatically set to 1 on requests to a WEBSERV port. |
DEBPORTCMD and NODEBPORTCMD | Indicates whether the commands specified in the CMD clause of the JANUS DEFINE command are to be run on threads debugging requests to the port with the JANUSDEBUG command |
DEBPORTOPEN and NODEBPORTOPEN | Indicates whether the files and groups specified in the OPEN clause of the JANUS DEFINE command are to be opened on threads debugging requests. |
EXEC2RPC | Indicates that language requests should be converted to RPCs. |
FDWOL | Specifies that all FINDs done by Janus Specialty Data Store are to be done as Find Without Locks. |
FORMPOSTWAIT | The default number of seconds to wait for the POST'ing of a form while using $Web_Form_Done. |
FORMREDIRWAIT | The default number of seconds to wait for the client on a WEBSERV port (presumably a browser) to do the GET associated with a redirect generated by a $Web_Form_Done call. |
FINCLOSE | Affects how Janus Sockets applications respond to a closed connection. |
HIGHPRIORITY | Adjusts the Model 204 scheduling priority of Janus Web Server threads by starting them at the upper end of their priority range rather than at their default priority. |
HTTPVERSION | Sets the HTTP version returned to the browser by Janus Web Server. |
IBSIZE | Specifies the size of the TCP/IP input buffer. |
INPUTTIMEOUT | Tells Janus Web Server to use a different timeout value for input (receiving the web request) than for output. |
JANCAT | Specifies the name of the file that contains the Model 204 to SQL mappings. |
KEEPALIVE | Indicates the number of seconds a TCP/IP connection is to be held open after an HTTP request on that connection. |
LANGUAGE | Indicates, to the remote host, the language being used by Janus. |
LEGBL | Sets blink, underscore and reverse characteristics for Janus Legacy screens. |
LEGCSS and NOLEGCSS | Indicates whether or not Janus Web Legacy Support is to use Cascading Style Sheets. |
LEGJS and NOLEGJS | Indicates whether or not Janus Web Legacy Support is to use JavaScript. |
LF | Indicates that lines of text data sent to a browser should be separated by the ASCII line feed character (X'0A'). |
LINEND | Specifies the hex value of a string to be sent by Janus Sockets at the end of each "line;" that is, appended to the string sent by the $Sock_SendLn function or Socket SendWithLineEnd function or after each output line captured on the socket. |
LOG | Specifies that all Janus Web Server requests for the port are to be logged to a sequential dataset whose DDNAME is specified by xxxx. |
LOGAPPEND | Indicates that the Janus Web Server log dataset for the port is to be opened in APPEND mode. |
LOGCLOSET | Indicates how often the Janus Web Server log dataset is to be "closed", that is how often the DSCB is to be updated for the log dataset. |
LOGGMT | Indicates that the time stamps in the Janus Web Server log dataset for the port are to be represented as GMT instead of local time. |
LOGMSGI | Prevents Janus Web Server from saving Model 204 messages issued during logon for a web user. |
MASTER | Specifies that this is the default port for outgoing client communication. |
MAXCURS | Specifies the maximum number of cursors that can be opened for a single Janus Specialty Data Store connection. |
MAXIPSES | Specifies the maximum number of Janus Web Legacy Support sessions maintained per IP address. |
MAXREC | Specifies the maximum record length for input records on a Janus IFDIAL port. |
MAXSAVE | Specifies the maximum number of compiled SQL requests to save in CCATEMP. |
MAXTEMP | Specifies the maximum number of CCATEMP pages allowed to be used by a web request for holding input (file upload) and output (dynamically generated HTML) data. |
MSGSEND and NOMSGSEND | Indicates whether or not Model 204 messages (as opposed to the output from PRINT or HTML statements) are to be sent to the browser. |
MSG204 | Specifies the Sybase message number to be used to return terminal output to the client. |
MSG204L | Specifies the Sybase message number to be used to return terminal output to the client. |
NEWPASSWORDC | This parameter prevents Janus Web Server from immediately sending an "Unauthorized" response to a browser after a password change. |
NEWSESCMD | Specifies the Model 204 commands to be executed when a new login session is initiated. |
NEWSESGUESTOK | Indicates that "guest" logins are to be allowed for $Sir_Login calls in programs run as part of NEWSESCMD processing. |
NEWSESNOCLEARG | Indicates that GTBL is not to be cleared at the end of NEWSESCMD command processing. |
NEWSESOPEN | Specifies the names of one or more Model 204 files or groups to be opened before any NEWSESCMD commands are executed. |
NOAUDTERM | This parameter is used to control whether the server thread sends "non-compiler terminal output" to the audit trail. |
NOAUTODONE | Prevents Janus Web Server from treating a return to command mode after all port and ON rules CMDs have been processed as an implicit $Web_Done. |
NOAUTOON | Prevents Janus Web Server from preceding the execution of the command specified in a JANUS WEB ON rule with an implicit $Web_On. |
NOSCREENREDIR | Indicates that Janus Web Server legacy support (automatic mapping of 3270 applications to HTML) is not to use the redirect's to map all screens for a legacy session to the same URL. |
NOTRACEFIELD | Indicates the form field or fields whose values are not to be traced when the X'04' bit (causes tracing of form field values for web requests) of JANUS TRACE is in effect. |
NOUPCASE | Indicates that no client data is to be converted to uppercase. |
OBSIZE | Specifies the size of the TCP/IP output buffer. |
OMNIACCT | Specifies the Model 204 ACCOUNT for the Janus Specialty Data Store catalog sdaemon for the port. |
OMNIUSER | Specifies the Model 204 user ID for the Janus Specialty Data Store catalog sdaemon for the port. |
OPEN | Specifies the name of one or more Model 204 files or groups to be opened when a server session is initiated. |
PASVPORT | Identifies the first FTP server port number to use for “passive” file transfers. |
PRELOGINUSER | Indicates the userid under which pre-login processing runs. |
PRSTOK | Specifies the hex values of strings that are used to separate input strings using the $Sock_RecvPrs function or Socket ReceiveAndParse function. |
PUBLOG | Indicates that a "real" login should be done for the SOCKUSER userid for SRVSOCK logons. |
RAWINPUT | Tells Janus Web Server to save the raw input stream for an HTTP POST, regardless of the mime type set by the client in the content-type header. |
RAWINPUTONLY | indicates that, regardless of the POST data content-type set by the client, Janus Web Server should: 1) Save the raw input stream of an HTTP POST and 2) Refrain from parsing the input content into form fields. |
RBSIZE | Specifies the Janus RPC or Request buffer size. |
REMOTE | Identifies the remote server and the remote port number to be used with a set of Janus Sockets CLSOCK connections. |
RPCONLY | Indicates that only RPC requests are allowed on the port. |
SCREEN and NOSCREEN | Indicates whether or not Janus Web Legacy screens will be allowed to appear on requests to the port. |
SCREENURL | Indicates that Janus Web Server legacy support (automatic mapping of 3270 applications to HTML) is to switch web applications that present a 3270 screen to a special internally generated URL. |
SDSACCT | Specifies the Model 204 ACCOUNT for the Janus Specialty Data Store catalog sdaemon for the port. |
SDSUSER | specifies the Model 204 USER for the Janus Specialty Data Store catalog sdaemon for the port. |
SESCOOKIE | Indicates the name of a cookie that will be used to maintain logical sessions that will be used to perform trusted logins. |
SESCOOKIENOSEC | Indicates that the cookie specified by SESCOOKIE will not be sent to the browser as a "secure" cookie. |
SESFASTLOGIN | Reduces the login security overhead for Janus Web Server threads by causing a login performed for a continued session to be a "fast" login. |
SESTIMEOUT | Indicates the number of minutes of inactivity that will cause a logical login session being held either via SESCOOKIE or SSLSES to be terminated. |
SLOWCLOSE | Specifies a bitmask that indicates the conditions under which Janus Web Server is to perform a "slow" close of a connection with a browser. |
SOCKACCT | Specifies the default Model 204 account ID used for SRVSOCK logons. |
SOCKPMAX | Specifies the maximum number of sockets a user may have connected at any time using the particular Janus Sockets client port. |
SOCKUSER | Specifies the default Model 204 user ID used for SRVSOCK logons. |
SQUAREB | Overrides the default EBCDIC characters for square brackets in the Janus Web Server log file. |
SSL | Indicates that communications on this port should be encrypted using SSL (Secure Sockets Layer) or TLS (Transport Layer Security) support. |
SSLBSIZE | Specifies the size of the input buffer used for reading encrypted data for an SSL port. |
SSLCACHE | Specifies the number of entries in virtual storage to be allocated for caching information related to this port's SSL sessions. |
SSLCIPH | Limit the stream ciphers (encryption algorithms) that this port offers for SSL connections. |
SSLCLCERT and SSLCLCERTR | Specify that an SSL server port will request an SSL certificate from the client. |
SSLIBSIZE | Specifies the size of the SSL input buffer to be used on SSL ports. |
SSLMAXAGE | Specifies the maximum number of minutes that an SSL session is to be maintained. |
SSLMAXCERTL | Indicates the number of bytes of virtual storage to be allocated to hold incoming certificates presented for authentication. |
SSLOBSIZE | Specifies the size of the SSL output buffer to be used on SSL ports. |
SSLOPT | Specifies that the use of SSL-like encryption is optional for applications using the port. |
SSLPROT | Specify the degree of SSL-like encryption available at this port. |
SSLSES | Reduces the overhead of NEWSESCMD processing by limiting it to logical session establishment time. |
SSLUNENC | Indicates that an unencrypted private key is being used in the certificate specified by the SSL parameter on this Janus server port definition. |
STIMEOUT | Sets the number of seconds of inactivity after which a Janus Web Legacy session is terminated. |
TCPLOG | Tells Janus Web Server to log in a sequential dataset all inbound and outbound TCP data transmitted for this port. |
TCPKEEPALIVE | Specifies that connections on the port should use TCP keepalives. |
TIMEOUT | Specifies the number of seconds of inactivity after which clients connected to this port will be disconnected. |
TRACE | Specifies the initial TRACE setting for the port. |
UPCASE | Indicates that all client "names" are to be converted to uppercase. |
VARIPADDR | Indicates that a single browser might access Janus Web Server using different IP addresses. |
WEBACCT | Specifies the default Model 204 account ID used for web logons for URLs where no userid is required. |
WEBCOOKID | Indicates that an identifying "cookie" should be sent to a browser to distinguish multiple browsers coming through the same proxy server or running on the same machine. |
WEBLH | Synonym for WEBLOGHOLD. |
WEBLM | Synonym for WEBLOGMAX. |
WEBLOGCOOKIE | Indicates that, for public URLs, Janus Web Server should log the user in with the userid specified by cookie-name. Normally, all public URL logins use the default public userid (usually WEBUSER). |
WEBLOGHOLD | Indicates the number of seconds that a "real" login should be saved for re-use on a web connection. |
WEBLOGMAX | Indicates the maximum number of cached login sessions to be held for a single user. |
WEBPL | Synonym for WEBPUBLOG. |
WEBPUBLOG | Indicates that a "real" login should be done for the WEBUSER userid for public URLs. |
WEBREALM | Indicates the security "realm" of userids and passwords. |
WEBSDMAX | Indicates the maximum number of sdaemons to be used for cached web logins. |
WEBSM | Synonym for WEBSDMAX. |
WEBUSER | Specifies the default Model 204 user ID used for web logons for URLs where no userid is required. |
WSFQUERY | Indicates that Janus is to issue a “Write Structured Field Query” request to any telnet client that connects to it. |
XTAB | Specify a translation table that has not yet been loaded with the JANUS LOADXT command, but the table must be loaded before the port can be started. |