Getting Started With TCP - IP For VSE - ESA 1.4
Getting Started With TCP - IP For VSE - ESA 1.4
Getting Started With TCP - IP For VSE - ESA 1.4
www.redbooks.ibm.com
SG24-5626-00
SG24-5626-00
International Technical Support Organization
May 2000
Take note!
Before using this information and the product it supports, be sure to read the general information in Appendix A,
“Special notices” on page 219.
This edition applies to IBM TCP/IP for VSE/ESA Version 1 Release 4, Programm Number 5686-A04.
When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any
way it believes appropriate without incurring any obligation to you.
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
The team that wrote this redbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Comments welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
v
8.2 Creating documents for your Web site . . . . . . . .. . . . .. . . . . .. . . . . .. 206
8.2.1 HTTP file types . . . . . . . . . . . . . . . . . . . . .. . . . .. . . . . .. . . . . .. 206
8.2.2 Documents on our Web site . . . . . . . . . . . .. . . . .. . . . . .. . . . . .. 207
8.3 Creating a secured Web site . . . . . . . . . . . . . . .. . . . .. . . . . .. . . . . .. 209
8.3.1 Implementing a secured HTTP daemon . . .. . . . .. . . . . .. . . . . .. 209
8.3.2 Logging on to the secured Web server. . . .. . . . .. . . . . .. . . . . .. 210
8.4 Processing data on a VSE Web site . . . . . . . . .. . . . .. . . . . .. . . . . .. 212
8.4.1 Creating forms . . . . . . . . . . . . . . . . . . . . . .. . . . .. . . . . .. . . . . .. 212
8.4.2 Using CGI programs . . . . . . . . . . . . . . . . .. . . . .. . . . . .. . . . . .. 214
8.4.3 Our sample REXX CGI program . . . . . . . .. . . . .. . . . . .. . . . . .. 216
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
ix
157.Print the IPINIT04.L sublibrary member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
158.Print a file on our network printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158
159.The VSE LPR command LONG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
160.Report of the SHORT command from the LPR client . . . . . . . . . . . . . . . . . . .159
161.Leave the CICS LPR client transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
162.DEFINE EVENT and SCRIPT commands in initialization file IPINIT04.L . . . 160
163.The QUERY EVENTS command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
164.Syntax of the POWER LST statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
165.Job using the automatic LPR client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
166.VSE console output for the automatic LPR event . . . . . . . . . . . . . . . . . . . . .162
167.Job stream to catalog our script file LPRSCR01.L . . . . . . . . . . . . . . . . . . . . . 163
168.Job using the automatic LPR client with a script file. . . . . . . . . . . . . . . . . . . . 163
169.INSERTS macro format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .164
170.Example of INSERTS phase HP4LAND. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
171.Job stream to create INSERTS phase GPS1LEGL . . . . . . . . . . . . . . . . . . . . 165
172.Job stream to create INSERTS phase GPS1LETR . . . . . . . . . . . . . . . . . . . . 165
173.Our VSE batch job to invoke the LPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
174.Check the batch job entry in the POWER list queue . . . . . . . . . . . . . . . . . . . 167
175.VSE console message for unsuccessful LPR . . . . . . . . . . . . . . . . . . . . . . . . 168
176.DIAGNOSE LPR command with console output . . . . . . . . . . . . . . . . . . . . . .169
177.VTAM APPL definitions for GPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172
178.CICS RDO TERMINAL definition for the GPS printer . . . . . . . . . . . . . . . . . . 173
179.CICS RDO TYPETERM definition for the GPS printer (part 1 of 2) . . . . . . . . 174
180.CICS RDO TYPETERM definition for the GPS printer (part 2 of 2) . . . . . . . . 175
181.TCP/IP GPS daemon definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176
182.DEFINE GPS command file for the EXECUTE command . . . . . . . . . . . . . . . 177
183.Use of the EXECUTE command to define the GPS daemon . . . . . . . . . . . . . 178
184.DELETE GPS daemon command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
185.QUERY GPSD command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
186.VSE console messages for a GPS retry of an LPR request. . . . . . . . . . . . . . 180
187.DEFINE FILE and DEFINE NFSD entries . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
188.NFSCFG01.L configuration file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
189.NFSTYPES.L configuration file (part 1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . 185
190.NFSTYPES.L configuration file (part 2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . 186
191.NFSMODEL.L configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
192.NFS startup console messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188
193.NFS termination console messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189
194.NFS QUERY CONFIG command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
195.NFS QUERY PATHS command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
196.NFS QUERY USERS command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190
197.NFS client configuration window (1 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . .192
198.NFS client configuration window (2 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . .193
199.NFS client configuration window (3 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . .194
200.NFS client configuration window (4 of 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . .195
201.NFS server file system window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196
202.Mapping the NFS server to a network drive (1 of 2) . . . . . . . . . . . . . . . . . . . . 197
203.Mapping the NFS server to a network drive (2 of 2) . . . . . . . . . . . . . . . . . . . . 197
204.Mapping the POWER queue as a network drive (1 of 2) . . . . . . . . . . . . . . . . 198
205.Mapping the POWER queue as a network drive (2 of 2) . . . . . . . . . . . . . . . . 198
206.My Computer display of POWER queues . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
207.Windows Explorer access to VSE file system entries . . . . . . . . . . . . . . . . . . 200
208.Windows WordPad display of POWER LST queue entry. . . . . . . . . . . . . . . . 201
209.Windows Explorer display of VSAM catalog. . . . . . . . . . . . . . . . . . . . . . . . . . 202
xi
xii TCP/IP for VSE/ESA
Tables
1. Internet growth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. IP address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3. IP - class A address concept without subnets . . . . . . . . . . . . . . . . . . . . . . . . . 10
4. IP - class A subnet mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5. IP - class A subnet host address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
6. IP - class A subnet number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
7. DNS - some top-level Internet domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
8. Growth of the World Wide Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
9. Member types recognized by the HTTP daemon. . . . . . . . . . . . . . . . . . . . . . 207
This redbook describes how VSE/ESA users can enable their VSE/ESA system
to participate in the world of TCP/IP networks using TCP/IP for VSE/ESA. It
describes in a detailed and comprehensive way all the steps that are required to
install and customize TCP/IP for VSE/ESA on the VSE/ESA system.
Several examples show how to make use of the TCP/IP applications that are
supported by TCP/IP for VSE/ESA. This includes functions such as
Telnet/TN3270, FTP, LPD/LPR, GPS, or NFS. We also provide guidance to help
you set up your VSE/ESA system as an HTTP server on the Internet. TCP/IP for
VSE/ESA provides a socket application programming interface as described in
TCP/IP for VSE Programmer’s Reference, Release 1.4, but its discussion is
beyond the scope of this redbook.
This redbook replaces the redbook The Native TCP/IP Solution for VSE,
SG24-2041.
Thanks to the following people for their invaluable contributions to this project:
Billy Bingham
IntelliWare Systems, Inc, Arlington, Texas, U.S.
Dagmar Kruse
IBM Germany
Cyrus Mead IV
IntelliWare Systems, Inc., Arlington, Texas, U.S.
Marc Schare
Connectivity Systems, Inc., Columbus, Ohio, U.S.
Hanns-Joachim Uhl
IBM Development Laboratory Boeblingen, Germany
Note that this chapter provides an overview of the capabilities of the TCP/IP
protocol, but not all of these capabilities are available with TCP/IP for VSE/ESA.
Please refer to the product documentation for TCP/IP for VSE/ESA for a
description of available functions and applications (see Appendix B, “Related
publications” on page 221).
http://www.isoc.org/internet-history/
In fact, the Internet, which has become the largest computer network in the world,
is based on the TCP/IP protocol suite. The Internet consists of large international,
national, and regional backbone networks that allow local and campus networks
and individuals access to global resources. Use of the Internet has grown rapidly
In contrast to the Internet, the term intranet has evolved recently to describe
TCP/IP networks that are entirely under the control of a private authority or
company. These intranets may or may not have connections to other independent
intranets (which would then be referred to as extranets) or the Internet. They may
or may not be fully or partially visible to the outside, depending on the
implementation.
TCP/IP also provides for the routing of multiple protocols to and from diverse
networks. For example, a requirement to connect isolated networks using IPX,
AppleTalk, and TCP/IP protocols using a single physical connection can be
accomplished by using routers utilizing TCP/IP protocols.
One further reason for the growth of TCP/IP is the popularity of the socket
programming interface, which is the programming interface between the TCP/IP
transport protocol layer and TCP/IP applications. A large number of applications
today have been written for the TCP/IP socket interface.
The Internet Society (ISOC), formerly known as the Internet Activities Board
(IAB), is the nonprofit coordinating committee for Internet design, engineering,
and management. The ISOC members are committed to making the Internet
function effectively and evolve to meet a large-scale, high-speed future. The
ISOC has established several bodies for administering, standardizing, and
researching for the Internet:
• The Internet Architecture Board (IAB)
While the IAB oversees and manages the Request for Comments (RFC)
publication process, the IETF actually defines the standards through a number of
subcommittees or task forces, and the IRTF engages in Internet-related research
projects.
RFC is the mechanism through which the Internet protocol suite has been
evolving. For example, an Internet protocol can have one of six states: standard,
draft standard, proposed standard, experimental, informational, and historic. In
addition, an Internet protocol has one of five statuses: required, recommended,
elective, limited use, and not recommended. By communicating using the RFC,
new protocols are being designed and implemented by researchers from both
academic institutions and commercial corporations. At the same time, some old
protocols are being superseded by new ones.
RFCs can be viewed or obtained online from the IETF Web page using the
following URL:
http://www.ietf.org/rfc.html
The RFC standards are described in the Internet Official Protocol Standards
RFC, currently RFC 2500.
Registration is available online at the NIC Web site using the following URL:
http://rs.internic.net/
ICMP
Internetwork IP ARP RARP
Application layer
The application layer is provided by the program that uses TCP/IP for
communication. Examples of applications are:
• Domain Name System (DNS)
• File Transfer Product (FTP)
• Teletypewriter Network (Telnet)
• Web server (HTTP)
• Line printer request (LPR)
The interface between the application and transport layers is defined by port
numbers and sockets, which are described in more detail in 1.8.1, “Ports and
sockets” on page 24.
Transport layer
The transport layer provides communication between application programs. The
applications may be on the same host or on different hosts. Multiple applications
can be supported simultaneously. The transport layer is responsible for providing
a reliable exchange of information. The main transport layer protocol is TCP.
Another is User Datagram Protocol (UDP), which provides a connectionless
service, in contrast to TCP, which provides a connection-oriented service. That
means that applications using UDP as the transport protocol have to provide their
own end-to-end flow control. Usually, UDP is used by applications that need a
fast transport mechanism.
Internetwork layer
The internetwork layer provides communication between computers. Part of
communicating messages between computers is a routing function that ensures
that messages will be correctly delivered to their destination. The Internet
Protocol (IP) provides this routing function. Examples of internetwork layer
protocols are IP, ICMP, ARP, and RARP.
The IBM 2216 Multiaccess Connector supports the following types of network
interfaces:
• IBM Ethernet (10/100 Mbps)
• IBM Token-Ring (4/16 Mbps)
• IBM FDDI LAN (100 Mbps)
• ATM LAN Emulation Mode
• ATM native
• Multi-Path Channel (MPC+) support
• High Performance Data Transfer for TCP/IP and SNA
The system unit supports at most two Multiplexer Channel Adapters, allowing the
attachment of two channel interfaces. The two channel interfaces may be
attached to the same host or to two different hosts.
Point-to-point networks
In a network of this type, a host can only have one connection to one other host
at any time, and there are no broadcast mechanisms in place. Examples of this
type of network are CTC connections.
Notes:
• The term connection in the three paragraphs above applies to any single IP
interface of a host in any of the network types mentioned. For instance, a host
could have multiple point-to-point interfaces and thus more than one
connection at a time, but still only one per interface.
• Some publications only distinguish between broadcast and nonbroadcast
networks.
Some network hosts do not know their IP addresses when they are initialized.
This can be true especially in the case of a host needing to be booted from a
diskette. Reverse ARP (RARP) can be used by, for example, a diskless
workstation to determine its own IP address. In this case the workstation would
already know its hardware address (discovered at initialization) and would
broadcast a request to a RARP server to map the addresses. It is necessary to
have a RARP server in your network in order to implement RARP.
One of the reasons for using a connectionless network protocol was to minimize
the dependency on specific computing centers that used hierarchical
connection-oriented networks. The Department of Defense (DoD) intended to
deploy a network that would still be operational if parts of the country were
destroyed. During earthquakes, this has been proved to be true for the Internet.
1.6.1.1 IP addressing
IP uses IP addresses to specify source and target hosts on the Internet. (For
example, we can contrast an IP address in TCP/IP with a fully qualified
NETID.LUNAME in SNA). An IP address consists of 32 bits, which is usually
represented in the form of four decimal numbers, one decimal number for each
byte (or octet). For example:
Table 2. IP address
0 netid hostID
Class A
• Class A addresses use 7 bits for the network and 24 bits for the host portion of
the IP address. That allows for 126 (2**7-2) networks with 16777214 (2**24-2)
hosts each; a total of over 2 billion addresses.
• Class B addresses use 14 bits for the network and 16 bits for the host portion
of the IP address. That allows for 16382 (2**14-2) networks with 65534
(2**16-2) hosts each; a total of over 1 billion addresses.
• Class C addresses use 21 bits for the network and 8 bits for the host portion of
the IP address. That allows for 2097150 (2**21-2) networks with 254 (2**8-2)
hosts each; a total of over half a billion addresses.
• Class D addresses are reserved for multicasting (a sort of broadcasting, but in
a limited area, and only to hosts using the same class D address).
• Class E addresses are reserved for future use.
Why always -2? Some values for these host IDs and network IDs are preassigned
and cannot be used for actual network or host addressing:
all bits 0
Stands for this: this host (IP address with host address=0) or this network (IP
address with network address=0). When a host wants to communicate over a
network but does not yet know the network IP address, it may send packets
with network address =0. Other hosts on the network will interpret the address
as meaning “this network”. Their reply will contain the fully qualified network
address, which the sender will record for future use.
all bits 1
Stands for all: all networks or all hosts. For example:
128.2.255.255
means all hosts on network 128.2 (class B address).
Loopback
The class A network 127.0.0.0 is defined as the loopback network. Addresses
from that network are assigned to interfaces that process data inside the local
system and never access a physical network (loopback interfaces).
1.6.1.2 IP subnets
Due to the explosive growth of the Internet, the principle of assigned IP
addresses became too inflexible to allow easy changes to local network
configurations. Those changes might occur when:
• A new type of physical network is installed at a location.
• Growth of the number of hosts requires splitting the local network into two or
more separate networks.
• Growing distances require splitting a network into smaller networks, with
gateways between them.
Recall that an IP address consists of a network address and a host address. For
example, let us take a class A network; the address format is shown in Figure 3:
01 8 16 24 31
We may, for example, wish to choose the bits from 8 to 25 of a class A IP address
to indicate the subnet addresses, and the bits from 26 to 31 to indicate the actual
host addresses. Figure 4 on page 11 shows the format of a subnetted address
that is thus derived from the original class A address.
We normally use a bit mask, known as the subnet mask, to identify which bits of
the original host address field indicate the subnet number. In the above example,
the subnet mask is 255.255.255.192 in decimal notation (or 11111111 11111111
11111111 11000000 in bit notation). Note that by convention, the network address
is part of the subnet mask as well.
For each of these subnet values, only (2**18)-2 addresses (from 1 to 262142) are
valid because of the all-bits-0 and all-bits-1 number restrictions. This split will
therefore give 262142 subnets each with a maximum of (2**6)-2 or 62 hosts.
You will notice that the value applied to the subnet number takes the value of the
full byte with non-significant bits being set to zero. For example, the hexadecimal
value 11 in this subnet mask assumes an 8-bit value 11000000 and gives a
subnet value of 192 and not 3 as it might seem.
Applying this mask to our sample class A address 9.67.38.1 would break the
address down as follows:
Table 4. IP - class A subnet mask
IP will recognize all host addresses as being on the local network for which the
logical AND operation described above produces the same result. This is
important for routing IP datagrams in subnet environments.
You will notice that the subnet number shown above is a relative number, that is,
it is the 68760th subnet of network 9 with the given subnet mask.
The division of the original host address part into subnet and host parts can be
chosen freely by the local administrator, except that the values of all zeros and all
ones in the subnet field are reserved for special addresses.
Any organization can use any addresses in these ranges without reference to any
other organization. However, because these addresses are not globally unique,
they cannot be referenced by hosts in another organization and they are not
defined to any external routers.
Hosts having only a private IP address do not have IP layer connectivity to the
Internet. This may be desirable and may even be a reason for using private
addressing. All connectivity to external Internet hosts must be provided with
application gateways.
1.6.1.4 IP datagram
The unit of transfer of a data packet in TCP/IP is called an IP datagram. It is
made up of a header, containing information for IP and data that is only relevant
to the higher level protocols. IP can handle fragmentation and reassembly of IP
datagrams. The maximum length of an IP datagram is 65,535 bytes (or octets).
There is also a requirement for all TCP/IP hosts to support IP datagrams up to a
size of 576 bytes without fragmentation.
Source IP Address
Destination IP Address
We do not elaborate on the format of the IP datagram header. You can find this
information in RFC 791, Internet Protocol. For information on accessing this
document, see 1.12, “TCP/IP and Internet publications” on page 37.
1.6.1.5 IP Routing
There are two types of IP routing: direct and indirect.
Direct routing
If the destination host is attached to a physical network to which the source host
is also attached, an IP datagram can be sent directly, simply by encapsulating the
IP datagram in the physical network frame. This is called direct delivery and is
referred to as direct routing.
Indirect routing
Indirect routing occurs when the destination host is not on a network directly
attached to the source host. The only way to reach the destination is via one or
more IP gateways (note that in TCP/IP terminology, the terms gateway and router
are used interchangeably for a system that actually performs the duties of a
router). The address of the first of these gateways (the first hop) is called an
indirect route in the context of the IP routing algorithm. The address of the first
gateway is the only information needed by the source host.
IP routing table
The determination of available direct routes is derived from a list of local
interfaces available to IP and is composed by IP automatically at initialization. A
list of networks and associated gateways (indirect routes) needs to be configured
to be used with IP routing if required. Each host keeps the set of mappings
between the following:
• Destination IP network address(es)
• Route(s) to next gateway(s)
1.6.2.2 Traceroute
The Traceroute program can be useful for debugging purposes. Traceroute
enables determination of the route that an IP datagram follows from host to host.
Traceroute is based upon ICMP and UDP. It sends an IP datagram with a TTL of
1 to the destination host. The first router to see the datagram will decrement the
TTL to 0 and return an ICMP Time Exceeded message as well as discarding the
datagram. In this way, the first router in the path is identified. This process can be
repeated with successively larger TTL values in order to identify the series of
routers in the path to the destination host. Traceroute actually sends UDP
datagrams to the destination host which reference a port number that is outside
the normally used range. This enables Traceroute to determine when the
destination host has been reached, that is, when an ICMP Port Unreachable
message is received. This is very useful for debugging purposes and also for
learning if a remote host can be reached from the local host.
WAN Token
Ring
Ethernet
Bridge
A tree topology is a LAN architecture that is identical to the bus topology, except
that branches with multiple nodes are possible in this case.
WAN
Bridges became commercially available in the early 1980s. At the time of their
introduction, bridges connected and enabled packet forwarding between
networks. More recently, bridging between different networks has been defined
and standardized. Several kinds of bridging have proven important as
internetworking devices.
Bridging and switching occur at the link layer, which controls data flow, handles
transmission errors, provides physical addressing, and manages access to the
physical medium. Bridges provide these functions by using various link-layer
protocols with specific flow control, error handling, addressing, and media-access
algorithms. Examples of popular link-layer protocols include Ethernet, token-ring,
and FDDI.
Bridges are capable of filtering frames based on any layer-2 fields. Because
link-layer information often includes a reference to an upper-layer protocol,
bridges usually can filter on this parameter. Filters can be helpful in dealing with
broadcast and multicast packets.
One of the differences is that switches are significantly faster because they
switch in hardware, while bridges switch in software. Switches also support
higher port densities than bridges. Some switches support cut-through switching,
which reduces latency and delays in the network, while bridges support only
store-and-forward. Finally, switches reduce collisions on network segments
because they provide dedicated bandwidth to each network segment.
Ethernet Local
B rid
ridgge
e bridging
Token R em ote
R ing Brid ge
B ridg e bridging
B ridg
Brid gee
Remote bridges cannot improve WAN speeds, but they compensate for speed
discrepancies with a buffering capability. If a LAN device capable of a 3-Mbps
transmission rate wants to communicate with a device on a remote LAN
connected by a 64-kbps link, the local bridge must regulate the 3-Mbps data
stream so that it does not overwhelm the 64-kbps serial link. This is done by
storing the incoming data in on-board buffers and sending it over the serial link at
a rate that the serial link can accommodate.
The Institute of Electrical and Electronic Engineers (IEEE) differentiates the OSI
link layer into two separate sublayers: the media access control (MAC) sublayer
and the logical link control (LLC) sublayer. The MAC sublayer permits media
access, such as contention and token passing, while the LLC sublayer deals with
framing, flow control, error control, and MAC-sublayer addressing.
ATM
Backbone
Multiprotocol Token
Switch Ring
Ethernet
LAN S witch
100-M bps
E thernet
Switching
Switching algorithms are relatively simple and are basically the same for most
routing protocols. In most cases, a host determines that it must send a packet to
another host. Having acquired a router's address, the source host sends a packet
addressed specifically to a router's physical (media access control, or MAC-layer)
address, with the protocol (network layer) address of the destination host.
The router determines how to forward the packet to the next hop. If the router
does not know how to forward the packet, it typically drops the packet. If the
router knows how to forward the packet, it changes the destination physical
address to that of the next hop and transmits the packet.
The next hop may be the ultimate destination host. If not, the next hop is usually
another router, which executes the same switching decision process. As the
packet moves through the internetwork, its physical address changes but its
protocol address remains constant, as illustrated in Figure 12 on page 22.
1.7.4 Routing
Routing is the act of moving information across an internetwork from a source to
a destination. Along the way, at least one intermediate node typically is
encountered. Routing is often contrasted with bridging, which might seem to be
the same thing to the casual observer. The primary difference between the two is
that bridging occurs at layer-2 (the link layer), and routing occurs at layer-3 (the
network layer). Routing and bridging use different protocols in the process of
moving data from source to destination.
They accomplish this by sending each other their routing tables through the
transmission of messages. The routing update message generally consists of all
or a portion of a routing table. By analyzing routing updates from all other routers,
a router can build a detailed picture of network topology. A link-state
advertisement, another example of a message sent between routers, informs
other routers of the state of the sender's links. Link information also can be used
to build a complete picture of topology to enable routers to determine optimal
routes to network destinations.
Source host
PC
Packet
Router 1
Packet
Router 2
Packet
To:
Packet
Routing algorithms use many different metrics to determine the best route.
Sophisticated routing algorithms can base route selection on multiple metrics,
combining them in a single (hybrid) metric. All the following metrics can be used:
• Path length
Path length is the most common routing metric. Some routing protocols allow
network administrators to assign arbitrary costs to each network link. In this
case, path length is the sum of the costs associated with each link traversed.
Other routing protocols define hop count, a metric that specifies the number of
passes through internetworking products, such as routers, that a packet must
take en route from a source to a destination.
• Reliability
Reliability, in the context of routing algorithms, refers to the dependability
(usually described in terms of the bit-error rate) of each network link. Some
network links might go down more often than others. After a network fails,
certain network links might be repaired more easily or more quickly than other
links. Any reliability factors can be taken into account in the assignment of the
reliability ratings, which are arbitrary numeric values usually assigned to
network links by network administrators.
• Delay
Routing delay refers to the length of time required to move a packet from
source to destination through the internetwork. Delay depends on many
factors, including the bandwidth of intermediate network links, the port queues
at each router along the way, network congestion on all intermediate network
Confusion caused by two different applications trying to use the same port
number on one host is avoided by writing those applications to request an
available port from TCP/IP. Because this port number is dynamically assigned, it
may differ from one invocation of an application to the next.
UDP, TCP, and ISO TP-4 all use the same port principle. To the extent possible,
the same port numbers are used for the same services on top of UDP, TCP, and
ISO TP-4.
In other words, a socket is an endpoint for communication that can be named and
addressed in a network.
IP
The two processes communicate with each other over a TCP connection
(interprocess communication - IPC), as shown in Figure 14:
Process 1 Process 2
TCP TCP
reliable TCP
connection
IP IP
unreliable IP
datagrams
Figure 14. TCP - connection between processes
TCP does not recognize any application's data patterns but treats data as a
stream of bytes that the sending application writes to a buffer known as the TCP
window. The following steps explain the TCP operation in a simplified way:
• During connection establishment, the two hosts agree on an initial window
size for that connection. TCP on the sending system then fills up the window
with application data, chops its content into packets that conveniently fit into
IP datagrams, and passes those on to IP to be submitted to the receiver.
• TCP on the receiving system puts the packets back in order, sends an
acknowledgment for every two packets received in order, and fills up a receive
buffer (window) from which the receiving application retrieves the incoming
data stream.
• TCP on the sending system advances the window for as many packets as
have been acknowledged (in order) and continues to transmit packages until
the end of the data stream is reached. If packets are not acknowledged, TCP
will wait and retransmit them before notifying the application of a
communications problem. While TCP awaits acknowledgments, the window
cannot be advanced and packet transfer will slow down.
• TCP provides flow control during an ongoing communication by varying send
and receive window sizes at each transfer as required, which is important if a
system runs out of memory for buffer space, or when a very fast system is
communicating with a very slow system.
• TCP also provides for urgent data (interrupt signaling) to travel ahead of
communication traffic on the current connection.
• When the sending application terminates, normally or abnormally, TCP will try
to gracefully shut down the connection.
For readers who are familiar with SNA, we can relate Telnet in TCP/IP to the
terminal emulators (3270 or 5250 types) in SNA. In fact, all of the IBM TCP/IP
product implementations provide Telnet support of 3270 terminal emulation in
addition to the many other terminal emulation protocols, such as the widely used
DEC VT terminal emulation types.
The 3270 terminal emulation differs from normal Telnet operation in the following
ways:
A 3270 Telnet (TN3270) server must support those characteristics during initial
client/server session negotiations. TN3270 sessions can represent either display
or printer devices.
Due to the explosive growth in the number of hosts, this mechanism became too
complicated and time-consuming, and was replaced by a new concept: the
Domain Name System (DNS).
Domain names are formed in a similar way and will often reflect the hierarchical
delegation of authority used to assign them. For example, consider the name:
root
raleigh watson
itso
Conceptually, all Internet domain servers are arranged in a tree structure that
corresponds to the naming hierarchy in Figure 15 on page 29. Each leaf
represents a name server that handles names for a single subdomain. Links in
the conceptual tree do not indicate physical connections. Instead, they show
which other name server a given server can contact.
Database
Foreign
Local cache name server
1.10.1 Gopher
Gopher is a client/server protocol designed for information location and retrieval.
The client function provides a menu-driven interface to access the files stored on
a Gopher server. The server function allows descriptive names to be assigned to
the files, making it easier to identify the content of each file. Gopher was
designed at the University of Minnesota. For more information about Gopher, see
RFC 1436.
In 1993 the Web started to grow rapidly, which was mainly due to the National
Center for Supercomputing Applications (NCSA) developing a Web browser
program called Mosaic, an X Windows-based application. This application
provided the first graphical user interface to the Web and made browsing more
convenient.
Today there are Web browsers and servers available for nearly all platforms. You
can get them either from an FTP site for free or buy a licensed copy. The rapid
growth in popularity of the Web is due in part to the flexible way people can
navigate through world-wide resources on the Internet and retrieve them. Table 8
presents some statistics about the growth of the Web.
The number of Web servers is also increasing rapidly and the traffic over port 80,
which is the well-known port for HTTP Web servers on the NSF backbone, has
had a phenomenal rate of growth, too. The NSFNET was converted back to a
private research network in 1995; therefore, comprehensive statistics of
backbone traffic are not as easily available anymore, if they are at all.
Table 8. Growth of the World Wide Web
December 9,560,866 -- -- --
1999
Originally, no Java applet was supposed to touch anything locally outside of its
JVM and could only communicate back to the server from where it was
To spare resources on clients and networks, Java applets can be executed on the
server rather than downloaded and started at the client. Such programs are then
referred to as servlets. Though that method requires a significantly more powerful
server, it is highly suitable for environments with medialess systems, such as
network computers.
1.10.4.4 HotJava
HotJava is a Java-enabled Web browser, developed by Sun Microsystems, which
lets you view Java applets.
1.10.4.5 JavaOS
JavaOS is a highly compact operating system, developed by JavaSoft, which is
designed to run Java applications directly on microprocessors in anything from
personal computers to pagers. JavaOS will run equally well on a network
computer, a PDA, a printer, a game machine, or countless other devices that
require a very compact OS and the ability to run Java applications.
1.10.4.6 JavaBeans
An initiative called JavaBeans is brewing a similar set of APIs that will make it
easy to create Java applications from reusable components. JavaBeans will be
used in a wide range of applications, from simple widgets to full-scale,
mission-critical applications. Many software vendors including IBM have
announced plans to support it.
1.10.4.7 JavaScript
JavaScript is an HTML extension and programming language, developed by
Netscape, which is a simple object-based language compatible with Java.
JavaScript programs are embedded as source directly in an HTML document.
They can control the behavior of forms, buttons, and text elements. JavaScript is
used to create dynamic behavior in the elements of a Web page. In addition, it
can be used to create forms whose fields have built-in error checking routines.
For more information about Java, check out the following URLs:
http://www.ibm.com/javainfo/
http://www.java.sun.com/
You can say that the Internet is great because there is so much information that
can be accessed very easily and quickly. Electronic communication has become
a lot easier because of the Internet, but it can also be a dangerous at times.
Imagine that someone accesses your system and destroys data at random just
because you forgot to implement security that could have prevented it. Or worse,
One of the major concerns when providing commercial services on the Internet is
providing for transaction security and communications security.
SSL provides an alternative to the standard TCP/IP socket API, which has
security implemented within it. Hence, in theory it is possible to run any TCP/IP
application in a secure way without changing it. In practice, SSL is so far only
implemented for HTTP connections.
Privacy
After the symmetric key is established in the initial handshake, the messages are
encrypted using this key.
Integrity
Messages contain a message authentication code ensuring message integrity.
Authentication
During the handshake, the client authenticates the server using an asymmetric or
public key.
SSL requires each message to be encrypted and decrypted and therefore, has a
high performance and resource impact. In addition, since only the server is
authenticated, SSL is not suitable for applications, such as electronic banking,
which require that the server authenticates its clients.
Imagine a company where all the departments are connected to the internal
network, including sales, accounts, development, and human resources
departments. The administrator would like to be able to restrict access from the
development department machines to the human resources department
machines and from the sales department to the development department.
Most of the firewalls available today offer one or more of the following services,
some of which we briefly describe in the remainder of this section:
• Filtering gateways
• Proxy application layer gateways
• Circuit layer gateways (SOCKS servers)
• Domain name server hiding
• Mail handling
• Auditing and logging
Multiple technologies are needed to provide capabilities and protection. The IBM
eNetwork Firewall, for instance, is based on IBM technology and has been used
for more than 10 years to protect internal IBM IP networks.
Users in the private network can access an application, such as FTP, in the proxy
server using their usual utilities (clients). Users authenticate themselves to the
proxy server and can then access the application on the desired machine in the
public network. Proxy servers can also be used from the public network to access
Users have to use new versions of applications called SOCKSified clients. The
SOCKSified client code directs its requests to the SOCKS port on the firewall.
Sessions are broken at the firewall, as they are with proxy servers. With SOCKS,
however, the connection to the destination application is created automatically
once the user is validated.
Both the client and the SOCKS server need to have SOCKS code. The SOCKS
server acts as an application-level router between the client and the real
application server. SOCKS V4 is for outbound TCP sessions only. It is simpler for
the private network user but does not have secure password delivery, so it is not
intended for sessions between public network users and private network
applications. SOCKS V5 provides for several authentication methods and can
therefore be used for inbound connections as well, but you should be cautious.
SOCKS V5 also supports UDP-based applications and protocols.
The majority of Web browsers are SOCKSified and you can get SOCKSified
TCP/IP stacks for many platforms. For additional information, refer to RFC 1928,
1929, 1961, and the following URL:
http://www.socks.nec.com
TCP/IP for VSE/ESA Version 1.3 comes already installed on VSE/ESA 2.3 and
VSE/ESA 2.4; it is in the PRD1.BASE sublibrary. To upgrade to Release 1.4 and
to put TCP/IP for VSE/ESA into production a number of steps must be
accomplished; these are described in detail in this chapter.
At these sources you will find six books with the original program description of
TCP/IP for VSE 1.4 from Connectivity Systems, Inc., the provider of the TCP/IP
for VSE program, plus one manual describing the setup of the TCP/IP for
VSE/ESA program IBM is providing.
The book TCP/IP for VSE/ESA - IBM Program Setup and Supplementary
Information, SC33-6601 replaces the former TCP/IP for VSE/ESA User's Guide,
SC33-6601. All the available documentation for the TCP/IP for VSE/ESA 1.4
program is described in Chapter 1 of that publication.
The documentation is available in PDF format only. You can use the Adobe
Acrobat Reader to view and print the documentation. If you do not already have
an Acrobat Reader installed, or if you need information on installing and using an
Acrobat Reader, see the Adobe Web site at:
http://www.adobe.com
You should use the Apply PTFs dialog of the VSE/ESA Interactive Interface to
generate the PTF installation job stream.
2.3 Create VSE library for TCP/IP for VSE/ESA installation-unique definitions
We believe it is a good idea to store all TCP/IP for VSE/ESA configuration
definitions, temporary fixes, Web pages, and any other TCP/IP for VSE/ESA
members, in a library separate from any IBM-supplied libraries. Using a separate
VSE library, rather than system-provided or user-defined sublibraries in an
IBM-supplied library, separates user data from IBM data. It also facilitates easy
migration from one VSE release or version to another, such as VSE/ESA 2.3 to
VSE/ESA 2.4, where Fast Service Upgrade (FSU) is not supported.
Figure 17 on page 41 shows the job stream we used to define the VSAM catalog
and space to hold the library for the TCP/IP for VSE/ESA specific members. Note
that with VSE/ESA 2.3 and 2.4 the TCP/IP for VSE/ESA product itself is already
preinstalled in library PRD1.BASE.
Figure 17. Define VSAM catalog and space for library TCPIP
Figure 18 on page 42 shows the job stream we used to create the VSE library
and sublibraries in that VSAM space. We created the following sublibraries:
• TCPIP.CONFIG, to contain unique configuration members, such as the
initialization member and the Telnet menu
• TCPIP.HTML, to contain sample HTML pages
• TCPIP.FIXES, to contain any temporary fixes that might be needed
• TCPIP.PRINT, used to permanently hold incoming print data for an LPD
• TCPIP.TEMP, used to temporarily hold incoming print data for an LPD and
GPS
• TCPIP.XFER, used for FTP into and out of a VSE library
2.4 Obtain TCP/IP product keys from IBM and define to TCP/IP for VSE/ESA
An IBM product key is required for each of the following components of TCP/IP for
VSE/ESA that you plan to use:
• Base Pak or Application Pak
• Network File System
• General Print Server
You must contact IBM to obtain the keys. The different keys for the Application
Pak or Base Pak, NFS or GPS, will be delivered to the customer when the
product is licensed. To license the TCP/IP for VSE/ESA product and its features,
you have to use the normal IBM ordering process, for example, CFSW (the Software
Configurator).
Figure 19 on page 43 shows the job stream used to catalog the product keys and
customer information:
You may be installing TCP/IP for VSE/ESA for only one or two applications, such
as FTP and LPR; if so, you should only make definitions for what you need.
We will provide definitions for all of the applications, and give examples of using
each.
The TCP/IP for VSE Installation Guide, Release 1.4 has good descriptions of the
setup required for all of the supported LAN attachments.
2.7 Configure the network to which the VSE system will be connected
This activity could take many forms, depending on the network, but generally it
will consist of updating router tables to include the IP address for TCP/IP for
VSE/ESA, and customizing clients on workstations and other remote hosts to
include the new IP address.
2.8 Define the hardware and network environment to the S/390 hosts
Our project environment included VM/ESA and multiple VSE/ESA systems. Each
system required definitions for TCP/IP.
192.168.155.121
SON Y Notebook
PC
192.168.155.102
192.168.155.114
H P LaserJet 4
IB M Notebook
PC 192.168.155.103
192.168.155.112
192.168.155.105
HP LaserJet
IB M PC S erver 330 HP LaserJet
with VSE /ES A 4500 4000
An Ethernet 10/100 Mb adapter was dedicated to the VSE/ESA 2.4 system, and
virtual CTCAs were defined between the VSE240 guest and VM/ESA, and
between the VSE240 guest and the VSE231 guest. Figure 21 shows the layout.
VM/ESA 2.3
CTCA CTCA
600 403 401 610
601 402 400 611
Ethernet LAN
adapter
Figure 21. Software layout on the IBM Integrated Server
Because this book is about using TCP/IP for VSE/ESA, we chose to dedicate the
Ethernet adapter to VSE; in a normal VM/VSE environment, you would probably
have TCP/IP for VM/ESA own the adapter.
A P/390 system with VSE/ESA 2.3 and TCP/IP for VSE 1.3 from Connectivity
Systems. This system was used to demonstrate FTP, LPD/LPR, and Telnet
between VSE systems.
A PC Server 500 with OS/2 WARP 4 Server Advanced and TCP/IP for OS/2. This
system was used to demonstrate FTP and Telnet with an OS/2 client. The
Windows 98 workstations
Sony and IBM notebook PCs with Windows 98. The following additional software
was installed:
• BlueZone FTP, a free graphical Windows FTP client from Renex Corporation
• SmartFTP-Daemon, a free graphical Windows FTP daemon by Jochen Letsch
• TN3270 Plus, a TN3270 client from SDI Bermuda LTD
• InterDrive Client (NFS for Windows 95 or Windows 98), an NFS client from
FTP Software, Inc.
These were used to demonstrate FTP, Telnet, and NFS with Windows clients and
servers.
HP LaserJet printers
The highlighted entries in Figure 23 show the changes made to SYS1 TCPIP:
The OPTION statement sets the CPU serial number to 4, and we used that in
conjunction with an ASI master procedure to select the correct IPL and JCL
procedures.
The DEDICATE statement for 152 is the DASD volume containing the VSE library
we built for TCP/IP for VSE/ESA to use.
The DEDICATE statements for 600 and 601 make the Ethernet LAN adapter
available to the VSE240 guest.
The SPECIAL statements for 400-403 create virtual CTCAs that are used to
communicate from this VSE system to TCP/IP for VM/ESA and the VSE231 guest
machine.
A set of IPL/JCL procedures with a suffix of 4 was created to define the desired
environment ($IPLESA4.PROC, $0JCL4.PROC, USERBG4, and so forth). An IPL
master procedure ($ASIPROC.PROC) was created to automate IPLing with these
suffixed procedures. Figure 26 shows the IPL master procedure we used.
* $$ JOB JNM=ASIMAST,DISP=D,CLASS=0
// JOB ASIMAST CATALOG ASI MASTER PROC
// EXEC LIBR,PARM='MSHP'
CONN S=IJSYSRS.SYSLIB : PRD2.SAVE
COPY $ASIPROC.PROC
A S=IJSYSRS.SYSLIB
CATALOG $ASIPROC.PROC R=Y
CPU=FF0000047490,IPL=$IPLESA4,JCL=$$JCL4
/+
/*
/&
* $$ EOJ
.
ADD 152,ECKD
.
ADD 400:401,CTCA,EML VIRTUAL CTCA TO VM/ESA
ADD 402:403,CTCA,EML VIRTUAL CTCA TO VSE/ESA 2.3
.
ADD 600:601,CTCA I/S LCS3172 FOR TCP/IP FOR VSE
.
Figure 28. Additions to the VSE240 JCL proc $0JCL4.PROC for TCP/IP for VSE/ESA
.
PRTY BG=FA=F9=F8=F6=F5=F4,F2,F7,Z,FB,F3,F1
// PWR PRELEASE RDR,VTAMSTRT START VTAM IF REQUIRED
// EXEC IESWAIT,PARM='03'
// PWR PRELEASE RDR,TCPSZ1 START TCP/IP IN Z1
// EXEC IESWAIT,PARM='03'
// PWR PRELEASE RDR,TCPSF7 START TCP/IP IN F7
// EXEC IESWAIT,PARM='03'
/. NOVTAM
// PWR PRELEASE RDR,CICSICCF START CICS .
Dynamic class Z in the IBM-supplied dynamic class table was updated to contain
only one partition of 20 MB for TCP/IP for VSE/ESA.
Figure 30 shows the startup job for the primary TCP/IP partition Z1:
* $$ JOB JNM=TCPSZ1,CLASS=Z,DISP=L
* $$ LST CLASS=X,DISP=L
// JOB TCPSZ1 START UP TCPIP IN PARTITION Z1
// LIBDEF *,SEARCH=(TCPIP.CONFIG,TCPIP.HTML,TCPIP.TEMP,TCPIP.XFER, X
TCPIP.PRINT,TCPIP.FIXES,PRD1.BASE,PRD2.SCEEBASE)
// DLBL SAMFILE,'VSAM.SAM.FTP.FILE1',99/365,VSAM,CAT=VSESPUC, X
RECORDS=(100,100),RECSIZE=80
// DLBL KSDSFIL,'VSAM.KSDS.FTP.FILE1',,VSAM,CAT=VSESPUC
// DLBL ESDSFIL,'VSAM.ESDS.FTP.FILE1',,VSAM,CAT=VSESPUC
// DLBL KSDSPRT,'VSAM.KSDS.PRINT.FILE1',,VSAM,CAT=VSESPUC
// DLBL ESDSPRT,'VSAM.ESDS.PRINT.FILE1',,VSAM,CAT=VSESPUC
// EXEC PROC=DTRICCF
// SETPFIX LIMIT=400K
// EXEC IPNET,SIZE=IPNET,PARM='ID=00,INIT=IPINIT04',DSPACE=4M
/&
* $$ EOJ
// LIBDEF *,SEARCH=(TCPIP.CONFIG,TCPIP.HTML,TCPIP.TEMP,TCPIP.XFER,
TCPIP.PRINT,TCPIP.FIXES, PRD1.BASE,PRD2.SCEEBASE)
Identifies the VSE sublibrary search chain where various TCP/IP for
VSE/ESA related members are cataloged:
TCPIP.CONFIG contains the configuration member IPINIT04.L, as well as
any other installation-modified or created members.
TCPIP.HTML is the root library for the HTTP daemon, and contains all of
the various HTML pages.
TCPIP.TEMP is used to temporarily store print members.
TCPIP.XFER is used to transfer VSE library members into and out of the
VSE system using FTP.
TCPIP.PRINT is used to permanently store print members.
TCPIP.FIXES is normally empty but could contain any fixes above the
supported IBM PTF level.
PRD1.BASE contains the TCP/IP for VSE/ESA product itself.
PRD2.SCEEBASE contains the C Language run-time support, which is
used by the product code validation routine.
// EXEC PROC=DTRICCF
If FTP from the VSE/ICCF library is to be used, this JCL statement is
required to identify to TCP/IP for VSE/ESA where the ICCF library is
// SETPFIX LIMIT=400K
TCP/IP for VSE/ESA requires some PFIXed storage for operation. This
statement is required to allow TCP/IP for VSE/ESA to PFIX up to the
amount of storage specified; 400K is usually a good number to use.
// EXEC IPNET,SIZE=IPNET,PARM='ID=00,INIT=IPINIT04',DSPACE=4M
SIZE=IPNET sets the partition program area to the size of the IPNET
phase. This leaves the rest of the partition for GETVIS.
ID=00 identifies a specific TCP/IP for VSE/ESA partition; 00 is the default
value. Each TCP/IP for VSE/ESA partition in a single VSE system must
have a unique ID, so that clients and servers running in other partitions can
identify to which TCP/IP for VSE/ESA partition to connect.
There should be one partition in any VSE system started with ID=00,
because that is the default that all VSE clients use.
INIT=IPINIT04 identifies the library initialization member to be used for this
startup. This library member contains configuration commands for TCP/IP
to execute during initialization.
In 2.8.5.4, “Customizing the IPINIT file for TCP/IP for VSE/ESA” on page
53 you will find a detailed description of our initialization member.
DSPACE=4M defines the maximum size of the data space that will be used
by ACF/VTAM when communicating with TCP/IP for VSE/ESA for TN3270
and GPS sessions. For our test system, we used a DSPACE of 4 MB.
Just as important is the DSPACE value you specify in the ACF/VTAM
startup job. For our test environment, we set the DSPACE parameter of our
VTAM startup job to 4 MB.
It is better to specify a larger value for DSPACE and not need all of it than
to specify a smaller value (1 MB or 2 MB) and need more. VTAM only
acquires what it needs.
Figure 31 shows the startup job for the secondary TCP/IP partition F7:
* $$ JOB JNM=TCPSF7,CLASS=7,DISP=L
* $$ LST CLASS=X,DISP=L
// JOB TCPSF7 START UP TCPIP IN F7 PARTITION
// LIBDEF *,SEARCH=(TCPIP.CONFIG,TCPIP.HTML,TCPIP.TEMP,TCPIP.XFER, X
TCPIP.PRINT,TCPIP.FIXES,PRD1.BASE,PRD2.SCEEBASE)
// EXEC PROC=DTRICCF
// SETPFIX LIMIT=400K
// EXEC IPNET,SIZE=IPNET,PARM='ID=07,INIT=IPINIT07',DSPACE=4M
/&
* $$ EOJ
The major difference in this job is that the TCP/IP initialization parameters are
different (ID=07 and INIT=IPINIT07).
IBM delivers, with the product, the sample initialization member IPINIT00.L in
PRD1.BASE. Its contents are shown in Figure 32, Figure 33 on page 54, and
Figure 34 on page 55. Note that many of the commands included are actually
comments. We recommend that, once you have created your own entries, you
remove all of the commented entries; this will make the member considerably
shorter and reduce confusion.
Figure 32. Standard IPINIT00.L delivered with TCP/IP for VSE/ESA (part 1 of 3)
Figure 33. Standard IPINIT00.L delivered with TCP/IP for VSE/ESA (part 2 of 3)
Figure 34. Standard IPINIT00.L delivered with TCP/IP for VSE/ESA (part 3 of 3)
Figure 35 on page 57, Figure 36 on page 58, Figure 37 on page 59, Figure 38 on
page 60, and Figure 39 on page 61 show the IPINIT04.L we used for the primary
TCP/IP for VSE/ESA during this project.
Following are brief descriptions of the commands and parameters we used in our
IPINIT04.L test environment. The full description of all the definitions in the
IPINIT file can be found in the manual TCP/IP for VSE Commands, Release 1.4 .
SET TRANSFER_BUFFERS = 20
This command sets the size of the buffer pool shared by all FTP daemons.
The buffers are allocated in 31-bit partition GETVIS space, if available.
This parameter has a major effect on FTP performance, and thus on CPU
consumption and I/O activity. A low value will lower CPU consumption and
slow I/O activity, but file transfers will be much slower. A high value will
allow file transfers to complete quickly, but they may consume most or all of
the available CPU cycles.
We left this value unchanged. We were unable to do any performance
measurements to see what effect changing this value would have.
SET TELNETD_BUFFERS = 20
This command sets the size of the buffer pool used by Telnet daemons
defined with POOL=YES. The buffers are allocated in 31-bit partition
GETVIS space, if available. Each buffer is 16K.
We left this value unchanged.
SET GATEWAY = ON
The SET GATEWAY command controls whether TCP/IP for VSE/ESA will
forward transmissions between networks. We set this to ON because we
were routing messages to a TCP/IP for VM/ESA system and a TCP/IP for
VSE/ESA partition that were not connected to the physical network, and
thus were acting as a gateway.
SET SECURITY = ON
WAIT VTAM
This command causes TCP/IP for VSE/ESA startup to check that
ACF/VTAM is active in the system and ready to accept logons, and wait if it
is not.
We included this command because we have Telnet daemons defined that
are communicating with VTAM, and did not want the daemons accepting
input from remote clients without VTAM active.
DEFINE LINK,ID=IS3172,TYPE=3172,DEV=600,MTU=1492
DEFINE ADAPTER,LINKID=IS3172,NUMBER=0,TYPE=ETHERNET
DEFINE LINK,ID=PARTF7,TYPE=IPNET,SYSID=07,MTU=4096,STOPPED
DEFINE LINK,ID=VSE231,TYPE=CTCA,DEV=402,MTU=4096,STOPPED
DEFINE LINK,ID=VMESA,TYPE=CTCA,DEV=400,MTU=4096
The DEFINE LINK command is used to define a connection to a network
connection device, such as an IBM 3172, OSA, or CTCA.
The DEFINE ADAPTER command identifies the specific adapter to be used on
a 3172 or OSA. This command is valid only when it follows a previously
issued DEFINE LINK command defining a 3172 or OSA.
ID=IS3172 : This DEFINE LINK/DEFINE ADAPTER pair of commands defines the
connection for TCP/IP for VSE/ESA via the emulated IBM 3172
Interconnect Controller of the Integrated Server using the subchannel pair
600/601. Our environment is an Ethernet connection; the maximum value
for MTU for the Integrated Server is 1492 using Ethernet.
ID=PARTF7: This DEFINE LINK command defines the connection between
the primary TCP/IP for VSE/ESA partition (ID=00) and the secondary
partition (ID=07) using IPNET, the TCP/IP for VSE/ESA cross partition
communication mechanism.
ID=VMESA : This DEFINE LINK command defines the connection of TCP/IP
for VSE/ESA via a virtual channel-to-channel adapter (addresses 400 and
401) to TCP/IP for VM/ESA. The MTU size of 4096 is a good value to use
for CTCA connections.
ID=VSE231: This DEFINE LINK command defines the connection of TCP/IP
for VSE/ESA via a virtual channel-to-channel adapter (addresses 402 and
403) to TCP/IP for VSE in another VSE guest (VSE231) running under the
same VM/ESA system.
DEFINE TELNETD,ID=TRMA,TERMNAME=TELNA,PORT=5023,COUNT=5,
TARGET=DBDCCICS
DEFINE TELNETD,ID=TRMB,TERMNAME=TELNB,PORT=23,COUNT=5,
MENU=VTAM1
The DEFINE TELNETD command defines and initializes one or more Telnet
daemons (servers). Each TN3270 client that is to be concurrently
supported requires a Telnet daemon.
These commands define two sets of Telnet daemons, one to connect
directly to VTAM application DBDCCICS if traffic arrives for port 5023, and
another to display a selection menu for traffic on port 23.
DEFINE MENU,ID=VTAM1,MEMBER=VTAM1
The DEFINE MENU command permits you to display a selection menu to
Telnet users, allowing them to select to which VTAM application to connect.
DEFINE FTPD,ID=FTP,PORT=21,COUNT=5,UNIX=YES
The DEFINE FTPD command initiates one or more File Transfer Protocol
daemons. You must provide one daemon for each concurrent FTP session.
We defined five daemons to allow five file transfers to occur
simultaneously. We also started the daemons in UNIX mode so that any
graphical FTP clients we ran would function correctly (graphical FTP clients
all seem to be written expecting to communicate with TCP/IP on UNIX, and
usually do not function correctly with the VSE FTP daemon unless
UNIX=YES is specified).
DEFINE EVENT,ID=FTP_N,TYPE=POWER,CLASS=N,QUEUE=LST,
ACTION=FTP
The DEFINE EVENT command permits you to establish actions to be
performed when specified events occur on your VSE system.
We defined an event that would perform an FTP transfer automatically
whenever any class N output was put into the VSE/POWER LST queue.
The script to be executed is determined by the DEST= parameter on the *
$$ LST statement of the job that puts the output into the queue.
DEFINE LPD,PRINTER=FAST,QUEUE='POWER.LST.A'
DEFINE LPD,PRINTER=FASTLIB,QUEUE='TCPIP.PRINT'
DEFINE LPD,PRINTER=LOCAL,QUEUE='POWER.LST.A',LIB=TCPIP,
SUBLIB=TEMP
DEFINE LPD,PRINTER=KSDS,QUEUE='KSDSTCP.PRINT',LIB=TCPIP,
SUBLIB=TEMP
DEFINE LPD,PRINTER=ESDS,QUEUE='ESDSTCP.PRINT',LIB=TCPIP,
SUBLIB=TEMP
The DEFINE LPD command initiates a Line Printer Daemon (server). You
must provide a definition for each virtual printer to be supported.
We defined several Line Printer Daemons to demonstrate receiving and
storing print output from remote hosts directed to various destinations,
such as a VSE/POWER queue, a VSE library, and VSAM files.
QUEUE is the location to receive the output routed to this daemon. This
location must be a valid public name from the TCP/IP for VSE/ESA file
system (see DEFINE FILE).
LIB and SUBLIB specify the library and sublibrary to be used for temporary
storage of a file. If you have not defined these parameters, incoming data
will be temporarily stored in memory. This means that the largest file that
can be handled is limited to available memory.
DEFINE EVENT,ID=LST_LISTEN,TYPE=POWER,CLASS=M,QUEUE=LST,
ACTION=LPR
DEFINE NAME,NAME=LPRSCR01,SCRIPT=LPRSCR01
This command allows you to define a script file in which you can specify
LPR commands that are executed when printing a file with the automatic
LPR. The name given in the NAME parameter references the name defined
in the POWER * $$ LST statement as USER. The name specified in the
SCRIPT parameter is the name of the VSE library member containing this
script file.
We created script LPRSCR01.L to demonstrate using scripts. See 5.4.3,
“Using scripts for the automatic LPR client” on page 162 for details.
DEFINE USER,ID=TCPA, -
+ PASSWORD=TWINKIE
DEFINE USER,ID=JUST, -
+ PASSWORD=TWINKIE
DEFINE USER,ID=JOHN, -
+ PASSWORD=TWINKIE
DEFINE USER,ID=SYSA, -
+ PASSWORD=TWINKIE
DEFINE USER,ID=SYSC, -
+ PASSWORD=TWINKIE
DEFINE USER,ID=SYSD, -
+ PASSWORD=TWINKIE
The DEFINE USER command allows you to define who can access the TCP/IP
for VSE/ESA system. The user ID and password are only checked if
security has been turned on using the SECURITY command.
ID and PASSWORD can each be up to 16 characters.
The “+” at the beginning of each line containing PASSWORD causes
TCP/IP for VSE/ESA not to print the contents of that line on SYSLST during
startup; this provides some measure of security for the passwords.
We defined several users to demonstrate using security.
DEFINE NFSD,ID=NFSD,CONFIG=NFSCFG01
This command defines the Network File System daemon. NFSCFG01 is
the name of the configuration file.
DEFINE GPSD,ID=GPS1,PRINTER=TEXT,IPADDR=HP4000,
INSERTS=HP4LAND,TERMNAME=GPSPRT01,
TARGET=DBDCCICS,INSESS=YES,LOGMODE=DSC2K,
QUEUING=MEMORY,STORAGE='TCPIP.TEMP',
RETRY_COUNT=3
DEFINE GPSD,ID=GPS2,PRINTER=TEXT,IPADDR=HP4500,
INSERTS=HP4LAND,TERMNAME=GPSPRT02,
TARGET=DBDCCICS,INSESS=YES,LOGMODE=DSC2K,
QUEUING=MEMORY,STORAGE='TCPIP.TEMP',
RETRY_COUNT=3
These commands define the General Print Server daemons. There must be
one daemon for each VTAM 3287-type printer you wish to emulate.
We created two daemons to support two printers.
DEFINE HTTPD,ID=HTTP1,ROOT='TCPIP.HTML',SECURE=NO,
CONFINE=YES
DEFINE HTTPD,ID=HTTP2,ROOT='TCPIP.HTML',PORT=5080,SECURE=YES,
CONFINE=NO
The DEFINE HTTPD command initiates an HTTP (Web) daemon (server).
We defined two daemons, one secured and one nonsecured, to
demonstrate the difference.
DEFINE CGI,PUBLIC='ASMCGI1',TYPE=CGI
DEFINE CGI,PUBLIC='ASMCGI2',TYPE=CGI-BAL
DEFINE CGI,PUBLIC='REXXCGI1',TYPE=CGI-REXX
The DEFINE CGI command identifies the Common Gateway Interface (CGI)
programs to be used by Web browsers.
We defined three programs to demonstrate using programs written in 24-bit
assembler, 31-bit assembler, and REXX.
INCLUDE NETWORK,DELAY
The INCLUDE command causes TCP/IP to load a .L member from a VSE
library and execute the contents as if they were part of the initialization
member. The DELAY parameter causes the commands in the member not
to be executed until TCP/IP for VSE/ESA initialization is complete.
We included the member NETWORK.L as an example. Our member
contains a WAIT and a PING command; see Figure 40 on page 69.
We think it is a very good idea to issue at least one PING to some remote host
that is always on the network at the completion of TCP/IP for VSE/ESA startup.
Successful completion of the PING provides a positive indication that we are
talking to the network.
Figure 41 on page 70 shows part of the IPINIT07.L we used for the secondary
TCP/IP during this project. We have included only the commands related to
running as a secondary TCP/IP partition using the IPNET interface.
The following commands in IPINIT07.L are significant for the secondary TCP/IP
partition:
SET IPADDR=192.168.155.126
This command sets the IP address for the secondary partition.
SET MASK=255.255.255.224
Because we are on the same subnetwork, we used the same mask as for
the primary partition.
SET GATEWAY=OFF
This partition is not being used as a gateway to another network, so we set
gateway support to OFF.
DEFINE LINK,ID=PARTZ1,TYPE=IPNET,SYSID=00,MTU=4096
This command identifies the link back to the primary TCP/IP partition.
DEFINE ROUTE,ID=ALL,LINKID=PARTZ1,IPADDR=0.0.0.0
This command routes all traffic from this TCP/IP partition over the link to
the primary TCP/IP partition, which will then route it to the correct remote
host.
DEFINE TELNETD,ID=TRMC,TERMNAME=TELNC,PORT=23,COUNT=5,
MENU=VTAM1
DEFINE MENU,ID=VTAM1,MEMBER=VTAM1
* $$ JOB JNM=TCPAPPL,DISP=D,CLASS=0
// JOB TCPAPPL CATALOG TCP/IP TCPAPPL.B
// EXEC LIBR
A S=PRD2.CONFIG
CATALOG TCPAPPL.B REPLACE=YES
TCPAPPL VBUILD TYPE=APPL
TCPDIAG APPL AUTH=(ACQ)
TCPIP APPL AUTH=(ACQ)
TELNA01 APPL AUTH=(ACQ)
TELNA02 APPL AUTH=(ACQ)
TELNA03 APPL AUTH=(ACQ)
TELNA04 APPL AUTH=(ACQ)
TELNA05 APPL AUTH=(ACQ)
TELNB01 APPL AUTH=(ACQ)
TELNB02 APPL AUTH=(ACQ)
TELNB03 APPL AUTH=(ACQ)
TELNB04 APPL AUTH=(ACQ)
TELNB05 APPL AUTH=(ACQ)
TELNC01 APPL AUTH=(ACQ)
TELNC02 APPL AUTH=(ACQ)
TELNC03 APPL AUTH=(ACQ)
TELNC04 APPL AUTH=(ACQ)
TELNC05 APPL AUTH=(ACQ)
/+
/*
/&
* $$ EOJ
All required programs and CICS transactions come with TCP/IP for VSE/ESA.
To be able to use these CICS client transactions, all the required transactions and
related programs must be defined to CICS:
• For VSE/ESA 2.4, IBM has included the definitions in the CICS CSD under the
group name TCPIP. This group has also been included in VSELIST, the list
used for CICSICCF startup. Thus, no setup is required unless you plan to use
another list; in that case, be sure to add group TCPIP to your list.
• For VSE/ESA 2.3, the CICS CSD is not prepared to use the TCP/IP for
VSE/ESA product. Therefore, you have to define the required programs and
transactions to CICS/VSE as described in the following section.
Because CICS TS for VSE/ESA 1.1 (included in VSE/ESA 2.4) does not support
CICS table definitions any longer a member IPNCSD.Z is shipped with TCP/IP for
VSE/ESA, which uses CICS command definitions instead of CICS macro
definitions. Additionally, a member IPNCSDUP.Z is available to use IPNCSD.Z for
generating DFHCSD entries for TCP/IP for VSE/ESA on CICS/TS and CICS/VSE.
Note that both jobs can also be used for CICS/VSE 2.3.
* $$ JOB JNM=IPNCSDUP,CLASS=0,DISP=D
// JOB IPNCSDUP
* SHUT DOWN CICS FIRST
// PAUSE CLOSE DFHCSD FILE IF CICS IS UP : CEMT SE FI(DFHCSD) CLOSE
/*
// LIBDEF *,SEARCH=(PRD2.CONFIG,PRD1.BASE,PRD2.SCEEBASE)
// EXEC DFHCSDUP,SIZE=600K INIT AND LOAD CICS
DELETE GROUP(TCPIP)
* $$ SLI MEM=IPNCSD.Z,S=(PRD1.BASE)
ADD GROUP(TCPIP) LIST(VSELIST)
LIST ALL
/*
/&
* $$ EOJ
Please note that the use of group TCPIP and list VSELIST is arbitrary. You may
make any adjustments that your site requires.
The member IPNCSD.Z shipped with the TCP/IP for VSE/ESA product looks as
shown in Figure 44 on page 73:
With CICS/VSE the CICS CSD entries required for TCP/IP for VSE/ESA can also
be created using the job stream shown in Figure 45 on page 74.
Figure 45. Job to generate DFHCSD entries for TCP/IP for VSE/ESA on CICS/VSE
After generating the DFHCSD entries, the new group must be installed in the
active CICS system with the command CEDA INSTALL GROUP(TCPIP). This can also
be achieved by recycling CICS (be sure to perform a cold start).
Figure 46. VM/ESA directory entry for the VSE231 guest machine
Figure 47. VSE231 IPL procedure entries for TCP/IP for VSE
.
* CP TERM BREAKIN MIN
* CP COUPLE 600 VSE240 403
* CP COUPLE 601 VSE240 402
.
Figure 48. VSE231 JCL procedure entries for TCP/IP for VSE
The following definitions were made in TCP/IP for VSE in the VSE/ESA 2.3
(VSE231) system to enable communication with TCP/IP for VSE/ESA in the
VSE/ESA 2.4 system (VSE240):
.
SET IPADDR = 192.168.155.124
SET MASK = 255.255.255.224
.
SET GATEWAY = OFF
.
DEFINE LINK,ID=VSE240,TYPE=CTCA,DEV=600,MTU=4096
.
DEFINE ROUTE,ID=VSE240,LINKID=VSE240,IPADDR=0.0.0.0
.
DEFINE TELNETD,ID=LU,TERMNAME=TELNLU,TARGET=DBDCCICS,PORT=23,COUNT=5
.
DEFINE FTPD,ID=FTP,PORT=21,COUNT=5
.
DEFINE FILE,PUBLIC='POWER',DLBL=IJQFILE,TYPE=POWER
.
Figure 49. TCP/IP for VSE entries for the VSE231 guest machine
2.9.1 Windows 98
Windows 98 (and Windows 95) includes a line mode Telnet client and a line mode
FTP client. We added:
• A TN3270 client, described in 4.1.5, “Configuring a TN3270 client” on page
138
• A graphical FTP client, described in 3.2.1.2, “Graphical FTP clients” on page
88
• A graphical FTP daemon, described in 3.2.1.3, “Graphical FTP daemons” on
page 90
• An NFS client, described in 7.4.1, “Configuring the NFS client” on page 191
If your network already includes a Domain Name System (DNS), then the HOSTS
file is not necessary; both the workstations and TCP/IP for VSE/ESA will contact
the DNS to resolve the address. DNS support is available in TCP/IP for VSE/ESA
with the usage of the SET DNS1 parameter. This is described in detail in TCP/IP
for VSE Commands, Release 1.4 .
2.9.2 OS/2
OS/2 Warp Server 4 includes a line mode Telnet client, a TN3270 client, a line
mode FTP client and a graphical FTP client (FTP-PM), and a line mode LPR
client. We used only the line mode clients for this project, and no customization
was required.
You can issue this command from all TCP/IP hosts, and it will tell you whether
you can communicate with the target host. For example, to ping from Windows 98
to our VSE240 system:
C:\>ping vse240
C:\>
Figure 52. Issuing the PING command from the VSE console
There is also a batch PING client you can use. How to use the batch PING client
is described in the manual TCP/IP for VSE User’s Guide, Release 1.4.
Just because you can ping in one direction does not mean that it will work in the
other. You should very carefully use PING on each system to verify
communication with every other system you need to communicate. This is
especially true if you are using any gateways, routers, or bridges.
TCP/IP for VSE/ESA does not have this command, but Windows 98, for example,
does. Here is an example:
C:\>tracert vse240
1 57 ms 77 ms 23 ms VSE240 [192.168.155.108]
Trace complete.
C:\>
This shows that there were no intermediate hops between the PC and the VSE
system in our particular setup, but if there were, they would show up here.
Nearly all TCP/IP for VSE/ESA commands can be entered using the operator
communication interface.
You can create a .L member containing the commands you want executed, and
then issue the EXECUTE command through the VSE console to process those
commands. For example, suppose you wish to create new FTP daemons while
TCP/IP for VSE/ESA is active; you could catalog the following .L member in a
VSE library accessible to TCP/IP for VSE/ESA:
* $$ JOB JNM=CMDFILE,DISP=D,CLASS=0
// JOB CMDFILE
// EXEC LIBR
A S=TCPIP.CONFIG
CATALOG CMDFILE.L R=Y
DEFINE FTPD, ID=TEMP1, PORT=8021, IPADDR=192.168.155.114, -
UNIX=YES, TIMEOUT=900
DEFINE FTPD, ID=TEMP2, PORT=8099, IPADDR=192.168.155.115, -
UNIX=YES, TIMEOUT=900
/+
/*
/&
* $$ EOJ
You can then process this file by issuing the EXECUTE command:
==>
1=HLP 2=CPY 3=END 4=RTN 5=DEL 6=DELS 7=RED 8=CONT 9=EXPL 10=HLD 12=RTRV
* $$ JOB JNM=TCPCMD,DISP=D,CLASS=5
// JOB TCPCMD PASS COMMANDS TO TCP/IP FROM BATCH
// LIBDEF *,SEARCH=(TCPIP.FIXES,PRD1.BASE)
// EXEC IPNETCMD,PARM='ID=00'
DEFINE FTPD, ID=TEMP1, PORT=8021, IPADDR=192.168.155.114, -
UNIX=YES, TIMEOUT=900
DEFINE FTPD, ID=TEMP2, PORT=8099, IPADDR=192.168.155.115, -
UNIX=YES, TIMEOUT=900
/*
/&
* $$ EOJ
==>
1=HLP 2=CPY 3=END 4=RTN 5=DEL 6=DELS 7=RED 8=CONT 9=EXPL 10=HLD 12=RTRV
If you run in a VM/ESA environment, be very careful when you issue the SHUTDOWN
command; that same character string will, when issued to VM/ESA CP, shut down
the VM system.
If TCP/IP for VSE/ESA does not shut down when requested, you may need to
issue the VSE CANCEL command, and even include the FORCE operand
occasionally.
One word of caution: the internal interfaces are partition dependent, so the restart
following abnormal termination must be in the same partition (for a dynamic
partition, it is the same partition, not the same dynamic class, which may be a
We recommend you allow TCP/IP for VSE/ESA to display all messages on both
the console and SYSLST until you are comfortable the product is working
correctly. You may then want to display the routine messages only on SYSLST,
and reserve the console for more important messages.
See TCP/IP for VSE Installation Guide, Release 1.4 for guidance on message
management.
File transfers using TCP/IP for VSE/ESA can be initiated either from VSE or from
a client communicating with VSE. When you initiate a transfer from your client
(such as from your PC), you are using both an FTP client and the TCP/IP for
VSE/ESA FTP server. When you initiate a transfer from VSE using the FTP
command in CICS, automated FTP, or a batch job, you are using the TCP/IP for
VSE/ESA FTP client, and must have an FTP server installed on the remote host
(the PC).
We will discuss the required definitions and provide examples for using the
TCP/IP for VSE/ESA FTP server from various clients, as well as using the VSE
FTP clients with a server on a remote host.
The complete syntax of the DEFINE FTPD command can be found in the manual
TCP/IP for VSE Commands, Release 1.4.
DEFINE FTPD,ID=FTP,PORT=21,COUNT=5,UNIX=YES
This definition generated five daemons, FTP01 through FTP05, so we could have
up to five file transfers occurring at the same time.
SET SECURITY = ON
*
DEFINE USER,ID=TCPA, -
+ PASSWORD=TWINKIE
DEFINE USER,ID=JUST, -
+ PASSWORD=TWINKIE
DEFINE USER,ID=JOHN, -
+ PASSWORD=TWINKIE
DEFINE USER,ID=SYSA, -
+ PASSWORD=TWINKIE
DEFINE USER,ID=SYSB, -
+ PASSWORD=TWINKIE
DEFINE USER,ID=SYSC, -
+ PASSWORD=TWINKIE
DEFINE USER,ID=SYSD, -
+ PASSWORD=TWINKIE
The complete syntax of the DEFINE FILESYS and DEFINE FILE commands can be
found in the manual TCP/IP for VSE Commands, Release 1.4 .
We included definitions for each of the different types of files supported, so that
we could demonstrate their use. We also made a number of the entries read-only,
to ensure critical entries such as VSAM catalogs did not get destroyed during the
project.
Note
TCP/IP for VSE/ESA includes a quick and easy way to define a large number of
files by using the DEFINE FILESYS command. However, we feel this is a very
dangerous method to use, because it makes all of the files in your label area
available as part of the file system. This typically includes all of your VSE
libraries (IJSYSRS,PRD1, PRD2), all of your VSAM catalogs (master catalog
and user catalogs), all of the VSE/POWER queues, and all of your master files
(VSAM and sequential). We highly recommend you never use the DEFINE
FILESYS command in a production TCP/IP for VSE/ESA partition, but instead
use DEFINE FILE commands to define only the files you really want accessible.
And we recommend you include READONLY=YES on all files except those you
definitely want to allow to be updated.
The label information (DLBLs) for each of the files defined in the file system is
shown in Figure 62 on page 86.
Figure 62. DLBLs for each file defined in the file system
Some of the labels in this list came from the TCP/IP startup job stream, and some
from the VSE standard labels. Note that the DLBLs for VSAM catalogs have a
CAT=value pointing to themselves; this is required by TCP/IP for VSE/ESA when
accessing the catalogs using FTP.
The complete syntax of the DEFINE EVENT command can be found in the
publication TCP/IP for VSE Commands, Release 1.4.
DEFINE EVENT,ID=LST_LISTEN,TYPE=POWER,CLASS=N,QUEUE=LST,ACTION=FTP
Details on using this support are in 3.7.2.4, “Automatic FTP” on page 127.
TCP/IP for VSE/ESA provides definitions for the CICS transactions and
programs. These should already be in your CSD, but you should verify that they
are and create them if they are not; see 2.8.5.6, “CICS definitions for TCP/IP for
VSE/ESA” on page 71.
C:\>ftp
ftp> help
Commands may be abbreviated. Commands are:
The Windows command-line FTP client can be used through .BAT files to make
repetitive file transfers easier. For example, you can create a batch file on the
workstation like this:
The client we chose to install on our Windows 98 workstations for this project was
BlueZone FTP. This client offers several configuration options, but most are not
really needed to get started.
Below are a few windows from configuring the BlueZone FTP client to give you an
idea of what types of configuration options may be available on the client of your
choice.
Under the Session pull-down list is a Configure option. Selecting this option
displays a list of sessions that have already been configured, allowing you to
change existing configurations or add new ones (see Figure 68 on page 89).
We selected our VSE240 configuration to update, and the following window was
displayed:
See Figure 70 for an example of how this client looks when connected to a VSE
system:
Under the Settings pull-down is a User Management option. Here you can define
users and groups of users:
Once connected, you can change directories and select the files to be
transferred.
ESDSTCP
FILE
PRINT
ICCF
IJSYSCT
All VSAM files in the catalog
KSDSTCP
FILE
PRINT
POWER
LST
A - Z, ALL, BIN, 0 - 9
RDR
A - Z, ALL, BIN, 0 - 9
PUN
A - Z, ALL, BIN, 0 - 9
PRD2
all sublibraries in the library
SAMTCP
FILE
TCPCAT
all VSAM files in the catalog
TCPIP
all sublibraries in the library
UCATF01
all VSAM files in the catalog
VSESPUC
all VSAM files in the catalog
When we enter the file system, we are normally at the top or ROOT directory; that
is, not pointing at any entry. We can issue a CD command to point to any entry we
wish; for example, CD TCPIP. If we then issue a DIR command, we would see all
of the sublibraries we have defined in that library:
CONFIG
FIXES
HTML
PRINT
TEMP
XFER
AUTOFTP1 L
AUTOFTP2 L
EXTTYPES L
GPSDEF L
GPSDEF01 L
GPSDEF02 L
IPINIT04 L
IPINIT07 L
IPINIT08 L
LPRCFG01 L
LPRSCR01 L
NETWORK L
NFSCFG01 L
VTAM1 L
CUSTDEF PHASE
INSLAND PHASE
LPRISRT1 PHASE
PRODKEYS PHASE
You can always determine your current position in the file system by issuing the
Print Working Directory (PWD) command.
You must be careful when issuing FTP commands that you issue them to the
correct system. For example, if you issue the CD and GET commands:
• From the FTP command line on the workstation, they apply to the remote file
system (VSE).
• From the CICS FTP client using 3270 emulation on that same workstation,
they apply to the workstation’s file system, not VSE’s.
The VSE FTP clients include LCD, LPWD, and LDIR commands, which reference the
"local" (VSE) file system, while CD, PWD, and DIR refer to the "remote" (PC) file
system.
TCP/IP for VSE/ESA comes with a member named EXTTYPES.L, which lists
various file extensions and how they should be translated (or not translated); see
Figure 80 on page 97. The FTP daemons use this table to determine how to
translate the files as they are transferred; they compare the file extension
specified on the GET or PUT for the VSE file against the table, and perform the
translation based on any match found. This search and match overrides any
specification you may make to the daemon, so it is important that the table entries
are correct.
Normally the only files available through FTP are those defined using the DEFINE
FILESYS and/or DEFINE FILE commands. However, the VSE batch FTP clients
support access to files and libraries that are not defined to the file system; they
can be defined directly, through DLBL or TLBL statements, right in the batch
client job stream, using what is called Autonomous FTP.
The most common actions that users will perform from a remote host with FTP
are GET and PUT. The GET command will transfer a file from the VSE FTP server
to a remote host while the PUT command will transfer a file from a remote host to
the VSE FTP server.
In the following examples, the input commands are highlighted so that you can
easily follow the steps. We will be using clients on a Windows 98 workstation, but
similar results would occur using OS/2, UNIX, or S/390 clients.
C:\>dir c:\junk\init*
C:\>
In this example we chose to set our position in both the VSE and workstation file
systems by using PWD, CD, and LCD commands before issuing the GET command.
We could have more easily accomplished the file transfer in one command by
specifying the file position explicitly, as shown in Figure 82 on page 100:
If you want to transfer object code into or out of a VSE library, either .OBJ
members or .PHASE members, the transfer must be done in binary. Figure 83 is
an example of transferring a phase from VSE library TCPIP.CONFIG to the
workstation and then back to the VSE system to library TCPIP.XFER under
another name.
Figure 84. VSE console output during transfer of the .PHASE member
You should always check the displayed summary information to ensure the file
transfer took place as you expected: translation on or off, fixed or variable length
records, carriage control on or off, and so forth.
This transferred the LST queue entry to the workstation with the carriage control
character in the first byte. You have several options when transferring
VSE/POWER files to your workstation:
• Carriage control character transferred unchanged (the default):
QUOTE SITE CC ON
QUOTE SITE TRCC OFF
GET ...
• Carriage control character removed during transfer:
QUOTE SITE CC OFF
QUOTE SITE TRCC OFF
GET ...
• Carriage control character replaced with ANSI control characters for PC
printers:
QUOTE SITE CC OFF
QUOTE SITE TRCC ON
Figure 87. Transfer a workstation file into the POWER LST queue
We transferred to the VSE/POWER LST queue in class M the file we had just
previously transferred down using the GET command.
ftp> CD POWER.RDR.0
250 Requested file action okay, completed.
ftp> PUT C:\JUNK\JOB1.JCL
200 Command okay.
150-File: POWER/RDR/0/JOB1.JCL
Type: Ascii Recfm: FB Lrecl: 80 Blksize: 80
CC=ON UNIX=ON RECLF=OFF TRCC=OFF CRLF=ON
Translate with US_ENG_03
150 File status okay; about to open data connection
226-Bytes sent: 136
Records sent: 8
Transfer Seconds: 1.49 ( 0K/Sec)
File I/O Seconds: .04 ( 0K/Sec)
226 Closing data connection.
ftp: 136 bytes sent in 0.00Seconds 0.00Kbytes/sec.
ftp>
Figure 88. Transfer a workstation file to the VSE/POWER RDR queue for execution
Note that to get an ICCF library member you have to use a valid CICS user ID
during FTP login.
The ICCF library file is unique in that you cannot issue the change directory ( CD)
command to the ICCF library itself, or to any of its libraries, such as 10, because
the file system simulated by TCP/IP for VSE/ESA does not map it to FTP that
way.
The file was translated from EBCDIC to ASCII during the transfer. If the file to be
transferred contains binary or packed decimal fields, those fields will be
destroyed during the transfer. Of course, the file could be transferred using binary
(no translation), but then the file would be unreadable on the workstation.
For this file transfer to work correctly, all of the records in the VSAM file with
duplicate keys must be deleted, or the file deleted and redefined. Once we
deleted and redefined the VSAM KSDS, the transfer completed successfully:
Z1 0085 0022: FTP936I FTP Daemon Storing File, Count: 91 Userid: TCPA
Z1 0085 File: KSDSTCP.FILE
The results at the PC end looked exactly the same for the failed and for the
successful transfer.
ftp> append
Local file c:\junk\esdstcp.esd
Remote file esdstcp.file
200 Command okay.
150-File: ESDSTCP.FILE
Type: Ascii Recfm: FB Lrecl: 80 Blksize: 80
CC=ON UNIX=ON RECLF=OFF TRCC=OFF CRLF=ON
Translate with US_ENG_03
150 File status okay; about to open data connection
226-Bytes sent: 7,462
Records sent: 91
Transfer Seconds: 1.58 ( 7K/Sec)
File I/O Seconds: .29 ( 0K/Sec)
226 Closing data connection.
ftp: 7462 bytes sent in 2.09Seconds 3.57Kbytes/sec.
ftp>
The APPEND command requires the user to enter the name of the Local file, which
is the file on the workstation, and the name of the Remote file, which is the file on
the VSE system. The result was twice as many records in the file as were there
originally.
Z1 0085 00BA: FTP936I FTP Daemon Storing File, Count: 91 Userid: TCPA
Z1 0085 File: ESDSTCP.FILE
Figure 97. VSE console after successful ESDS file transfer using APPEND
We then deleted and redefined the ESDS, this time including the REUSE
attribute, and the file transfer completed successfully:
ftp> cd vsespuc
250 Requested file action okay, completed.
dir
.
.
-rw-rw-rw- 1 vse direct 7280 AUG 99 12:50 VSAM.ESDS.FTP.FILE1
-rw-rw-rw- 1 vse direct 0 AUG 99 12:50 VSAM.ESDS.PRINT.FILE1
-rw-rw-rw- 1 vse direct 12:00 JAN 17 17:07 VSAM.KSDS.FTP.FILE1
-rw-rw-rw- 1 vse direct 0 DEC 00 16:45 VSAM.KSDS.PRINT.FILE1
-rw-rw-rw- 1 vse direct 12:00 JAN 17 17:07 VSAM.SAM.FTP.FILE1
-rw-rw-rw- 1 vse direct 12:00 JAN 17 17:07 VSE.CONTROL.FILE
-rw-rw-rw- 1 vse direct 12:00 JAN 17 17:07 VSE.MESSAGE.ROUTING.FILE
-rw-rw-rw- 1 vse direct 825978 OCT 00 11:11 VSE.ONLINE.PROB.DET.FILE
-rw-rw-rw- 1 vse direct 12:00 JAN 17 17:07 VSE.PRIMARY.LIBRARY
-rw-rw-rw- 1 vse direct 12:00 JAN 17 17:07 VSE.TEXT.REPSTORY.FILE
-rw-rw-rw- 1 vse direct 12:00 JAN 17 17:07 VSESP.USER.CATALOG
226 Closing data connection.
ftp: 1876 bytes received in 5.05Seconds 0.37Kbytes/sec.
ftp> get vse.control.file c:\junk\control.vsm
200 Command okay.
150-File: VSESPUC/VSE.CONTROL.FILE
Type: ASCII Recfm: FB Lrecl: 80 Blksize: 80
CC=ON UNIX=ON RECLF=OFF TRCC=OFF CRLF=ON
Translate with US_ENG_03
150 File status okay; about to open data connection
226-Bytes sent: 30,237
Records sent: 206
Transfer Seconds: 1.99 ( 29K/Sec)
File I/O Seconds: 1.04 ( 29K/Sec)
226 Closing data connection.
ftp: 30237 bytes received in 2.58Seconds 11.72Kbytes/sec.
ftp>
This example shows a sample FTP session with a file defined with
TYPE=VSAMCAT. First we do a CD to VSESPUC. Then we list the entries in this
VSAM catalog by issuing the DIR command. All files defined in the VSAM catalog
are listed. Next we do a GET of the file VSE.CONTROL.FILE. Because this
particular VSAM file contains packed decimal and binary fields, some of the data
was lost due to translation from EBCDIC to ASCII.
Note
Do not forget that most graphical clients require the VSE FTP daemon to be in
UNIX mode to display the file system entries correctly.
Here is just one example of using a graphical client for FTP. We started the client
at the top of the VSE file system, so the public names of all of the files defined in
the file system are displayed; see Figure 100:
We then double-clicked the TCPIP entry on the right side (which is a VSE library)
to get a list of subdirectories:
Figure 101. Graphical client listing of sublibraries in the VSE library TCPIP
Clicking LPRCFG01.L allowed us to drag and drop the entry onto the workstation
hard drive, in the C:\JUNK directory, as shown in Figure 103:
Figure 103. Following FTP of member from VSE library using graphical client
There is a series of FTP commands that you can use with the VSE FTP clients.
The commands and their description can be found in TCP/IP for VSE User’s
Guide, Release 1.4. A summary of the commands is available from the VSE CICS
FTP client by entering HELP:
Using the VSE FTP clients, you can access any other TCP/IP system in the
network that runs an FTP daemon.
On the local VSE system, the FTP clients can access data in any of the VSE file
system entries.
In some of the following examples, we are using the FTP clients on our VSE
system (VSE240) to access our second VSE system (VSE231) where an FTP
daemon is running.
Note
The VSE clients support file transfer with all types of remote hosts. However,
the remote host must be running an FTP daemon. Most Windows-based PCs,
for example, will not have an FTP daemon running, unless you have added
one, since there is no FTP daemon supplied with Windows. We installed
SmartFTP-D on a Windows 98 system to demonstrate using the VSE FTP
clients with a Windows workstation.
Figure 107. Logging on to a remote host using the VSE FTP client
Note that the VSE FTP client prefaces all nonprompting messages from the
foreign system with the tag F:. This contrasts with messages from the local host,
which are prefaced with the tag L:.
One other important point about the screen when using the CICS client is the
More... indicator at the bottom of the screen. This indicates that there are more
messages to be displayed and that you need to press Enter or Clear to see them.
It is displayed highlighted even though it was not entered by the user. When no
more messages are waiting to be displayed, the CICS client will prompt you for
the next command.
Figure 108. Transfer a file from a workstation using the CICS FTP client
Figure 109. Transfer a file to a remote workstation using the CICS FTP client
Figure 110. Get VSE library member from a remote VSE system to a local VSE
We used the CD and LCD commands first to position ourselves correctly in each
system’s file system before issuing the GET, but we could have included the
positioning information in the GET command.
Figure 111. Transfer a local VSE library member to a remote VSE system
Figure 112. Get a remote POWER LST queue entry into a local POWER LST queue
3.7.1.6 Put a local POWER queue entry into a remote VSE system
As in the previous example, for transferring entries between POWER list queues
we had to set the logical record length on both VSE systems to 133 with the SITE
LRECL 133 and LSITE LRECL 133 commands.
To transfer the DTRPTF03 entry from the LST queue on VSE240 to the LST
queue on VSE231, we issued the PUT command, fully qualifying the reference to
each file. The result was file PTFLST in the VSE/POWER LST queue on
VSEE231 in class N.
Figure 113. Put a POWER LST queue entry into a remote VSE POWER LST queue
Both programs perform the same FTP functions, but in very different ways, and
with different effects on the VSE system.
With the internal batch client (FTP), all of the processing is performed in the
TCP/IP for VSE/ESA partition. That is, the file open, reading or writing of the file,
transmission of the file, and the file close are all done in that partition, even if
Autonomous FTP is used (see 3.7.2.1, “Autonomous FTP” on page 120).
Because FTP can consume a large amount of CPU cycles and may perform many
I/O operations, this can have a negative effect on the performance of other
partitions running with a lower VSE priority, such as CICS.
With the external batch client (FTPBATCH), the file open, reading or writing of the
file, and the file close are performed in the batch partition, not the TCP/IP
partition. Only the transmission of the file is done in the TCP/IP partition. This
allows most of the CPU and I/O overhead to be moved to a lower priority partition.
Other benefits include:
• Exploitation of the VSE/ESA Turbo Dispatcher with multiple processors,
because VSE can dispatch the two partitions on different processors.
• Reduced LTA waiting by the TCP/IP partition during open/close, because the
files are opened and closed in the FTPBATCH partition.
• FTP for tape files, without concern for tape open/close processing affecting
the TCP/IP for VSE/ESA partition.
• Better job accounting because the CPU cycles and I/O of the FTP daemon will
also occur in the FTPBATCH partition.
Despite the significant benefits of using FTPBATCH, you may want to use FTP
some or all of the time, as the total CPU consumption will be less with FTP, and
generally file transfers will complete more quickly with FTP. Which client to use is
really a trade-off, resource consumption and control versus performance.
A detailed description of Autonomous FTP can be found in the manual TCP/IP for
VSE User’s Guide, Release 1.4.
* $$ JOB JNM=FTP2,DISP=D,CLASS=0
// JOB FTP2
// LIBDEF *,SEARCH=(TCPIP.FIXES,PRD1.BASE)
// EXEC FTP,PARM='IP=PC2,PORT=21'
tcpa
twinkie
TCPA
TWINKIE
ftp command 1
ftp command 1
etc...
/*
/&
* $$ EOJ
The IP= parameter specifies the IP address of the remote server; it can be either
a real IP address or a specified NAME. PORT defaults to 21 and ID defaults to 00
if not specified. There are additional parameters that can be specified, primarily
to control the number of connection attempts, wait time, and debugging options;
see TCP/IP for VSE User’s Guide, Release 1.4 for more information.
The FTP commands are placed directly in the stream. The first four interactions
(that is, the first four commands) will probably be two pairs of user IDs and
passwords, the first for the remote daemon and the second for the local (VSE)
daemon.
Your last interaction with the FTP client can be the QUIT (or BYE) command,
although the "/*" serves the same purpose.
Another way to identify the remote host and user IDs and passwords is using the
OPEN, USER, and PASS commands:
Figure 115. A typical FTP batch job with USER and PASS commands
You can establish FTP sessions with multiple remote hosts in one job stream. The
following is a sample batch job stream, which will perform a file transfer from a
PC to a VSE library on VSE240, and from the VSE library to the VSE/POWER
PUN queue on the VSE231 system.
* $$ JOB JNM=FTP3,DISP=D,CLASS=0
// JOB FTP3
// LIBDEF *,SEARCH=(TCPIP.FIXES,PRD1.BASE)
// EXEC FTP
OPEN PC2
USER tcpa
PASS twinkie
LOPEN
LUSER TCPA
LPASS TWINKIE
CD junk
GET jclprocs.jcl TCPIP.XFER.JCLPROCS.JCL
CLOSE
OPEN VSE231
USER ABCD
PASS ABCD
EBCDIC
PUT TCPIP.XFER.JCLPROCS.JCL POWER.PUN.M.JCLPROCS
/*
/&
* $$ EOJ
Figure 116. An FTP batch job transferring files among multiple systems
The list output from this job is shown in Figure 117 on page 124.
Figure 117. List output of our FTP client batch job FTP3 (part 1 of 2)
Figure 118. List output of our FTP client batch job FTP3 (part 2 of 2)
* $$ JOB JNM=FTP4,DISP=D,CLASS=0
// JOB FTP4
// DLBL SAMFILE,'VSAM.SAM.FTP.FILE1',99/365,VSAM,CAT=VSESPUC, X
RECORDS=(100,100),RECSIZE=80
// EXEC FTPBATCH
LOPEN
LUSER TCPA
LPASS TWINKIE
OPEN PC2
USER tcpa
PASS twinkie
CD \junk
DEL TESTSEQ
PUT %SAMFILE,SAM,FB,80,2000 TESTSEQ
/*
/&
* $$ EOJ
The following job illustrates using FTPBATCH to transfer a workstation file into a
dynamically defined VSAM-managed SAM file named LISTFL using Autonomous
FTP:
* $$ JOB JNM=FTP5,DISP=D,CLASS=0
// JOB FTP5
// DLBL LISTFL,'LIST.FILE',99/365,VSAM,CAT=VSESPUC, X
RECORDS=(1000,100),RECSIZE=133
// EXEC FTPBATCH
LOPEN
LUSER TCPA
LPASS TWINKIE
OPEN PC2
USER tcpa
PASS twinkie
CD \junk
GET cicsiccf.lst %LISTFL,SAM,F,133,133
/*
/&
* $$ EOJ
Figure 120. FTPBATCH job transferring a workstation file to a VSAM-managed SAM file
Transfer of tape files is supported with FTPBATCH. Operands are the same as
those used for transferring a sequential disk (SAM) file, except the type is TAPE.
Here is an example of transferring a workstation file to a tape using Autonomous
FTP:
Figure 121. FTPBATCH job transferring a workstation file to a VSE magnetic tape
* $$ JOB JNM=AUTOFTP1,DISP=D,CLASS=0
// JOB AUTOFTP1
// EXEC LIBR
A S=TCPIP.CONFIG
CATALOG AUTOFTP1.L R=Y
LOPEN
LUSER TCPA
LPASS TWINKIE
OPEN PC2
USER tcpa
PASS twinkie
CD junk
LCD POWER.LST.N
LSITE CC OFF
LSITE TRCC ON
PUT LSERV LSERV.LST
/+
/*
/&
* $$ EOJ
* $$ JOB JNM=LSERV,DISP=D,CLASS=0
* $$ LST CLASS=N,DISP=D,DEST=(*,AUTOFTP1)
// JOB LSERV
// EXEC LSERV
/*
/&
* $$ EOJ
The console output from running this job looks like this:
The simple script used in this example contains all the parameters needed to
establish an FTP session with the remote FTP server and transfer the print file.
However, it is not very usable in the real world, because it has the source and
target file names hardcoded in the script. You probably want to use unique file
names, based on the job name and job number in the VSE/POWER LST queue,
and perhaps other information. TCP/IP for VSE/ESA provides a series of
variables to help you do that, and you can create your own variables in a script.
See TCP/IP for VSE User’s Guide, Release 1.4 for details on creating and using
variables.
The variables are then used in FTP commands to position within the local (VSE)
file system, and to identify the file being transmitted.
The only change needed in the application job stream to use the new script is to
change the DEST= parameter in the * $$ LST statement to
DEST=(*,AUTOFTP2).
The console output for processing the script looks like this:
Figure 126. Console output from Automatic FTP script using variables
If the Automatic FTP fails, you can use the command SET DIAGNOSE=AFTP to obtain
more detailed information to determine why the FTP failed.
The QUERY FTPDS command without the ID= operand displays all defined FTP
daemons with the corresponding status (active or inactive):
87 query ftpds
Z1 0085 IPN434I (( TCP/IP FTP Daemons ))
Z1 0085 IPN435I ID: FTP01 Port: 21 Driver: FTPD
Z1 0085 IPN350I Current Status: Inactive
Z1 0085 IPN435I ID: FTP02 Port: 21 Driver: FTPD
Z1 0085 IPN350I Current Status: Inactive
Z1 0085 IPN435I ID: FTP03 Port: 21 Driver: FTPD
Z1 0085 IPN350I Current Status: Inactive
Z1 0085 IPN435I ID: FTP04 Port: 21 Driver: FTPD
Z1 0085 IPN350I Current Status: Inactive
Z1 0085 IPN435I ID: FTP05 Port: 21 Driver: FTPD
Z1 0085 IPN350I Current Status: Inactive
To query the status of an individual FTP daemon, use the following format of the
QUERY command:
For example:
87 delete ftpd,id=temp2
Z1 0085 005D: FTP908I Daemon Shutdown FTP Id:TEMP2 Port:8099
To delete multiple daemons, you must enter the DELETE command once for each
daemon.
TCP/IP for VSE/ESA includes a Telnet daemon that supports the TN3270
protocol. This allows you to log on to VTAM applications directly from any
TCP/IP-connected TN3270 clients. No line mode Telnet daemon is provided.
TCP/IP for VSE/ESA also provides two VSE Telnet clients, a CICS transaction
and a batch program.
• The CICS transaction supports TN3270 sessions with daemons supporting
that protocol (generally OS/390, VM/ESA, and VSE/ESA systems), and line
mode sessions with other daemons (for example, UNIX and Windows
systems).
• The batch program supports line mode sessions only.
Figure 130 on page 134 shows the Telnet-related statements in our initialization
member IPINIT04.L.
Each DEFINE TELNETD command creates five daemons, so the maximum number of
concurrent TN3270 users is 10; five can be connected directly to DBDCCICS
(CICSICCF), and five are presented the VTAM1 menu when they connect.
The SET TELNETD_BUFFERS command and the SET SECURITY command are included
here to remind you that the number of buffers allocated has an effect on Telnet
performance, and the security option determines whether the user ID and
password must be included on any menu you define.
Figure 131 is an example of the VTAM APPL definitions for our Telnet daemons.
Note that each APPL name matches a generated TERMNAME value in the DEFINE
TELNETD command.
.
TELNA01 APPL AUTH=(ACQ)
TELNA02 APPL AUTH=(ACQ)
TELNA03 APPL AUTH=(ACQ)
TELNA04 APPL AUTH=(ACQ)
TELNA05 APPL AUTH=(ACQ)
TELNB01 APPL AUTH=(ACQ)
TELNB02 APPL AUTH=(ACQ)
TELNB03 APPL AUTH=(ACQ)
TELNB04 APPL AUTH=(ACQ)
TELNB05 APPL AUTH=(ACQ)
.
TCP/IP for VSE/ESA comes with two sample menus, MENU1 and MENU2. While
perhaps a good starting point for creating your own menu, neither comes close to
directly replacing the IBM-supplied VTAM USSTAB. We created a menu, VTAM1,
that comes close.
CHAR=A=LOGON APPL(DBDCCICS)
CHAR=B=LOGON APPL(PRODCICS)
MSGLINE=23
TRIES=3
IMAGE
$TCPUSSTB #TCP/IP Application Selection Menu$
#======> ? $
#PASSWORD:$ +PASSWORD $
/+
/*
/&
* $$ EOJ
The part of the member preceding the IMAGE statement defines the special
characters used to identify high intensity and normal intensity fields, PF key
commands, character-equated commands, and so forth.
TCP/IP for VSE Installation Guide, Release 1.4 contains more detail on creating
a menu.
One limitation on using the TCP/IP for VSE/ESA menu versus a VTAM USSTAB is
that the method of selecting an application by character is limited to a single
character in TCP/IP for VSE/ESA while VTAM supports multiple characters. This
may affect the migration of existing USSTABs.
Connecting from a TN3270 client to TCP/IP for VSE/ESA using a port associated
with a daemon pointing to this menu (for example, ID=TRMB) will result in the
following screen being displayed:
======>
USER ID:
PASSWORD:
This looks very much like the IBM-supplied VTAM USSTAB, except that it
includes fields for entry of a user ID and password. These fields are necessary
only if security has been turned on in TCP/IP for VSE/ESA (we set
SECURITY=ON for this project).
TCP/IP for VSE/ESA provides definitions for the CICS transactions and
programs. These should already be in your CSD, but you should verify that they
are and create them if they are not; see 2.8.5.6, “CICS definitions for TCP/IP for
VSE/ESA” on page 71.
Figure 134 shows the initial window when TN3270 Plus is started:
The Setup pull-down menu offers a Session configuration option, shown in Figure
135 on page 139.
Here you can create a profile for each IP address/port number combination you
wish to access. You can also specify a script file to automate logging on.
Figure 136 on page 140 shows the session selection menu from TN3270 Plus
with the VSE240 session already selected.
Selecting VSE240, which is configured to use the default Telnet port 23, causes
one of the TELNBxx Telnet daemons to be driven, and because they specify
VTAM1 as the menu, it appears as shown in Figure 133 on page 137.
If, however, you selected session VSE240-CICSICCF, which has the same IP
address but uses port 5023, the normal VSE/ESA logo would appear as shown
Figure 137, because a different daemon (TELNAxx), which does not use a menu
but instead connects directly to VTAM APPL DBDCCICS, would be used:
VV VV SSSSS EEEEEEE ++
VV VV SSSSSSS EEEEEEE ++
VV VV SS EE ++ EEEEEEE SSSSS AA
VV VV SSSSSS EEEEEE ++ EEEEEEE SSSSSSS AAAA
VV VV SSSSSS EEEEEE ++ EE SS AA AA
VV VV SS EE ++ EEEEEE SSSSSS AA AA
VVVV SSSSSSS EEEEEEE ++ EEEEEE SSSSSS AA AA
VV SSSSS EEEEEEE ++ EE SS AAAAAAAA
++ EEEEEEE SSSSSSS AA AA
++ EEEEEEE SSSSS AA AA
Remember that you can use a symbolic name anywhere you would normally
enter an IP address if you have defined it in the IPINIT member using the DEFINE
NAME command. This frequently makes it much easier to initiate clients because
you do not have to remember the IP address.
Using the VSE Telnet client CICS transaction is described in TCP/IP for VSE
User’s Guide, Release 1.4.
The CICS Telnet client supports both 3270 and line mode operation. If you do not
specify line mode when you invoke the client, it will first attempt to connect in
3270 mode, and if the daemon on the remote host rejects that, it will try line
mode.
Note
Many remote hosts, such as UNIX and OS/2, are sensitive to text case, so you
should ensure the CICS terminal is set to mixed case before invoking the
Telnet client. If you use the Interactive Interface and escape to CICS using
PF6, the terminal will be set for uppercase, and if the remote host expects a
lowercase password, logon will fail. But escaping with PF9 will set the terminal
to mixed case, and the logon will succeed.
TELNET VMESA
TEL200I Telnet client -- Startup --
TEL220I Copyright (c) 1995-1999 Connectivity Systems Incorporated
TEL211I Connecting to port: 000023 at IP: 192.168.155.125 Id:00
TEL209I Attempting to establish connection
TEL219I The PA3 Key functions as a close or escape
TEL212I Connection has been established
Once the connection was made through TCP/IP, we received the VM/ESA logo:
COMMAND ===>
RUNNING SYS1
Using the CICS client, you can connect in 3270 mode to any VSE/ESA, VM/ESA,
and OS/390 (MVS) systems running TCP/IP.
To access our remote OS/2 system (P500OS2), we started the CICS transaction
TELNET in a CICS screen on our local VSE system and specified the symbolic
name of the remote OS/2 system as a parameter. We logged on to OS/2,
changed the directory to SPOOL\HP4000, displayed the directory, renamed a
member, and issued the DIR command to verify the rename worked.
Commands that can be used on the remote host depend on which ones the
Telnet daemon on that host supports, but they would generally include making,
deleting, and changing directories, deleting, renaming, and copying files,
executing files, and so forth. You can even initiate FTP through the Telnet
connection, but be careful; when initiated that way, the remote host you have
"Telneted" to is the FTP client, and whatever host was specified in the FTP
command is the FTP server (this can get really confusing).
The PA3 key can be used to terminate the line mode Telnet client at any time.
Some daemons may also support the EXIT command.
The complete interaction is shown in Figure 140 on page 143. All of our
commands are highlighted. We terminated the session using the PA3 key.
[<isip390>-C:\]
cd spool\hp4000
c
d spool\hp4000
[<isip390>-C:\spool\hp4000]
dir
d
ir
[<isip390>-C:\spool\hp4000]
rename 00002.spl xxxxx.abc
r
ename 00002.spl xxxxx.abc
[<isip390>-C:\spool\hp4000]
dir
d
ir
[<isip390>-C:\spool\hp4000]
The command syntax for executing the Telnet batch client is:
// EXEC TELNET,PARM=’IP=ip_addr,PORT=port,ID=nn’
The commands to log on to the remote host and access and process files and
directories are the same as for the CICS client.
Here is an example of a batch job to connect to OS/2 and perform the same
actions as in the CICS Telnet example earlier:
* $$ JOB JNM=BATCHTLN,DISP=D,CLASS=0
// JOB BATCHTLN BATCH TELNET CLIENT JOB
// EXEC TELNET,PARM='IP=P500OS2,PORT=23,ID=00'
abcd
cd spool\hp4000
dir
rename 00002.spl xxxxx.abc
dir
/*
/&
* $$ EOJ
[<isip390>-C:\]
cd spool\hp4000
c
d spool\hp4000
[<isip390>-C:\spool\hp4000]
dir
d
ir
[<isip390>-C:\spool\hp4000]
rename 00002.spl xxxxx.abc
r
ename 00002.spl xxxxx.abc
[<isip390>-C:\spool\hp4000]
dir
d
ir
[<isip390>-C:\spool\hp4000]
TEL102I TCP/IP -- Telnet Batch Client -- Complete
TEL118I Terminating connection
TEL120I Connection has closed, successfully
1S55I LAST RETURN CODE WAS 0000
EOJ BATCHTLN MAX.RETURN CODE=0000
87 query telnetds
Z1 0085 IPN469I (( TCP/IP TELNET Daemons ))
Z1 0085 IPN470I ID: TRMB01
Z1 0085 IPN471I Terminal: TELNB01 Target:
Z1 0085 IPN472I Port: 23 Driver: TELNETD
Z1 0085 IPN473I Menu: VTAM1
Z1 0085 IPN549I Logmode2: S3270 Logmode3: D4B32783
Z1 0085 IPN356I Logmode4: D4B32784 Logmode5: D4B32785
Z1 0085 IPN350I Current Status: Inactive
Z1 0085 IPN470I ID: TRMB02
Z1 0085 IPN471I Terminal: TELNB02 Target:
Z1 0085 IPN472I Port: 23 Driver: TELNETD
Z1 0085 IPN473I Menu: VTAM1
Z1 0085 IPN549I Logmode2: S3270 Logmode3: D4B32783
Z1 0085 IPN356I Logmode4: D4B32784 Logmode5: D4B32785
Z1 0085 IPN350I Current Status: Inactive
Z1 0085 IPN470I ID: TRMB03
Z1 0085 IPN471I Terminal: TELNB03 Target:
Z1 0085 IPN472I Port: 23 Driver: TELNETD
Z1 0085 IPN473I Menu: VTAM1
Z1 0085 IPN549I Logmode2: S3270 Logmode3: D4B32783
Z1 0085 IPN356I Logmode4: D4B32784 Logmode5: D4B32785
Z1 0085 IPN350I Current Status: Active
Z1 0085 IPN351I Current IPaddr: 192.168.155.118
Z1 0085 IPN352I Current Applid: DBDCCICS
Z1 0085 IPN354I Current Logmod: S3270
Z1 0085 IPN355I Current Userid:
.
.
.
To query the status of an individual Telnet daemon, use the following format of the
QUERY command:
87 query telnetds,id=trmb05
Z1 0085 IPN470I ID: TRMB05
Z1 0085 IPN471I Terminal: TELNB05 Target:
Z1 0085 IPN472I Port: 23 Driver: TELNETD
Z1 0085 IPN473I Menu: VTAM1
Z1 0085 IPN549I Logmode2: S3270 Logmode3: D4B32783
Z1 0085 IPN356I Logmode4: D4B32784 Logmode5: D4B32785
Z1 0085 IPN350I Current Status: Active
Z1 0085 IPN351I Current IPaddr: 192.168.155.120
Z1 0085 IPN352I Current Applid: DBDCCICS
Z1 0085 IPN354I Current Logmod: S3270
Z1 0085 IPN355I Current Userid:
Z1 0087 IPN300I Enter TCP/IP Command
Z1-0087
For example:
87 del tel,id=trma03
Z1 0085 0019: TEL918I Daemon Shutdown Telnet Termname:TELNA03
The TCP/IP Line Printer Daemon (LPD) allows you to utilize VSE host-based
printer resources for any TCP/IP client in your network that supports the line
printer protocol. LPD provides this support by interfacing with the POWER LST
queue, so you can essentially do file transfers directly into the print queues and
let POWER take it from there. LPD supports some other capabilities as well, for
example, the ability to print directly to VSE disk-based files such as a sublibrary
member or a VSAM file.
The TCP/IP clients use the Line Printer Requester (LPR) application to send print
data to the LPD running on VSE. On workstations, the LPR client can easily be
started via a window or full screen command-line interface.
TCP/IP for VSE/ESA also provides a Line Printer Requester (LPR) client on VSE.
Using the LPR client, you can send print data from your VSE system to any other
TCP/IP host that runs an LPD.
During TCP/IP for VSE startup, each DEFINE LPD command in the TCP/IP
initialization file IPINITxx starts a Line Printer Daemon (server). A single Line
Printer Daemon can handle any number of simultaneous requests.
The syntax of the DEFINE LPD statements can be found in TCP/IP for VSE
Commands, Release 1.4.
Figure 147 on page 150 shows the part of our TCP/IP initialization file IPINIT04.L
where we defined five different Line Printer Daemons.
PRINTER= This parameter sets the unique name of the LPD printer. The
LPR clients have to specify this name as the printer when they
want to send data to this LPD.
QUEUE= This parameter specifies the destination for the print data. You
can specify POWER queues, VSE libraries, or VSAM KSDS or
ESDS files if they are defined in the TCP/IP file system as
public file names.
Defining these public file names to TCP/IP is done with the DEFINE FILE command
(see 3.1.3, “Defining the VSE file system” on page 85).
LIB= ,SUBLIB= You can specify a VSE sublibrary where the print data is
temporarily stored until completely transferred to its
destination. If no LIB/SUBLIB is specified, the print data will be
temporarily stored in the TCP/IP partition’s GETVIS storage
instead. This increases the print performance but puts a
limitation on large print files.
DEFINE LPD,PRINTER=FAST,QUEUE='POWER.LST.A'
DEFINE LPD,PRINTER=LOCAL,QUEUE='POWER.LST.A',LIB=TCPIP,SUBLIB=TEMP
With these commands, we defined two LPD printers, FAST and LOCAL, that put
the data into the POWER list queue in class A. POWER is defined as a public
name in the TCP/IP file system (see 3.1.3, “Defining the VSE file system” on page
85).
When a client LPR prints to this daemon, it may pass a file name. If this file name
meets the syntactic requirements of a POWER queue entry, the file name will be
used. Otherwise, the queue entry name will be generically built as LPDFAnnn,
where nnn is the three-digit number transmitted by the LPR client.
We used this LPD to send data from an LPR client into the VSE sublibrary
TCPIP.PRINT. When a client LPR establishes a link to this daemon, it may pass a
file name. If this job name meets the syntactic requirements of a member name, it
will be stored using this name. Otherwise, the member will have the generic
name LPDFA nnn, where nnn is the three-digit number transmitted by the LPR
client. The member type will be derived from the transmitted origin name. If no
origin name is available, or if it is unsuitable for use as a member type, the
member type will be LISTING. If a duplicate member already exists, it will be
overwritten.
DEFINE LPD,PRINTER=KSDS,QUEUE='KSDSTCP.PRINT',LIB=TCPIP,SUBLIB=TEMP
DEFINE LPD,PRINTER=ESDS,QUEUE='ESDSTCP.PRINT',LIB=TCPIP,SUBLIB=TEMP
These two Line Printer Daemons can be used to write data to VSAM files from an
LPR client. Writing to an ESDS file appends the records sent by the LPR client to
the end of the data set whereas writing to a KSDS file performs a VSAM INSERT
operation of the records.
OS/2, Windows NT and UNIX platforms provide an LPR client as part of the
standard TCP/IP support. The LPR client allows you to enter LPR commands via
the command-line interface on these platforms. For some platforms such as
Windows 95 and Windows 98 you have to acquire LPR client software separately.
The two LPR command parameters that are required by the VSE LPD are the
printer name and the server (or host) name. Additionally, you could specify other
options such as a job name or the job disposition. The printer names for the VSE
LPDs must have been defined to TCP/IP for VSE/ESA with the DEFINE LPD
command.
To check for the printers that are defined on the VSE system, you can use the
TCP/IP for VSE/ESA command QUERY LPDS on the VSE console (see Figure 148).
Here we will show you an example of how to send a file from our OS/2
workstation to an LPD (printer) on our VSE system. We used the printer FAST,
which is defined to transfer the data sent from the LPR client into the POWER list
queue with class A. The IP address of our VSE system is 192.168.155.108.
To print the workstation file CONFIG.SYS from drive C:, we issue the following
LPR command from an OS/2 command line window:
Now, we checked the contents of the POWER list queue using the VSE
Interactive Interface.
The following four methods can be used to invoke the LPR client on the VSE
system:
• Interactively, through the CICS transaction LPR
• Automatically, through the automatic LPR client (AUTOLPR)
• Via a batch job, through the LPR batch client
• From an application program, using the REXX, Assembler, COBOL, or PL/I
Sockets Interface
We describe the first three methods in this chapter. Refer to TCP/IP for VSE
Programmer’s Reference, Release 1.4 for guidance on using Sockets to invoke
the LPR client.
All LPR commands for the VSE LPR Client are described in TCP/IP for VSE
Commands, Release 1.4.
Note
Before you can start the LPR as a CICS transaction, CICS must have been
customized accordingly. We described the required setup in 2.8.5.6, “CICS
definitions for TCP/IP for VSE/ESA” on page 71.
We used the VSE LPR client to print a POWER list queue entry on:
• Our second VSE system
• Our network printer
As a first step, we started the LPD server on the target system, that is, we started
TCP/IP for VSE/ESA on our second VSE system P330VSE (IP address
192.168.155.112) where we had defined an LPD with PRINTER=FAST. The LPD
on our network printer is built into the HP JetDirect card and automatically starts
when the printer is powered on.
LPR
TCP200I Client -- Startup --
TCP207I Copyright (c) 1995-1999 Connectivity Systems Incorporated
TCP202I Attempting to Establish Connection
TCP204I Connection has been Established
Client manager connection Established.
LPR Ready:
Now, we set the target host system to P330VSE (our second VSE system at IP
address 192.168.155.112) and the printer we want to use, which is FAST with the
following commands:
LPR Ready:
SET HOST=P330VSE
192.168.155.112
LPR Ready:
SET PRINTER=FAST
Note that TCP/IP resolves the name to the IP address specified with the DEFINE
NAME commands in our configuration and the LPR client displays the IP address.
We want to print the list output from the last run of the TCP/IP for VSE/ESA
(POWER list queue entry TCPSZ1). We use CD commands to navigate to the VSE
POWER LST queue class A entries (POWER.LST.A) and use the PRINT command
to actually send this entry to the target LPD. The Print Working Directory (PWD)
command is used to verify that we are positioned in the correct directory. The DIR
command displays the contents of the POWER.LST.A directory. This is how our
CICS screen looked:
As we found the queue entry TCPSZ1, which is highlighted above, we now print
this entry via the FAST printer of the second VSE system by using the PRINT
command.
PRINT TCPSZ1.00696.00
Opening the file
Establishing connection with LP Daemon
Remote port: 515 Local Port: 721
Request the queue for output
Checking LP daemon
Transferring the data file
Data file transfered.
Transferring the control file
Control file transfered.
Closing the connection with LP Daemon
Connection complete
Note that the command PRINT TCPSZ1 would be valid also, that is, the spool ID of
the POWER queue entry can be omitted. If multiple files exist with the same file
name, TCP/IP will print the queue entry with the lowest spool ID.
The transfer has been successfully completed. Using the same session, we now
also want to print the TCP/IP for VSE/ESA initialization file IPINIT04.L in
sublibrary TCPIP.CONFIG to the same printer.
The PWD command is used again to verify that we are positioned to the root
directory ("") before we issue the CD command to position to a new directory.
Because the member being printed does not have standard carriage control
characters, we first turned off the CC option. To check all the options in effect, we
used the QUERY OPT command with the following result:
SET CC=NO
LPR Ready:
QUERY OPT
HOST :192.168.155.112
PRINTER :FAST
FCB :
INSERTS :
CC :NO
CRLF :YES
NOEJECT :NO
DELREQ :YES
DISP :KEEP
USER :TCPIP
PASSWORD :
CLASS :
COPIES :01
JOBNAME :
MAIL :
TITLE :
TRANSLATE :US_ENG_03
LPR Ready:
More...
PRINT IPINIT04.L
Opening the file
Establishing connection with LP Daemon
Remote port: 515 Local Port: 721
Request the queue for output
Checking LP daemon
Transferring the data file
Data file transfered.
Transferring the control file
Control file transfered.
Closing the connection with LP Daemon
Connection complete
LPR Ready:
SET HOST=HP4000
192.168.155.103
LPR Ready:
SET PRINTER=TEXT
LPR Ready:
PRINT IPINIT04.L
Opening the file
Establishing connection with LP Daemon
Remote port: 515 Local Port: 721
Request the queue for output
Checking LP daemon
Transferring the data file
Data file transfered.
Transferring the control file
Control file transfered.
Closing the connection with LP Daemon
Connection complete
LPR Ready:
5.3.1.1 SHORT and LONG commands from the VSE LPR client
The LPR client on VSE also supports query commands. To obtain printer queue
information, such as how many jobs are sent to a printer, job name, current job
printing status and so on from LPD servers, you can use the VSE LPR commands
LONG or SHORT. These commands display this information for LPDs that manage
To show the difference between the two commands, we first issued the LONG
command in our CICS LPR client session to an LPD running on one of our PCs.
SET HOST=PC2
204.155.155.121
LPR Ready:
SET PRINTER=PRINTQ01
LPR Ready:
LONG
Establishing connection with LP Daemon
Remote port: 515 Local Port: 721
Requesting the queue information
Receiving LP daemon response
Queue 'PRINTQ01' is Enabled, Processing, Holding
Queue type: Text, printer Default PostScript Printer,winspool,LPT1:
Queue status: Printer 'Default PostScript Printer' is defined
Seq # UserID Files Size Date/Time
11 AUTOLPR GPSPRT01.PRINT 28 12/21/99 12:48:22 PM
14 VSEUSER IPINIT04.L 9109 12/23/99 06:59:31 PM
Closing the connection with LP Daemon
Connection complete - Already closed
LPR Ready:
Because the HOST is set to PC2 (the name of our PC workstation) and the
PRINTER to PRINTQ01 (our workstation LPD printer queue), the LONG command
displayed the PRINTQ01 printer queue on our workstation where the IPINIT04.L
and other files were queued to be printed.
When using the SHORT command, we received the following data on our CICS
screen:
LPR Ready:
SHORT
Establishing connection with LP Daemon
Remote port: 515 Local Port: 721
Requesting the queue information
Receiving LP daemon response
Seq # UserID Files Size
11 AUTOLPR GPSPRT01.PRINT 28
14 VSEUSER IPINIT04.L 9109
Closing the connection with LP Daemon
Connection complete - Already closed
LPR Ready:
Figure 160. Report of the SHORT command from the LPR client
After successfully printing on our network printer, we finally terminated the CICS
LPR transaction with the QUIT command. This is shown in Figure 161:
On our VSE system, we defined such an event in the TCP/IP for VSE/ESA
initialization file. Figure 162 shows the part of our file IPINIT04.L where we
defined the event LST_LISTEN:
. . .
*------------------------------------------*
* *
* Automated Line Printer Client *
* *
*------------------------------------------*
DEFINE EVENT,ID=LST_LISTEN,TYPE=POWER,CLASS=M,QUEUE=LST,ACTION=LPR
*------------------------------------------*
* *
* Define LPR Scripts *
* *
*------------------------------------------*
DEFINE NAME,NAME=LPRSCR01,SCRIPT=LPRSCR01
. . .
Figure 162. DEFINE EVENT and SCRIPT commands in initialization file IPINIT04.L
This DEFINE EVENT causes TCP/IP for VSE/ESA to monitor class M of the
POWER LST queue and to start the LPR client automatically with queue entries
that are put into this class.
On our VSE console, we first entered MSG Z1 (TCP/IP for VSE/ESA is running in
partition Z1) followed by the QUERY EVENTS. The following figure shows how our
VSE console looked:
msg z1
AR 0015 1I40I READY
Z1-0087 IPN300I Enter TCP/IP Command
87 query events
Z1 0085 IPN425I (( TCP/IP Events ))
Z1 0085 IPN587I Event Pause Interval: 9000 (30 Seconds)
Z1 0085 IPN426I Event ID: LST_LISTEN
Z1 0085 IPN427I Type: POWER Driver:
Z1 0085 IPN428I Class: M Queue: LST Action: LPR
Z1 0085 IPN429I Host field: USER User ID: SYSTCPIP Single: N
Z1 0085 IPN430I Action: LPR Retries: 1 Time: 13500
Z1-0087 IPN300I Enter TCP/IP Command
* $$ LST CLASS=class,DISP=D,UINF=name,DEST=(*,printer)
class Identifies the POWER LST queue that TCP/IP for VSE/ESA is
monitoring. This queue is specified to TCP/IP for VSE/ESA by way of
the DEFINE EVENT command.
name This field specifies one of three possible values:
1. The IP address of the host owning the printer. For example,
"UINF=192.168.155.103".
2. Symbolic host name of the IP address, as set with the TCP/IP for
VSE/ESA DEFINE NAME command as defined in our configuration in
Figure 37 on page 59. For example, UINF=HP4000.
3. Name of a script that contains LPR commands, as set with the
TCP/IP for VSE/ESA DEFINE NAME command shown in Figure 162 on
page 160. For example, UINF=LPRSCR01. A script example is
described in 5.4.3, “Using scripts for the automatic LPR client” on
page 162. You can learn more about using scripts in TCP/IP for
VSE User’s Guide, Release 1.4.
Note: The POWER UINF parameter was first available with VSE/ESA
2.3; this is the recommended usage. It is also possible to use the
Because we had already defined the required EVENT and NAME in our TCP/IP
for VSE/ESA initialization file (see Figure 162 on page 160), we only have to add
the appropriate POWER LST statement in a VSE job in order to have the job output
automatically printed via the LPR client on the printer of the target system.
Figure 165 shows which POWER LST statement we used to print the VSE job output
on our network printer.
* $$ JOB JNM=AUTOLPR,CLASS=0,DISP=D
* $$ LST CLASS=M,DISP=K,DEST=(*,TEXT),UINF=HP4000
// JOB AUTOLPR TCPIP AUTOMATIC LPR EXAMPLE
// EXEC LIBR
ACC S=TCPIP.CONFIG
L IPINIT04.L
/*
/&
* $$ EOJ
After submitting the job, its output was directly sent to our network printer. Figure
166 shows the VSE console output from the TCP/IP partition that processes the
LPR event.
Figure 166. VSE console output for the automatic LPR event
To use a script with the automatic LPR client, we did the following:
1. We prepared a script by coding LPR commands and cataloging them in a
member LPRSCR01.L in a sublibrary of the TCP/IP partition search chain.
2. We defined the LPR script with the symbolic name LPRSCR01 in our TCP/IP
configuration file (see Figure 162 on page 160).
3. We specified this symbolic name LPRSCR01 in the UINF parameter of the *
$$ LST statement for our VSE job.
The job stream to catalog our LPR script sublibrary member LPRSCR01.L,
referenced by LPRSCR01 in the DEFINE NAME statement is shown in the following
figure:
* $$ JOB JNM=LPRSCRPT,CLASS=0,DISP=D
// JOB LPRSCRPT CATALOG LPR SCRIPT FILE
// EXEC LIBR
ACC S=TCPIP.CONFIG
CATALOG LPRSCR01.L REPLACE=YES
SET HOST = HP4000
SET PRINTER = TEXT
SET CC = YES
SET INSERTS = HP4LAND
/+
/*
/&
* $$ EOJ
To use this script in connection with the automatic LPR client, we only had to
specify the symbolic name LPRSCR01 in the UINF= parameter of the * $$ LST
statement in our test job as shown in Figure 168:
* $$ JOB JNM=AUTOLPR,CLASS=0,DISP=D
* $$ LST CLASS=M,DISP=K,UINF=LPRSCR01
// JOB AUTOLPR TCPIP AUTOMATIC LPR WITH SCRIPT EXAMPLE
// EXEC LIBR
ACC S=TCPIP.CONFIG
L IPINIT04.L
/*
/&
* $$ EOJ
Figure 168. Job using the automatic LPR client with a script file
The LPR support in TCP/IP for VSE/ESA has a facility that permits you to include
control data that is automatically merged with the print stream. Control data may
precede the report, precede each page of the report, and follow the last page of
the report. To accomplish this, you generate INSERTS phases containing printer
control codes used by the network printers to which your VSE LPR clients will be
sending print requests.
We coded the following job stream to assemble and link the INSERTS phase
HP4LAND. As coded, this phase will cause our HP printers to shift into landscape
mode and print semibold typeface at 13 characters per inch and 8 lines per inch.
After the last page has been printed, the printer is reset to default status.
* $$ JOB JNM=INSERTS,CLASS=0
* $$ LST CLASS=Q,DISP=D
// JOB INSERTS
// LIBDEF *,SEARCH=PRD1.BASE
// LIBDEF PHASE,CATALOG=TCPIP.CONFIG
// OPTION CATAL
// EXEC ASMA90,PARM='EXIT(LIBEXIT(EDECKXIT)),SIZE(MAX-200K,ABOVE)'
* PAGE ORIENTATION (LANDSCAPE)
* 1B266C314F
* LINE SPACING (8 LINES/INCH)
* 1B266C3844
* CHARACTER PITCH (13), SEMI-BOLD TYPEFACE
* 1B28733133483142
HP4LAND INSERTS DEFINE, *
HEADER=1B451B266C314F1B266C38441B28733133483142, *
TRAILER=1B45
END
/*
// EXEC LNKEDT,SIZE=256K
/*
/&
* $$ EOJ
Figure 171 and Figure 172 on page 165 show two more examples of INSERTS
phases we used in our LPR test environment. The INSERTS phase GPS1LEGL
* $$ JOB JNM=GPS1LEGL,CLASS=0
* $$ LST CLASS=Q,DISP=D
// JOB GPS1LEGL
// LIBDEF *,SEARCH=PRD1.BASE
// LIBDEF PHASE,CATALOG=TCPIP.CONFIG
// OPTION CATAL
// EXEC ASMA90,PARM='EXIT(LIBEXIT(EDECKXIT)),SIZE(MAX-200K,ABOVE)'
* PAGE SIZE (LEGAL)
* 1B266C3341
* PAPER SOURCE (LOWER TRAY)
* 1B266C3448
* LINE SPACING (8 LINES/INCH)
* 1B266C3844
GPS1LEGL INSERTS DEFINE, *
HEADER=1B451B266C33411B266C34481B266C3844, *
TRAILER=1B45
END
/*
// EXEC LNKEDT,SIZE=256K
/*
/&
* $$ EOJ
The second INSERTS phase GPS1LETR in Figure 172 will print on letter size
paper, pulled from the upper tray of the printer at 6 lines per inch.
* $$ JOB JNM=GPS1LETR,CLASS=0
* $$ LST CLASS=Q,DISP=D
// JOB GPS1LETR
// LIBDEF *,SEARCH=PRD1.BASE
// LIBDEF PHASE,CATALOG=TCPIP.CONFIG
// OPTION CATAL
// EXEC ASMA90,PARM='EXIT(LIBEXIT(EDECKXIT)),SIZE(MAX-200K,ABOVE)'
* PAGE SIZE (LETTER)
* 1B266C3241
* PAPER SOURCE (UPPER TRAY)
* 1B266C3148
* LINE SPACING (6 LINES/INCH)
* 1B266C3644
GPS1LETR INSERTS DEFINE, *
HEADER=1B451B266C32411B266C31481B266C3644, *
TRAILER=1B45
END
/*
// EXEC LNKEDT,SIZE=256K
/*
/&
* $$ EOJ
Figure 167 on page 163 shows our script file with the SET INSERTS command to
invoke our HP4LAND INSERTS phase.
We used the following batch job to print the member TCPAPPL.B in sublibrary
PRD2.CONFIG on our network printer HP4500 with IP address 192.168.155.105,
using the printer queue TEXT. For HP printers you can choose between the two
queues TEXT or RAW, where the TEXT queue can be used for unformatted text.
For details of the differences, refer to the description of the SET PRINTER command
in TCP/IP for VSE User’s Guide, Release 1.4.
* $$ JOB JNM=LPRBATCH,CLASS=0,DISP=D
* $$ LST CLASS=Q
// JOB LPRBATCH TCPIP BATCH LPR EXAMPLE
// LIBDEF *,SEARCH=PRD1.BASE
// EXEC CLIENT,PARM='ID=00,APPL=LPR'
SET HOST=HP4500
SET PRINTER=TEXT
SET CC=NO
PRINT PRD2.CONFIG.TCPAPPL.B
QUIT
/*
/&
* $$ EOJ
Notes
// EXEC CLIENT,PARM='ID=00,APPL=LPR' starts the batch LPR. Thereafter, you can
code any number of LPR commands. The ID=00 tells the batch LPR client to
use TCP/IP partition with SYSID=00 to process the request.
You should provide at least the two commands SET HOST= and SET PRINTER= to
fully qualify the target printer. You could also create a script file with these
commands and code just the EXEC script command in the batch job.
Your last command should always be a QUIT to properly close the LPR batch
session.
Figure 174. Check the batch job entry in the POWER list queue
Figure 175 shows the messages that are displayed on the VSE console if an
automatic LPR request fails.
You can use the DIAGNOSE LPR command to obtain more detailed information that
may help you determine why the LPR request failed. In Figure 176 on page 169
you can see the VSE console output during processing of an LPR client request
when the LPR diagnostic function has been activated. You can enter this
command in either the IPINITxx deck or from the VSE console after TCP/IP has
finished initialization.
The DIAGNOSE LPR function only displays diagnostic output for LPR clients invoked
by automatic LPR and GPS. It does not display LPR processing invoked by the
batch job and CICS LPR client. The output includes parameter settings and
interactions with the remote LPD during the LPR process. These are all useful in
debugging LPR failures.
In this example, TCP/IP could not locate the script file LPRSCR01 because it was
either not defined in the IPINITxx deck or not cataloged in a VSE library
accessible by the TCP/IP partition.
When the application terminates, the standard TCP/IP LPR client is invoked to
transfer the accumulated data to a remote Line Printer Daemon (LPD). The LPR
client can also be invoked to transfer the accumulated data in segments based on
the amount of data received from the application or after a predefined idle time.
Since GPS is a separately priced feature, you must obtain a separate product key
for the GPS feature and add it to the TCP/IP product key file. The procedure
described in 2.4, “Obtain TCP/IP product keys from IBM and define to TCP/IP for
VSE/ESA” on page 42 shows how to accomplish this.
Detailed documentation for GPS can be found in TCP/IP for VSE Optional
Products, Release 1.4 .
Our VTAM APPL LU definitions to support two GPS daemons are shown in Figure
177.
We will use the VTAM APPL LU net names GPSPRT01 and GPSPRT02 in our
CICS 3270 printer definitions and GPS daemon definitions. The LOGMODE
DSC2K, referenced in Figure 177, is supplied by IBM in the default VTAM
LOGMODE table ISTINCLM. It is a non-SNA 3270 printer log mode and is
suitable for BIND negotiation.
There are several parameters that you can specify in the TERMINAL and
TYPETERM definitions. We copied the TYPETERM VSEDSCP from the IBM
supplied group VSETYPE and changed the PRINTERTYPE parameter from 3284
to 3287.
Figure 178 on page 173 and Figure 179 on page 174 show the values we used in
the RDO TERMINAL and TYPETERM definitions for one of our GPS printers.
The GPS printer will be referenced by print applications in our CICS partition
using CICS terminal ID GPS1. The CICS partition will communicate to the GPS
daemon definition in the TCP/IP partition using the VTAM APPL LU net name
GPSPRT01.
Figure 178. CICS RDO TERMINAL definition for the GPS printer
Figure 179. CICS RDO TYPETERM definition for the GPS printer (part 1 of 2)
Figure 180. CICS RDO TYPETERM definition for the GPS printer (part 2 of 2)
Figure 181 on page 176 shows the part of our TCP/IP initialization file IPINIT04.L
where we defined two of our GPS daemons. A complete description of the DEFINE
GPSD command and its parameters can be found in TCP/IP for VSE Optional
Products, Release 1.4 .
With the first set of parameters we provide the information TCP/IP needs to route
the LPR request to the remote LPD:
PRINTER=TEXT The name of our print queue defined on the remote
LPD
IPADDR=HP4000 The name (or could also be IP address) of our
remote LPD print server
INSERTS=HP4LAND The name of our INSERTS phase that contains
printer control data to be transmitted with the
report
Next we specify the parameters TCP/IP needs to connect to our 3270 print
application, in our case, CICS:
TERMNAME=GPSPRT01 The VTAM LU name specified in our VTAM APPL
definitions and our CICS 3270 printer definitions.
You must have a unique VTAM APPL defined for
each GPS daemon.
INSESS=YES This parameter tells TCP/IP to bind the session to
the application specified in the TARGET parameter
when the GPS daemon is started. If you code NO
in this parameter then TCP/IP waits for CICS to
acquire the session.
TARGET=DBDCCICS The VTAM application (APPLID) to which this GPS
daemon will connect. The APPLID of our CICS
partition containing the 3270 GPS printer
definitions is DBDCCICS.
LOGMODE=DSC2K This is the VTAM log mode that will be used when
the session is bound. It can be coded here or in the
VTAM APPL definition.
Lastly, we provide information TCP/IP uses during the processing of the LPR
request:
A better method is to use the EXECUTE command to execute a VSE library member
containing the DEFINE GPSD commands. You can catalog a member in a library that
is accessible to the TCP/IP partition and enter the command EXECUTE memname
(where memname is the name of the member cataloged in a VSE library that
contains the DEFINE GPSD statements).
Figure 182 shows the job stream we used to catalog a member containing one of
our GPS daemon definitions.
* $$ JOB JNM=GPSDEF,DISP=D,CLASS=0
// JOB GPSDEF CATALOG TCP/IP GPSDEF01.L
// EXEC LIBR
A S=TCPIP.CONFIG
CATALOG GPSDEF01.L REPLACE=YES
DEFINE GPSD,ID=GPS1,PRINTER=TEXT,IPADDR=HP4000,INSERTS=HP4LAND, -
TERMNAME=GPSPRT01,TARGET=DBDCCICS,INSESS=YES,LOGMODE=DSC2K, -
QUEUING=MEMORY,STORAGE='TCPIP.TEMP',RETRY_COUNT=3
/+
/*
/&
* $$ EOJ
Figure 182. DEFINE GPS command file for the EXECUTE command
87 exec gpsdef01
Z1 0085 IPN397I Loading command deck GPSDEF01
Z1 0085 IPN398I Command deck GPSDEF01 has been completely loaded
Z1 0085 00FF: GPS900I GPS1 GPS Daemon starting
Z1 0085 00FF: GPS927I GPS1 GPS Version dated 12/23/99, 1.4 Prod
Z1 0085 00FF: GPS917I GPS1 Waiting for BIND
Z1 0085 00FF: GPS910I GPS1 GPS Bind to application complete
Z1-0087 IPN300I Enter TCP/IP Command
Figure 183. Use of the EXECUTE command to define the GPS daemon
Note that TCP/IP will automatically shut down and delete the GPS daemon if the
LPR request fails and the number of retries have been attempted in the
RETRY_COUNT parameter.
In this example, the text in the MSG parameter is sent to our CICS GPS printer,
GPS1, identified with the ROUTE parameter.
The GPS daemon uses the TCP/IP LPR client to send print files to the remote
LPD. If the LPR request fails, GPS will display messages on the VSE console
indicating the reason for the failure and retry the LPR operation after a time
interval specified in the DEFINE GPSD. The GPS daemon is shut down if the
LPR request is not successful after the specified number of retries.
Figure 186 on page 180 shows the GPS console messages from one of our tests
where the printer queue name was not defined on the remote LPD.
Figure 186. VSE console messages for a GPS retry of an LPR request
You have to restart the GPS daemon with the DEFINE GPSD command after
correcting the GPSD daemon definition or the remote LPD setup. Print files are
queued if the LPR request fails and are resent when the GPS daemon is
restarted.
You can also use the DIAGNOSE LPR command described in 5.7, “Diagnosing LPR
problems” on page 168 to obtain additional details on the settings GPS used for
the LPR request.
You can find more information for troubleshooting common GPS problems in the
manual TCP/IP for VSE Optional Products, Release 1.4.
You can access VSE files through NFS the same as you do for files that are local
to your workstation. For example, on a Windows 98 system you could use
Notepad to open and modify a book in a VSE source library. You could also do a
COPYFILE directly from the network drive to the local system, which is quite a bit
simpler than using FTP. Finally, you could write a workstation program that
retrieves and updates a VSE file just as though it were a local file.
There are some limitations for VSE NFS servers. Because NFS was primarily
designed to link UNIX systems, it is dependent on having a UNIX file system
available on the server. Therefore, the NFS feature of TCP/IP for VSE/ESA
cannot process files that do not have an emulated directory structure. These
include ICCF, sequential (flat) files, and VSAM files defined individually in the file
system.
VSAM ESDS and KSDS file types are supported for retrieval when accessed
using a VSAM catalog entry in the file system. ESDS is the only VSAM file type
that NFS supports for output on the VSE system. You can also access VSE
libraries and the POWER RDR, PUN, and LST queues.
NFS V2 (which is supported by TCP/IP for VSE/ESA) uses the unreliable UDP
protocol. Unless the network is quite robust and reliable, this can result in hangs
or incomplete transmissions. The NFS feature of TCP/IP for VSE/ESA may
encounter problems with dial-up connections or networks with transmission
problems.
TCP/IP for VSE/ESA offers NFS server support only. It does not offer an NFS
client on VSE. Therefore, you cannot directly access files on another system,
even if the other system is running an NFS daemon.
Since NFS is a separately priced feature, you must obtain a separate product key
for the NFS feature and add it to the TCP/IP for VSE/ESA product key file. The
procedure described in 2.4, “Obtain TCP/IP product keys from IBM and define to
TCP/IP for VSE/ESA” on page 42 shows how to accomplish this.
You should avoid using the DEFINE FILESYS entry as provided in the supplied
sample initialization member IPINIT00.L. This causes TCP/IP for VSE/ESA to
define every file in the system standard label area. While it is good for getting
acquainted with TCP/IP for VSE/ESA, it represents a security exposure because
it allows access to all files defined in the standard label area. Moreover, it can
have an impact on NFS performance when doing directory displays. Using DIR
through NFS can be rather slow, and the impact of doing a DIR on a large library
is significant. You should only add DEFINE FILE statements for those resources
that will be accessed by NFS or FTP.
Another way to accomplish the same reduction in files is to specify a mount point
that is restricted in scope at open time to a specific directory, for example,
//VSE/PRD2.CONFIG, rather than all entries in the file system. (Note the forward
slashes. NFS clients conform to UNIX file syntax.)
Figure 187 on page 183 shows the part of our IPINIT04.L configuration file
containing the DEFINE FILE entries and the DEFINE NFSD command used to start
NFS.
The DEFINE NFSD command must follow the DEFINE FILE entries that you want to
be available as NFS mount points. Any DEFINE FILE entries that follow the
DEFINE NFSD command will not be accessible by NFS clients. NFS will ignore the
DEFINE FILE entries that it does not support.
The following figure shows the options that we used in our NFSCFG01.L
configuration file for our NFS startup:
The various tuning options may be experimented with as desired once the system
is up and running. The configuration options are described in TCP/IP for VSE
Optional Products, Release 1.4.
Figure 189 and Figure 190 on page 186 show the two sections of the
NFSTYPES.L file supplied with TCP/IP.
The entries supplied are more or less self-explanatory, and any additional file
types desired can simply be added to the NFSTYPES.L file. If you use a file type
that is not in the NFSTYPES.L, NFS assumes the file is binary and no translation
will be performed when the file is written to VSE. This may result in a file with
data that is not usable on VSE. Once a file type is established, the option will
remain in effect for the duration of the NFS session.
Note
This controls only the move of files from a workstation to VSE.
The only controllable variables you can change are &PRI and &SEC, the primary
and secondary allocations in records. If these are insufficient for the size of the
files you are moving to VSE, then this is where to increase them.
DEFINE NFSD,ID=identifier,TRANSLATE=name,CONFIG=name
Figure 187 on page 183 shows the DEFINE NFSD command we used in our
IPINIT04.L initialization file to cause NFS to start automatically when TCP/IP for
VSE/ESA starts. This command must come after the DEFINE FILE commands;
otherwise, NFS will start up with no available mount points.
In the following figure we show the startup of NFS from the console command
and the VSE console messages that are issued during NFS initialization:
The “total mountpoints built” message indicates how many DEFINE FILE entries
NFS detected as eligible mount points. After NFS has completed initialization,
NFS clients can access the TCP/IP for VSE/ESA system and select any of these
mount points for mounting.
DELETE NFSD,ID=idname
where idname is the identifier used in the DEFINE NFSD command at startup (NFSD
in our example).
In either event, the following messages are produced during NFS termination:
The following NFS QUERY command shows you the user IDs of NFS clients who are
accessing your system and their active mount points:
In the “New server to add” field of the Properties window that is displayed in
Figure 198 on page 193, you enter the IP address or name of your TCP/IP for
VSE/ESA host system running the NFS server. We entered the name of our VSE
host, VSE240.
Next, you have to set the properties of the NFS server that are required by
TCP/IP for VSE/ESA. From the list of Servers configured on this system, select
your server name or IP address and click Properties to define the properties for
your VSE NFS server.
Figure 199 on page 194 and Figure 200 on page 195 show two of the sections of
properties that we needed to configure. The required settings are listed in the
NFS client configuration information in TCP/IP for VSE Optional Products,
Release 1.4.
The changes that we had to make in the Performance section were selecting 2 for
the Streaming (requests) and Use version 2 only for the NFS protocol. The
transport protocol and other options already defaulted to the correct settings as
shown in Figure 200 on page 195.
All options were turned off or disabled in the Advanced and LPR Printing
sections.
You can access these folders and the file entries in them as you do for any entries
on your workstation.
You can also select any of these folders as a mount point and mount them as
network drives. You can also mount the entire file system as an NFS drive. To do
this you right-click the vse240 icon mount point, select Map Direct NFS Drive
from the pull-down list and select a drive letter to assign to the mount point. If you
click a directory folder as a mount point, then select Mount Network Drive from
the pull-down list and select a drive letter to assign to the mount point.
Figure 202 on page 197, Figure 203 on page 197, Figure 204 on page 198, and
Figure 205 on page 198 illustrate these steps.
In Figure 202 we right-clicked the NFS server icon and selected Map Direct NFS
Drive. The window in Figure 203 was displayed and we selected the letter V as
our network drive letter used to access our NFS server on VSE.
We can now access our POWER queue as the P: drive or our VSE NFS server as
the V: drive.
For example, in Figure 206 on page 199 you can see the windows produced by
double-clicking My Computer on our desktop, then double-clicking the POWER
P: drive icon. Our mapped NFS mount points are displayed as network drives
along with other folders and drives defined on the workstation.
By double-clicking the VSE network drives you can display the directory folders
and file entries accessed by the NFS server on VSE. Figure 206 shows the
directory folders representing the POWER RDR, PUN, and LST queues. If we
You can also access the VSE network drives from Windows Explorer as
illustrated in Figure 207 on page 200. When we bring up Windows Explorer, we
see our VSE network drives P: and V: listed with our other network drives and
folders.
In this example, we selected the V: drive and displayed the members in library
TCPIP.CONFIG. We right-clicked member Gpsdef to show that you can perform
the same PC operations on VSE NFS entries that you can on any other file on
your workstation. You can open the member in a PC editor, copy and paste, drag
and drop, or even delete the entry from the VSE system.
In Figure 208 on page 201 you can see the results of selecting one of our TCP/IP
partition output listings, TCPSZ1, from the POWER LST queue and opening it.
Windows attempted to open it in Notepad, but because it was too large, Windows
prompted us to open the file in WordPad.
In Figure 209 on page 202 we selected the directory representing the VSAM
catalog VSESPUC and displayed its contents. From this display we could select
an ESDS or KSDS file, open it with one of the PC’s facilities and process it on the
workstation. These examples could be performed on any of the supported
directories and file entries that NFS displays to our NFS client.
NFS is a file access method rather than a record or field access method. This
means that even if you are only updating one record in a large file, the entire file
must be read and rewritten to do this.Therefore, a few updates can take a long
time.
When you put a file to VSE (explicitly or implicitly) the name must follow VSE
rules for the type of file being written. For example, if you are writing to the
POWER queue, the name of the entry can be no more than eight characters.
In NFS the file type on the client side controls whether ASCII to EBCDIC
translation is done or not when a file is written to VSE. See NFSTYPES.L to pick
an appropriate file type. If you guess wrong, the most likely result will be that the
file looks like junk on the VSE side.
These and other considerations are documented in TCP/IP for VSE Optional
Products, Release 1.4 .
The role of the Web server is to access this data and send it to the Web browser.
The Web browser receives the data, interprets it, and formats it for presentation
to the Web user.
A Web site is accessed from a Web browser using a Universal Resource Locator
(URL). The format of a URL to access a Web server is:
http://location:port/path/filename
location The IP address or domain name of the host Web server.
port The TCP/IP port number on which the host Web server is
listening. The default listen port for HTTP is 80.
path Path or directories on the host where the data resides.
filename File name and extension of the file containing the data you
want. The default is INDEX.HTML.
We have provided some basic examples for each of these steps in this chapter.
*------------------------------------------*
* *
* Setup the File System *
* *
*------------------------------------------*
DEFINE FILE, PUBLIC='TCPIP', DLBL=TCPIP, TYPE=LIBRARY
DEFINE FILE, PUBLIC='PRD2', DLBL=PRD2, TYPE=LIBRARY, -
READONLY=YES
.
.
.
*------------------------------------------*
* *
* Define HTTP Daemons *
* *
*------------------------------------------*
DEFINE HTTPD,ID=HTTP1,ROOT='TCPIP.HTML',SECURE=NO,CONFINE=YES
DEFINE HTTPD,ID=HTTP2,ROOT='TCPIP.HTML',PORT=5080,SECURE=YES,CONFINE=NO
*------------------------------------------*
* *
* Define CGI Programs *
* *
*------------------------------------------*
DEFINE CGI,PUBLIC='ASMCGI1',TYPE=CGI
DEFINE CGI,PUBLIC='ASMCGI2',TYPE=CGI-BAL
DEFINE CGI,PUBLIC='REXXCGI1',TYPE=CGI-REXX
Figure 210. Define HTTP and DEFINE CGI statements in the IPINIT04.L file
Each HTTP daemon definition requires a unique identifier for use internally and in
console commands, therefore, we used HTTP1 and HTTP2 as the IDs for our two
HTTP daemon definitions.
We defined the sublibrary TCPIP.HTML as the root for both of our HTTP
daemons. This is the sublibrary where these HTTP daemons will look for HTML
documents and other objects referenced by these documents. The HTTP daemon
will look for the member INDEX.HTML as the default document unless the Web
user enters a different file name in the URL.
We let the port number on our HTTP1 daemon definition default to 80 so that
Web users would automatically connect to it as the default listen port. Our second
daemon, HTTP2, was defined to use port number 5080. This is a way to
distinguish HTTP daemons that run concurrently on the same VSE system. To
access HTTP daemons with a port number other than 80, the Web browsers have
to specify this port number explicitly in the URL.
For example, to access our second HTTP daemon on port 5080 on our VSE
system named VSE240, we would enter the following URL:
http://vse240:5080
The CONFINE=YES parameter in our HTTP1 definition limits the HTTP daemon
to searching only the root sublibrary for documents and objects. The
CONFINE=NO option on our HTTP2 definition allows that HTTP daemon to
search using any fully qualified public name defined in the file system. The name
can come from HTML documents or can be entered by the Web user in the URL.
See TCP/IP for VSE Installation Guide, Release 1.4 for additional details on
setting up the HTTP daemon. The complete syntax for the DEFINE HTTPD command
is described in TCP/IP for VSE Commands, Release 1.4.
Note
A detailed description of the syntax for the QUERY HTTPDS and DELETE HTTPD
commands can be found in TCP/IP for VSE Commands, Release 1.4 .
HTML documents are created as standard text files with embedded HTML tags.
HTML tags are recognizable by the less than and greater than symbols, for
example, <tag>. HTML documents have to be stored in a VSE sublibrary in
EBCDIC because they will be translated to ASCII during transmission to a client
Web browser. You can create these on VSE with any VSE editor, however, there
are no editing tools on VSE to validate the syntax of the HTML document. There
are several PC tools that will create and validate HTML documents.
Graphic images (audio, video, and virtual reality files) are not translated during
transmission. This is why they have to be created in ASCII format (for example,
on a workstation) and then stored as binary files in a VSE sublibrary. The easiest
way to upload graphics and other binary files into a VSE library member is to use
FTP. From our FTP client on the workstation, we had to set the TYPE to BINARY
and the record format to S.
Table 9 on page 207 lists the various types of files and the acceptable extension
names/member types recognized by the HTTP daemons. These are defined in
the EXTTYPES.L member described in 3.4, “Data translation during file transfer”
on page 95.
Our Web page also has links to other Web pages. The HTML <a> tag with the
HREF parameter defines a link to another document from this Web page. These
links are called hyperlinks. When the Web user clicks the text displayed by the
hyperlink definition, the Web browser will send a request for the document
defined in the HREF parameter to the Web server. The hyperlink could be a
reference to a document on the same Web site or it could be a URL linking to
another Web site.
We have also defined two hyperlinks, one to link to the IBM redbook home page
and one to link to the IBM VSE home page. Both of these hyperlinks use a fully
qualified URL in our Web page.
Finally, to test accessibility to our Web site on the VSE system from a Web
browser client, we did the following on our Windows 98 workstation:
1. Start Microsoft Internet Explorer.
2. Specify http://vse240 in the Location field.
We can click one of the hyperlinks at the bottom of the Web page and the Web
browser will request the document defined in our Web page.
We defined our second HTTP daemon, HTTP2, with security using the following
command:
DEFINE HTTPD,ID=HTTP2,ROOT='TCPIP.HTML',PORT=5080,SECURE=YES,CONFINE=NO
Security must be activated with the SET SECURITY=ON command before this HTTP
daemon is defined, otherwise, the SECURE=YES option will be ignored.
Because our secured Web server HTTP2 is defined with a port number other than
the default 80, we had to include the port number 5080 in the URL. Our secured
HTTP daemon first retrieves the PASSWORD.HTML document for the user to
enter a name and password as shown in Figure 214 on page 211. If a valid name
and password are entered, our secured HTTP daemon will then send the
INDEX.HTML document.
If an invalid user ID or password are entered, the HTTP daemon sends the
VIOLATED.HTML Web page shown in Figure 215. The user will have to reaccess
the Web site and enter a valid logon ID.
Figure 215. VIOLATED.HTML Web page from our secured HTTP daemon
The programs that process this data are called CGI programs and execute on the
host where the Web server is running.
Figure 212 on page 207 shows the source code for our form page
ITSOFORM.HTML and the job stream to catalog it into our root sublibrary
TCPIP.HTML.
The HTML <form> tag defines the form and the type of fields in it. Our form has
two input fields called yourname and company, and a selection pull-down list with
a default value of yes. It also includes a hyperlink back to the INDEX.HTML page.
In the form we tell the HTTP daemon the action to take when the data is sent by
the Web browser. In our example, we are invoking a CGI program written in
REXX to process the data sent by the Web browser.
Figure 213 on page 209 illustrates how Internet Explorer displays our form page
sent from our VSE Web site.
The user fills out the input fields, selects an entry in the pull-down list and clicks
the Click here button to send the data to the Web server. The Web server will
invoke the CGI program we defined in the HTML form document to process the
data sent by the Web browser.
Data is passed to the CGI program as a string of variable fields. TCP/IP for
VSE/ESA passes this data along with the user ID and password of the logged on
user to the CGI program. If security is not activated for the VSE Web site, then
the user ID is set to ANONYMOUS and the password is blank.
The format 1 CGI uses an older macro interface supplied by the TCP/IP for
VSE/ESA product with the FILEIOHD macro. Programs written to this interface
are still supported, however, they can only be written as 24-bit applications. The
following command is used to define a format 1 assembler CGI:
DEFINE CGI,PUBLIC='ASMCGI1',TYPE=CGI
The examples in the redbook VSE/ESA as a Web Server, SG24-2040 are format
1 assembler CGIs.
The format 2 assembler CGI uses a parameter list interface mapped with a
CGIDATA macro. This interface is easier to use than the older format 1 macro
interface and is recommended for new assembler CGI programs. Programs
written to this interface can be 31-bit applications. The following command is
used to define a format 2 assembler CGI:
DEFINE CGI,PUBLIC='ASMCGI2',TYPE=CGI-BAL
For assembler CGIs the public name is the phase name under which the CGI
program was cataloged into a VSE sublibrary. For example, ASMCGI1.PHASE
and ASMCGI2.PHASE are the member names of the phases in our TCPIP.HTML
sublibrary. The sublibrary must be in the LIBDEF search string of the TCP/IP for
VSE/ESA partition.
Examples for both types of assembler CGIs are in TCP/IP for VSE Programmer’s
Reference, Release 1.4 .
We implemented a REXX CGI program to process the data from our form
document. We used the following command to define our REXX CGI program:
DEFINE CGI,PUBLIC='REXXCGI1',TYPE=CGI-REXX
For REXX CGIs the public name is the procedure name under which the REXX
procedure was cataloged in a VSE sublibrary. The REXX procedure must be
cataloged in a sublibrary that is defined in the LIBDEF search chain for the
TCP/IP for VSE/ESA partition.
Note
The format of the DEFINE command to define CGI programs has changed with
the current level 1.4 of TCP/IP for VSE/ESA. The old format used a DEFINE
FILE,TYPE=CGI format. CGI programs are now defined separately from
DEFINE FILE entries using the DEFINE CGI command. The old format is still
accepted, however, you should use the new format when defining CGI
programs to TCP/IP for VSE/ESA.
There are no commands to modify or remove CGI definitions from the running
TCP/IP for VSE/ESA configuration. The DELETE CGI command is available to allow
you to remove a CGI program from memory and reload an updated copy. To load
a new copy of our REXX CGI program we would enter the following command:
DELETE CGI,PUBLIC=’REXXCGI1’
Note
An older method of deleting the CGI used in the redbook VSE/ESA as a Web
Server , SG24-2040 and earlier levels of the TCP/IP for VSE/ESA
documentation is to delete the REXX driver module IPNFCGI used by the
REXX CGI programs. The following is the command used to do this:
DELETE FILEIO,ID=IPNFCGI
The REXX CGI definition is not deleted as a result of this DELETE command,
however, the REXX CGI program is reloaded the next time it is requested.
The data passed by the Web browser to the VSE Web server is formatted into a
string of variables. Each variable starts with an ampersand (&) followed by the
name defined in the form, an equal sign (=), and then the data value. For
example, the data parameter passed to our REXX CGI program from our
ITSOFORM.HTML would look like the following:
The REXX program would use the REXX parse commands to select each of the
fields for processing.
Figure 219. Source code for our sample REXX CGI program
After the data is processed, the CGI program constructs a document that will be
sent to the Web browser. The REXX CGI program uses the REXX HTML function
to pass HTML source to the HTTP daemon, which in turn, sends the dynamically
constructed document to the Web browser.
In our example we constructed a Web page displaying the date and time and the
string of data that was received from the Web browser. In a real environment the
REXX CGI program may have stored the data received from the Web browser in
a database or file and sent some acknowledgment confirming the input.
Figure 220 on page 218 shows the Web page displayed in our Web browser.
See TCP/IP for VSE Programmer’s Reference, Release 1.4 for more examples of
writing CGI programs. You can also obtain several CGI program examples from
Connectivity System’s Web site at:
http://www.tcpip4vse.com/progsamps.html
Information in this book was developed in conjunction with use of the equipment
specified, and is limited in application to those specific hardware and software
products and levels.
IBM may have patents or pending patent applications covering subject matter in
this document. The furnishing of this document does not give you any license to
these patents. You can send license inquiries, in writing, to the IBM Director of
Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785.
Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact IBM Corporation, Dept.
600A, Mail Drop 1329, Somers, NY 10589 USA.
The information contained in this document has not been submitted to any formal
IBM test and is distributed AS IS. The information about non-IBM ("vendor")
products in this manual has been supplied by the vendor and IBM assumes no
responsibility for its accuracy or completeness. The use of this information or the
implementation of any of these techniques is a customer responsibility and
depends on the customer's ability to evaluate and integrate them into the
customer's operational environment. While each item may have been reviewed
by IBM for accuracy in a specific situation, there is no guarantee that the same or
similar results will be obtained elsewhere. Customers attempting to adapt these
techniques to their own environments do so at their own risk.
Any pointers in this publication to external Web sites are provided for
convenience only and do not in any manner serve as an endorsement of these
Web sites.
C-bus is a trademark of Corollary, Inc. in the United States and/or other countries.
Java and all Java-based trademarks and logos are trademarks or registered
trademarks of Sun Microsystems, Inc. in the United States and/or other countries.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of
Microsoft Corporation in the United States and/or other countries.
UNIX is a registered trademark in the United States and other countries licensed
exclusively through the Open Group.
SET, SET Secure Electronic Transaction, and the SET logo are trademarks
owned by SET Secure Electronic Transaction LLC.
Other company, product, and service names may be trademarks or service marks
of others.
IBM publications
• TCP/IP for VSE/ESA - IBM Program Setup and Supplementary Information ,
SC33-6601
• CICS Transaction Server for VSE/ESA CICS-Supplied Transactions,
SC33-1655
This information was current at the time of publication, but is continually subject to change. The latest information
may be found at the Redbooks Web site.
Company
Address
We accept American Express, Diners, Eurocard, Master Card, and Visa. Payment by credit card not
available in all countries. Signature mandatory for credit card payment.
227
228 TCP/IP for VSE/ESA
Index
D
Numerics daemons
3172 Interconnect Controller File Transfer Protocol 83
DEFINE ADAPTER command 63 FTP 65, 83
DEFINE LINK command 63 GPS 68
HTTP 68
Hypertext Transfer Protocol 203
A LPD 149
Address Resolution Protocol (ARP) 7
NFS 68, 182
AppleTalk 17, 18
Telnet 64, 134
ARPANET 1
DECnet 18
ATM 20
DEFINE commands
ATM switch 20
CGI 68, 214
AUTOLPR 160
CGI program 204
automatic LPR 160
DEFINE EVENT 127
EVENT 160
B FILE 67, 85, 98
batch FTP client 120 FILESYS 85
batch LPR 166 FTPD 65, 83
BOOTP 7 FYLESYS 98
bridges 18 GPSD 68, 175
bridging 14 HTTPD 68, 204
LINK 63
LPD 65, 149, 152
C NAME 66, 161
carriage control characters 102, 157 NFSD 68, 182 , 188
CC option 157 ROUTE 64
CGI 203, 212 TELNETD 64, 71, 134
commands 216 USER 67
definition 214 DELETE CGI command 216
format 1 215 DELETE commands
format 2 215 HTTPD 206
program invocation 213 DELETE FTPD command 131
program use 214 DELETE GPSD command 178
channel-to-channel adapter DELETE NFSD command 188
DEFINE LINK command 63 DELETE TELNETD command 147
Channel-to-Channel support (CTC) 6 DFHCSD entries 74
CICS DHCP 7
customizing 71 DIAGNOSE LPR command 168
definitions for GPS 172 DNS 28
DFHCSD entries 74 Domain Name Server (DNS) 4
FTP client 111 Domain Name System 4
FTP transaction 86 DSPACE parameter 52
IPNCSD.Z 72
table entries 72
Telnet client 137, 141 E
transaction LPR 154 ENTR 5
circuit switching 17 ETHERNET/IEEE 15
class A addresses 9
class B addresses 9
class C addresses 9
F
Fast Ethernet 5
class D addresses 9
FDDI 5
CLAW protocol 6
File Transfer Protocol (FTP) 26, 28
command-line interface 152
Firewalls 36
Common Link Access to Workstation 6
proxy servers 36
creating forms 212
screening filters 36
SOCKS servers 37
H
Hardware Address Resolution 7 L
HTML document 206 LAN 15, 19
creation 206 bridges 16
example 207 extenders 16
security 210 media-access methods 15
tags 206 switch 20
HTML tag 206 switches 16
HTTP 32 topology 16
HTTP daemon 204 Logical Link Control (LLC) 19
commands 205 logical record length 119
default port 208 LONG command 159
definition 204 loopback 10
file type 206 LPD 28, 149
security 209 access from workstation 152
hub 17 daemon definition parameter 150
hyperlink 208 definition 149
example 152
operation commands 151
I QUERY LPDS command 151
IAB 3 LPR 28, 72, 149, 154
IBM 3088 6 automatic 160
IBM 9221 Integrated Communication Processor 5 batch 166
IBM Open Systems Adapter 2 5 CICS transaction 154
N Q
NetBIOS 18 QUERY commands
network CGIS 215
interface layer 4 EVENTS 160
protocols 24 FTPDS 130
Network Computer 34 GPSD 178
Network File System (NFS) 31 HTTPDS 205
NFS LPDS 151
access NFS server on VSE 196 NFS 189
client configuration 191 OPT 157
configuration 182, 183 TELNETDS 130, 146
file type considerations 202 QUIT command 159
FLUSH command 190
installation 181
mount point 182 R
overview 181 RARP 7
product key 181 remote bridges 19
QUERY command 189 remote login 27
start 188 Request for Comments (RFC) 2
termination 188 return codes for LPR 167
NFSCFG.L configuration file 183 REXX CGI program 215, 216
NFSMODEL.L configuration file 187 RFC 3
NFSNET 1 ring topology 16
NFSTYPES.L configuration file 185 routing 14, 21, 23
bandwidth 24
delay 23
O dynamic 23
OPEN command 121 load 24
OSA 6 metrics 23
DEFINE ADAPTER command 63 multipath 23
DEFINE LINK command 63 path length 23
OSA-2 5 reliability 23
single-path 23
P static 23
packet switching 17 routing table 13
partition size 50
231
S The Internet Assigned Number Authority (IANA) 3
scripting facility 162 The Internet Engineering Task Force (IETF) 3
Secure Sockets Layer (SSL) 35 The Internet Research Task Force (IRTF) 3
secured Web site 209 TN3270 28
security exit 63, 67 protocol 133
SET commands TN3270 Plus 138
CC 157 usage 139
GATEWAY 62 Traceroute 14, 78
HOST 155, 158 Transmission Control Protocol (TCP) 26
INSERTS 166 transport layer 4
MASK 61 tree topology 16
PRINTER 155, 158
SECURITY 63, 84
SETVAR command 129
U
USER command 121
SHORT command 159 User Datagram Protocol (UDP) 25
SNA/APPN 6
sockets 24
interface 25 V
SSL VCTC 6
authentication 35 VSAM
integrity 35 ESDS file transfer 106
privacy 35 file transfer 105
star topology 16 files 105, 151
switches 18 KSDS file transfer 105
switching 14 VSE
symbolic name 66, 161 DEFINE LINK command 63
FTP batch 120
FTP daemon 98
T GET to workstation 98
TCP/IP local POWER queues 119
documentation 39 LPR commands 155
installation for VSE 40 partition size for TCP 50
IPINIT file 53 PUT workstation file 101
partition size 50 startup job 50
product key 42 VTAM
protocol 27 customizing 71
TCP/IP operation 79 DEFINE TELNETD command 71
batch utility 80 definitions for GPS 171
console input 79 DSPACE parameter 52
console messages 82 luname 71
restart 81 Telnet definitions 134
shutdown 81
Telnet
batch client 144 W
CICS client 141 Web
CICS definitions 137 browser 203
CICS transaction 141, 142 CGI programs 212
command 141 dynamic page 203
DEFINE TELNETD command 134 HTTP daemon definition 204
definition 133 hyperlink 208
DELETE command 147 Java applets 203
line mode connection 142 port number 205
menu definition 135 securing server 209
QUERY command 146 server 203
remote login 27 site creation 203
terminal emulation 27 source code for Web site 207
TN3270 Plus 138 static page 203
VTAM APPL definitions 134 Web browser 34
terminal emulator session 154 wide area network (WAN) 17
The Internet Architecture Board (IAB) 2 Winsock 25
233
234 TCP/IP for VSE/ESA
IBM Redbooks review
Your feedback is valued by the Redbook authors. In particular we are interested in situations where a Redbook
"made the difference" in a task or problem you encountered. Using one of the following methods, please review the
Redbook, addressing value, subject matter, structure, depth and quality as appropriate.
• Use the online Contact us review redbook form found at http://www.redbooks.ibm.com/
• Fax this form to: USA International Access Code + 1 914 432 8264
• Send your comments in an Internet note to [email protected]
Review
Questions about IBM’s privacy The following link explains how we protect your personal information.
policy? http://www.ibm.com/privacy/yourprivacy/
®
SG24-5626-00