Compiling and binding
This section describes how to bind, load, and run z/OS® XL C programs containing z/OS UNIX sockets. This information is specific to the z/OS UNIX application program interface and assumes that you are familiar with the information on compiling and binding z/OS UNIX application programs in z/OS XL C/C++ Programming Guide and z/OS Language Environment Programming Guide. C++ programs can also use z/OS UNIX sockets, but C++ programs cannot use Berkley Sockets, they must always use X/Open Sockets.
You compile and bind your sockets application program in the same way as for any other C language program. The process is shown conceptually in Figure 1. You must make sure that the z/OS UNIX socket application programs have access to the files they need to compile and bind.
As shown, whether an application program's I/O request is targeted at the network (TCP/IP) or at a file, the z/OS UNIX logical file system (LFS) will route the request to the appropriate physical file system (PFS).
#pragma margins(1,72)