O'Reilly logo

The Programmer’s Guide to iSeries Navigator by Paul Touhy

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

Views

A View is a nonkeyed logical file; in other words, you can define everything except a key. Views highlight another major difference between SQL and DDS. In this chapter, we’ll just look at the basic definition of a view. Some of the more advanced features are described in Chapter 5, so not all options and buttons available will be discussed here.

Let’s have a look at creating a view that gives us the equivalent for the following DDS:

A          R SAMEMPL01                  PFILE(SAMPL00001)
A            EMPID
A            NAME
A            SALARY
A          S SALARYK                     COMP(GT 1000000)

To create a new view select New → View from the context menu for Views in the Schema. Figure 4.11 shows the New View window, where you provide a Name and Description. As with indexes, you must be very careful with the name; ...

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