Here is an example of using the select function within DDS. The logical file references the physical file, defining a key, and selecting only those records where the field ADHSTS contains an asterisk.

A          R RADMHDR                   PFILE(ADMHDRPF)
A          K ADHOID                                   
A          S ADHSTS                    COMP(EQ '*')   

Omit is implied in the example above, but may be explicitly defined as in the sample below.

A          R GPORTA                    PFILE(GPORTAFL)  
A          K INVDTZ                                     
A          K INVNOZ                                     
A          S EXTR8H                    COMP(EQ ' ')     
A          O                           ALL