Rules for the QUALIFIED keyword:

  • When a file is qualified, its record names must be qualified everywhere in the source except when specified as parameters of the File specification keywords RENAME, INCLUDE, IGNORE, and SFILE. The name must not be qualified when specified as the parameter of those keywords.
  • When a file is qualified, Input and Output specifications are not allowed or generated for the file. This means that external fields from the file are not automatically defined as fields in the program. All I/O must be done with result data structures.
  • The QUALIFIED keyword is valid only for externally-described files.
  • The QUALIFIED keyword cannot be specified with the LIKEFILE keyword; files defined with LIKEFILE always have qualified record formats.
Figure 1. Example of the QUALIFIED keyword
 * file1 has formats HDR, INFO, ERR.
 * file2 has format INFO.
 * The QUALIFIED keyword is used for both files, making it
 * unnecessary to rename one of the "INFO" formats.

 * Note that the record format names are not qualified when
 * specified in keywords of the File specification.
Ffile1     if   e             disk qualified
F                                  ignore(hdr)
F                                  rename(err:errorRec)
Ffile2     o    e             disk qualified
 * The record formats must be qualified on all specifications other
 * than the File specification for the file.
D ds1             ds                  likerec(file1.info : *input)
D errDs           ds                  likerec(file1.errorRec : *input)
D ds2             ds                  likerec(file2.info : *output)
 /free
        read file1.info ds1;
        eval-corr ds2 = ds1;
        write file2.info ds2;
        read file1.errorRec errDs;