CMD (JANUS DEFINE parameter)
<section begin="desc" />'xxx'<section end="desc" />
CMD is a parameter on JANUS DEFINE, which defines and sets characteristics of a Janus port. See the List of JANUS DEFINE parameters.
This parameter specifies the Model 204 commands to be executed after the files and groups specified in the OPEN parameter (:hdref refid=openlst.) are opened. Multiple commands must be separated by the word "AND", and any command that contains blanks must be enclosed in quotes. Multiple commands in the CMD clause are only supported in Version 6.0 and later of Sirius Mods.
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 NEWSESCMD (:hdref refid=newsesc.). 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 (:hdref refid=autosys.). 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 UL API or to reset UTABLEs 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
Valid for SRVSOCK or &P$SVSYB port types, this parameter is required for SRVSOCK and OPENSERV port types. This parameter is not valid on an FTPSERVER port definition. .el .if &B$SRVP eq 1 .do
This parameter is required for OPENSERV port types.
References
See: List of Janus commands | List of JANUS DEFINE parameters.