ASNA WingsRPG™ Reference Manual

Walkthrough Step 2 - The Wings Library Structure

The Wings Library Structure

For the purposes of this walkthrough, it's assumed that all of the object and source members of the application to be modernized are in the same library. Our sample application, and all of its objects and sources reside in the RPMONGER library. This library contains the original RPG and display file objects, as well as a CL program that launches the applications. It also holds the source physical files for all of the above (ILE RPG, DDS files, CL). In a production environment, it's unlikely that you'd have the source and production objects in the same library—we're doing that here to keep things simple.

We recommend that you create a secondary library to contain the RPG program objects that have been modified to support Wings Display Files. Generally, the name of this library is the name of the program objects' original library with an H (indicating the OAR Handler) added to the end. So, for this walkthrough, we'll create a Wings-ready library named RPMONGERH to match the original library RPMONGER. (If you use ten-character library names, invent your own convention).

For more detailed explanation of the library setup see our page on Folder and Library structure.

The CL program that launches the original RPG application is detailed in Figure 2-1 below. It sets the library list and calls CUSTINQ, the entry point into our example application.

Figure 2-1.

To launch the Wings version of the CUSTINQ program object, we'll use the CL shown below in Figure 2-2. It's identical to the CL in Figure 2-1 except it also adds RPMONGERH to the library list. This program is also stored in the RPMONGERH library.

Figure 2-2.

It's vital that ADDLIBLE LIB(RPMONGERH) be added after the existing ADDLIBLE line, as this positioning will place it before the original library in the library list, thus the CUSTINQ program object with the handler added takes precedence over the original CUSTINQ program object.

Preparing the program to use Wings Display Files is covered in the next step.

Back to Step 1

Continue to Step 3