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

Processing Lists with Variable-Length Entries

So far, we have only looked at list APIs that return entries of the same size or length. Some list APIs, however, return entries of different lengths. The List Module Information API (QBNLMODI), for instance, with format MODL0300, returns list entries containing the names of procedures found within a *MODULE object. As procedure names can range from one byte to several hundred bytes, it would be very inefficient to simply reserve space in every entry for the largest possible procedure name. Instead, the QBNLMODI API uses an “offset and length” approach to returning each procedure name. Due to the various procedure-name lengths, each list entry may be of a different length, so QBNLMODI also defines ...

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