Using the VLF macros

VLF provides seven basic functions. An application invokes each function by issuing a VLF macro. The functions and the corresponding macros are:

Use the information here to decide how to use VLF. z/OS MVS Programming: Authorized Assembler Services Reference ALE-DYN contains information about coding each macro, including the return and reason code combinations the macro issues to describe the processing performed.

As you design your application, consider these return and reason codes carefully. For example, VLF runs as a started task, and most installations would start VLF as part of the IPL process. It is possible, however, that VLF might not be active when your application issues VLF macros. Thus, your application must be able to run without VLF. Also, each VLF macro issues a return code of X‘28’ when VLF is not active; each time your application issues a VLF macro, it must check for this return code.

If your application must be able to run on multiple levels of MVS™, note that all VLF macros issue return code X‘28’ on a level of MVS prior to MVS/SP3.

Figure 1 shows, at a very high level, one possible way of using VLF to retrieve objects from a PDS class. The figure shows the sequence of steps an application might use to find and read a member without VLF, and the high-level process of retrieving an object for an end user with VLF. In the VLF process, each shaded box represents the same steps the application uses to find and read a member without VLF. Figure 1 does not include all VLF functions or the detailed return code checking than an actual application would perform.
Figure 1. Retrieving an Object for an End User
ieaa8vlf