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

Using an Open List to Find Files with Deleted Records

Figure 3.9 shows a version of the now-familiar program from Figure 3.4 based on the Open List of Objects API (QGYOLOBJ).

Figure 3.9. An RPG program using the Open List of Objects API (QGYOLOBJ).
h dftactgrp(*no)
											DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++
dFig3_9            pr                    extpgm('FIG3_9')
d LibName                         10     const
d DltPct                          15   5 const

dFig3_9            pi
d LibName                         10     const
d DltPct                          15   5 const

d/copy qsysinc/qrpglesrc,qgyolobj
											d/copy qsysinc/qrpglesrc,qgy
d/copy qsysinc/qrpglesrc,qusrmbrd
d/copy qsysinc/qrpglesrc,qusec

dOpnListObj        pr                    extpgm('QGYOLOBJ')
											d RcvVar                           1     options(*varsize)
											d LenRcvVar                       10i 0  const
											d ListInfo                        80
											d NbrRcdRqs                       10i 0  const
											d SortInfo                               const likeds(QGYOSI)
											d QualObjNam ...

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