Add TCP/IP Server (ADDTCPSVR)

The Add TCP/IP Server (ADDTCPSVR) command is used to add servers to the list of servers supported by the Start TCP/IP Server (STRTCPSVR) and End TCP/IP Server (ENDTCPSVR) commands.

Servers added with the ADDTCPSVR command can be changed with the Change TCP/IP Server (CHGTCPSVR) command or removed with the Remove TCP/IP Server (RMVTCPSVR) command.

Restrictions:

Parameters

Keyword Description Choices Notes
SVRSPCVAL Server special value Character value Required, Positional 1
PGM Program to call Qualified object name Required, Positional 2
Qualifier 1: Program to call Name
Qualifier 2: Library Name
SVRNAME Server name Character value Required, Positional 3
SVRTYPE Server type Character value Required, Positional 4
AUTOSTART Autostart *YES, *NO Optional, Positional 5
TEXT Text 'description' Character value, *BLANK Optional, Positional 6

Server special value (SVRSPCVAL)

Specifies the special value to be used to identify the server being added. This value will be used by the Start TCP/IP Server (STRTCPSVR) and End TCP/IP Server (ENDTCPSVR) commands.

This is a required parameter.

character-value
Specify a special value (up to 10 characters) that will identify the server to be added. The following rules and restrictions apply:
  • The first character must be an asterisk ('*')
  • The second character must be an uppercase letter ('A-Z'), $, # or @.
  • The remaining characters must be uppercase letters ('A-Z'), numbers ('0-9'), $, #, @, underscores (_), and periods (.).

Program to call (PGM)

Specifies the program to be called when this server is started or ended by the following commands:

The following data will be passed in a single argument to the defined program:

Note: Servers that do not support multiple instances are only required to process the first 10 characters of data which contain the action being performed.

This is a required parameter.

Qualifier 1: Program to call

name
Specify the name of the program to be called when this server is started or ended.

Qualifier 2: Library

name
Specify the name of library where the program is located.

Server name (SVRNAME)

Specifies the textual server name that will be used by Systems Director Navigator to display an entry for this server.

This is a required parameter.

character-value
Specify the text name of this server.

Server type (SVRTYPE)

Specifies the server type that will be used by Work Management functions from Systems Director Navigator to find job information, such as joblogs and server status, for this server.

This is a required parameter.

character-value
Specify the server type name to be used by Systems Director Navigator to find joblog information and server status. The following rules and restrictions apply:
  • Imbedded blanks or null characters are not allowed.
  • The server job running on the system must also have the server type defined for that job. This is done by adding the server type definition using the Change Job (QWTCHGJB) API after the server job is started. See the Change Job (QWTCHGJB) API for more detail on how to define the server type within the server job. If the server type is not set within the server job or if the server type does not match what is defined on the SVRTYPE parameter, joblog information and server status will not be available using Systems Director Navigator.

Autostart (AUTOSTART)

Specifies whether the server being added should be started when the Start TCP/IP (STRTCP) command is run.

*NO
The server being added should not start when the STRTCP command runs.
*YES
The server being added should start when the STRTCP command runs.

Text 'description' (TEXT)

Specifies a text description for the server being added.

*BLANK
No text is specified.
character-value
Specify no more than 50 characters of text, enclosed in apostrophes.

Examples

ADDTCPSVR   SVRSPCVAL(*XYZ)
            PGM(MYLIB/UUSTARTXYZ)
            SVRNAME('XYZ protocol server')
            SVRTYPE('XYZ')  AUTOSTART(*YES)

This command adds a new server to the list of servers supported by the STRTCPSVR (Start TCP/IP Server) and ENDTCPSVR (End TCP/IP Server) CL commands. The new server type can be selected on the STRTCPSVR or ENDTCPSVR commands by specifying SERVER(*XYZ). User program UUSTARTXYZ in library MYLIB will be called when the XYZ server is started or ended. The new server will be started automatically when the STRTCPSVR command is run specifying SERVER(*AUTOSTART), or when the STRTCP (Start TCP/IP) command is run.

Error messages

*ESCAPE Messages

TCP1621
TCP/IP server &1 not added.