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

Having looked at all of the prerequisite APIs to exchange data with a remote application, let’s look at a sample file server. The source is shown in Figure 15.15.

Figure 15.15. A server program sending all records within a file.
h dftactgrp(*no) bnddir('QC2LE')

FFilename++IPEASF.....L.....A.Device+.Keywords+++++++++++++++++++++++++
fAnyFile    if   f32766         disk    usropn infds(OpenFeedback)

DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++
dCmdExc           pr                  extpgm('QCMDEXC')
											d Command                    65535    const options(*varsize)
											d CmdLength                     15  5 const
											d IGC                               3 const options(*nopass) dSocket pr 10i 0 extproc('socket') d AddrFamily 10i 0 value d Type 10i 0 value d Protocol 10i 0 value dBind pr 10i 0 extproc('bind') ...

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