Working with TCP IP on IBM Mainframe
![](https://habrastorage.org/getpro/habr/upload_files/1b4/1c1/a9b/1b41c1a9be4fd06e6e7661866df77d6b.jpg)
Author of the article: Rustem Galiev
IBM Senior DevOps Engineer & Integration Architect. Official DevOps mentor and coach at IBM
I recently did some corporate training on how to work with an IBM mainframe. I want to cover that in a few articles.
TCP/IP (Transmission Control Protocol/Internet Protocol) is a set of network protocols that provide communication between computers and other devices on a network. Its implementation in IBM mainframes significantly expands the capabilities of these powerful systems, allowing them to effectively interact in modern network environments, integrate with a variety of applications and systems, and maintain high levels of security and performance.
In this article, we will cover the basic aspects of working with TCP/IP on IBM Mainframe.
IBM mainframes, especially those running z/OS, use the same TCP/IP networking protocol as any other computing platform. This allows the IBM mainframe to easily communicate with other computers, including IBM mainframes, UNIX servers, and Windows servers.
![](https://habrastorage.org/getpro/habr/upload_files/e3a/610/8a8/e3a6108a815bcd8d749047c23abbad8c.png)
Most standard TCP/IP commands, such as ping, netstat, and traceroute, can be performed on the mainframe in two ways: through TSO/E or through the z/OS UNIX System Services Telnet client.
The z/OS UNIX System Services client can be started either through a Telnet client on another computer or by using the OMVS command in TSO/E.
TCP/IP commands produce the same results whether they are executed via Telnet, OMVS, or TSO/E. However, the command syntax may vary.
![](https://habrastorage.org/getpro/habr/upload_files/7bb/cf8/7da/7bbcf87da44c3e57179cb9d4f17d4c74.png)
On most UNIX servers, TCP/IP runs as a daemon, which is a long-running process. On z/OS, TCP/IP runs as a task that is started by the z/OS system. This task is started by a z/OS operator command and continues to run until the mainframe is powered off.
The DA,jobname command on the z/OS console displays any job that runs on the z/OS system. In this example, there are two jobs that start with TCPIP: TCPIPA and TCPIPB. Both of these are TCP/IP jobs.
z/OS is capable of supporting multiple TCP/IP stacks, and in this example two of them are running.
![](https://habrastorage.org/getpro/habr/upload_files/595/0cb/45f/5950cb45f6ffddb68b86874a61319f4e.png)
A TCP/IP task running on z/OS consists of a Job Control Language (JCL) that is executed by z/OS. An example of a TCP/IP JCL is shown below.
In this TCP/IP task, there are two DD names of interest: PROFILE and SYSTCPD.
![](https://habrastorage.org/getpro/habr/upload_files/e1b/63b/94d/e1b63b94d62a14b4dd7381c10038cba9.png)
The z/OS console START command used to start TCP/IP is S procname, where procname is the name of the TCP/IP task. The procname may be defined differently depending on your system configuration as set by your system programmer.
![](https://habrastorage.org/getpro/habr/upload_files/620/fee/a68/620feea68fda244bd75e418575bf2b45.png)
The S TCPIPA command starts TCP/IP. Messages appear on the z/OS console explaining what is happening and indicating possible problems.
If TCP/IP problems occur after the first startup, you should check the z/OS console for messages. It is worth noting that if the syslogd task is running, these messages may be redirected to other files. More details about syslogd are covered later in the module.
On the console you can see some of the messages that may appear when TCP/IP starts.
![](https://habrastorage.org/getpro/habr/upload_files/4d9/24b/759/4d924b7594b194c67863dd09e77050ec.png)
Most systems programmers direct TCP/IP messages to areas other than the z/OS console. If syslogd is not running, all messages are sent to the z/OS console.
On z/OS, each TCP/IP-related message has a message identifier starting with EZ, making it easy to find such messages among others. Each message is documented in the Communications Server z/OS IP Message Guides.
The z/OS console shown here displays some of the TCP/IP messages that appear when TCP/IP starts.
![](https://habrastorage.org/getpro/habr/upload_files/77e/d63/905/77ed639053e747caafaa0c1ff794b758.png)
System programmers can configure TCP/IP to start automatically and monitor other TCP/IP tasks, as shown in the example above, where FTPSERVE was also started. The TCP/IP Autolog task does this work.
![](https://habrastorage.org/getpro/habr/upload_files/91a/06d/72a/91a06d72acf5da22e3299d5be505ae51.png)
Stopping TCP/IP can be done using the STOP or P command.
When terminating, TCP/IP first closes all tasks that are controlled by Autolog. When all these tasks become inactive, the TCP/IP task also terminates.
During the shutdown process, TCP/IP displays messages that indicate what is being done and what problems may occur.
![](https://habrastorage.org/getpro/habr/upload_files/f2c/b50/9a6/f2cb509a659b00e136e908f29a477e25.png)
You have now learned the basics of TCP/IP and its ability to communicate not only with other mainframes, but with different platforms. You have also learned how to start and stop TCP/IP on a mainframe.
In the next article, you will be introduced to some of the TCP/IP helper daemons that provide various functions and additional capabilities.
And for anyone who would like to learn how to professionally administer Linux, I recommend paying attention to the program “Administrator Linux” course from Otus.