Offset values and lengths

When you use an API that generates a list of information into a user space, use the offset values and lengths returned by the API in the generic header of the user space to step through the list.

Because of the following considerations, you need to use the offset values and lengths returned by a list API in the generic header of the user space, rather than specifying what the current version of the API returns:

  • The offset values to the different sections of the user space might change in future releases.
  • The length of the entries in the list data section of the user space might change in future releases.

As long as your high-level language application program uses the offset values and lengths returned in the generic header of the user space, your program will run in future releases of the IBM i licensed program.

Note: While your application program should use the length returned in the generic header to address subsequent list entries, your application program should retrieve only as many bytes as it has allocated storage for.