Group Items

You may place the DATE directive in front of a group item, as long as you also use the USE GROUP directive.

Example

The source code for the animals table contains a group item for the date of the animal's last visit, and an elementary item for the date of the last payment:

          05  last_visit.
              10  yyyy                    pic 9(4).
              10  mm                      pic 9(2).
              10  dd                      pic 9(2).
          05  fee                         pic s9(5)v99.
          05  date_paid                   pic 9(8). 

The date portions of a database table based on source code with this FD look similar to this illustration. All of these date-related fields are of type NUMBER in the (Access) database.

XDBCREFXDPREP04-low.gif

The examples that follow build on this source code.