CMD (JANUS DEFINE parameter)

From m204wiki
(Redirected from CMD)
Jump to navigation Jump to search

CMD 'xxx' — Model 204 command to process upon connection

CMD is a parameter of the JANUS DEFINE command, which defines and sets characteristics of a Janus port. CMD specifies the Model 204 commands to be executed after the files and groups specified in the OPEN parameter are opened. Multiple commands must be separated by the word AND, and any command that contains blanks must be enclosed in quotes.

CMD may span more than one line — continued with a hyphen (-) — but the total length of commands plus one overhead byte per command cannot exceed 255 bytes.

For an OPENSERV, SRVSOCK, or TNSERV port, the commands specified by CMD specify the processing performed for each connection to the port.

TNSERV connections run on daemon threads, but they will usually run full-screen 3270-applications. As such, they might have somewhat different parameter or table size requirements from other applications that run on daemon threads. The CMD parameter, possibly along with the OPEN command, make it possible to set certain parameters or table sizes that might be specific to all 3270 threads and so are not set in the subsystems run by these threads.

The commands specified by CMD for TNSERV connections are not executed unless a trusted login is performed via the NEWSESCMD parameter of JANUS DEFINE.

You can invoke a specific subsystem on a telnet server connection either with the CMD parameter or with the AUTOSYS parameter of JANUS DEFINE. If the user logs off and logs on again during the same connection, the CMD command(s) are not executed. Because of this, using AUTOSYS is probably preferable to using CMD parameters for most TNSERV applications.

For SDS ports, the commands are executed before the port begins acting as a Specialty Data Store. It is strongly recommended that this command be used mainly to set user table sizes and user parameters for SDS ports. This might be necessary because Janus Specialty Data Store might have very different table size requirements than other applications running on an sdaemon.

For WEB ports, the commands specified by CMD are executed after all rules are executed except the ON rules. The specified commands can be used to invoke an APSY subsystem when using the Janus Web Server $functions or to reset UTABLE and other parameters.

Examples of some valid CMD clauses:

JANUS DEFINE MYWEB 80 WEBSERV 10 CMD WEBAPSY JANUS DEFINE SDS204 1777 SDS 20 CMD 'R MCPU 5000' AND 'UTABLE LQTBL 1000' - AND 'R PROMPT 16' JANUS DEFINE OPENXXX 1234 OPENSERV 15 OPEN FILE OPENPROC CMD 'R PROMPT 16' AND OPENAPSY

Note: The command only needs to be quoted if it contains blanks or special characters.

Valid for SRVSOCK, WEBSERV, TNSERV, SDS, or OPENSERV port types, this parameter is required for SRVSOCK and OPENSERV port types. This parameter is not valid on an FTPSERVER port definition.

See also