O'Reilly logo

APIs at Work, Second Edition by Ron Hawkins, Doug Pence, Bruce Vining

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Putting All of the APIs Together with a File Server Client

Having looked at the server-side of our file transfer program, let’s now look at the client program. The client is shown in Figure 15.18.

Figure 15.18. A client program receiving all Customer records.
h dftactgrp(*no) bnddir('QC2LE')

FFilename++IPEASF.....L.....A.Device+.Keywords+++++++++++++++++++++++++
											fCustomer   o    e              disk     infds(OpenFeedback)

DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++
dFig15_18         pr                  extpgm('FIG15_18')
											d SystemParm                    30    const
											dFig15_18         pi
											d SystemParm                    30    const
											dGetHostByName    pr              *   extproc('gethostbyname')
											d HostName                        *   value options(*string)

dSocket           pr            10i 0 extproc('socket')
d AddrFamily                    10i 0 value
d Type                          10i 0 value
d Protocol                      10i 0 value

dConnect ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required