This article explains how to change the TCP/IP port that DataGate uses.
Why would you ever want to change the TCP/IP port? In normal circumstances, you’d generally not ever need to do this. However, if you’re installing a second DataGate instance, you may want to change the existing existing TCP/IP port so that the second instance can use that port number.
To change the TCP/IP port that DataGate uses:
Ensure no DateGate user jobs are active and then end DataGate with
<DataGate library name>/ENDDG8SRV
Delete the Service Table Entry for your old version of DataGate:
Type
WRKSRVTBLE
on the IBM i command line and press Enter.Scroll to bottom of the list.
The DataGate entry is usually listed as
DataGatexxy
wherexx
= main version number andy
= minor version number.Use option 5 to display the DataGate entry.
Write down the Service and Port values shown (or take a screen shot of it). You’ll use the port value in Step 5.
Press enter to return to the Service Table Entries list and use Option 4 to remove this Service Table Entry.
Create a new Service Table Entry for your new DataGate instance with the ADDSRVTBLE command using these values:
Service
= Use the Service value as determined in Step 4 (use exactly the same case as determined in Step 4).Port
= Port value used by old instance (as determined in Step 3)Protocol
= “tcp” where lowercase is very important!Description
= DataGate xxy (where xx = the major DG version number and y = the minor version number)
Restart your new DataGate instance:
<new DG Library name>/STRDG8SRV