Copy TCP/IP Host Table (CPYTCPHT)

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

The Copy TCP/IP Host Table (CPYTCPHT) command is used to copy the contents of the TCP/IP host table to a physical file member. The resulting physical file member is used as input to the Merge TCP/IP Host Table (MRGTCPHT) command to modify the contents of the TCP/IP host table. The contents of the resulting physical file member must not be modified by any user program or database utility.

Note: This command copies the TCP/IP host table in *OPSYS format. See the MRGTCPHT command help text for more details.

Top

Parameters

Keyword Description Choices Notes
TOFILE To file Qualified object name Optional
Qualifier 1: To file Name, QTCPHT
Qualifier 2: Library Name, *LIBL, *CURLIB
TOMBR To member Name, *FIRST Optional
MBROPT Replace or add records *REPLACE, *ADD Optional
Top

To file (TOFILE)

Specifies the physical file to which the TCP/IP host table is copied. If the file does not exist, a physical file is created in the specified library. If the file is created, the public authority for the file is the same as the create authority specified for the library in which the file is created. Use the Display Library Description (DSPLIBD) command to show the library's create authority.

Qualifier 1: To file

QTCPHT
The default file name.
name
Specify the name of the physical file to which the TCP/IP host table is copied.

Qualifier 2: Library

*LIBL
The library list is used to locate the file. If the file is not found, one is created in the current library. If no current library exists, the file will be created in the QGPL library.
*CURLIB
The current library for the thread is used to locate the file. If no library is specified as the current library for the thread, the QGPL library is used.
name
Specify the name of the library to be searched.
Top

To member (TOMBR)

Specifies the name of the physical file member to which the TCP/IP host table is copied.

*FIRST
The first member in the file receives the output. If TOMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified for the To file (TOFILE) parameter. If the member already exists, you have the option to add new records to the end of the existing member or clear the member and then add the new records.
name
Specify the name of the file member that receives the output. If it does not exist, the system creates it.
Top

Replace or add records (MBROPT)

Specifies whether the new records replace or are added to the existing records.

*REPLACE
The system clears the existing member and adds the new records.
*ADD
The system adds the new records to the end of the existing records.
Top

Examples

Example 1: Copying Host Table Using Defaults

CPYTCPHT

This command will do the following:

Example 2: Copying Host Table to a Specific File Member

CPYTCPHT TOFILE(MYLIB/MYFILE) TOMBR(MBR2) MBROPT(*ADD)

This command will do the following:

Top

Error messages

*ESCAPE Messages

CPF9860
Error occurred during output file processing.
Top