Change TCP/IP Server (CHGTCPSVR)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Change TCP/IP Server (CHGTCPSVR) command is used to change a server that was previously defined using the Add TCP/IP Server (ADDTCPSVR) command. All values defined for the server can be changed except for the server special value (SRVSPCVAL).

Restrictions:

Top

Parameters

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

Server special value (SVRSPCVAL)

Specifies the special value for the server to be changed.

This is a required parameter.

character-value
Specify the special value of the server to be changed.
Top

Program to call (PGM)

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

Single values

*SAME
The program to be called remains the same.

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.
Top

Server name (SVRNAME)

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

This is a required parameter.

*SAME
The textual server name remains the same.
character-value
Specify the text name of this server.
Top

Server type (SVRTYPE)

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

*SAME
The server type remains the same.
character-value
Specify the server type name to be used by iSeries 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 iSeries Navigator.
Top

Autostart (AUTOSTART)

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

*SAME
The server autostart value remains the same.
*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.
Top

Text 'description' (TEXT)

Specifies a text description for the server being added.

*SAME
The text description remains the same.
*BLANK
No text is specified.
character-value
Specify no more than 50 characters of text, enclosed in apostrophes.
Top

Examples

CHGTCPSVR   SVRSPCVAL(*XYZ)
            PGM(MYLIB/MYSTARTXYZ)
            AUTOSTART(*NO)

This command changes an existing server in the list of servers supported by the STRTCPSVR (Start TCP/IP Server) and ENDTCPSVR (End TCP/IP Server) CL commands. The user program that is to be called when the XYZ server is started or ended is changed to program MYSTARTXYZ in library MYLIB. The XYZ server will not be started automatically when the STRTCPSVR command is run specifying SERVER(*AUTOSTART), or when the STRTCP (Start TCP/IP) command is run.

Top

Error messages

*ESCAPE Messages

TCP1631
TCP/IP server &1 not changed.
Top