COBOL - Opções de compilação - QUALIFY


Volta a página anterior

Volta ao Menu Principal


Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

Opções de compilação - QUALIFY

QUALIFY affects qualification rules and controls whether to extend qualification rules so that some data items that cannot be referenced under COBOL Standard rules can be referenced.

Default is: QUALIFY(COMPAT)

Abbreviations are: QUA(C | E)

QUALIFY(COMPAT)
If QUALIFY(COMPAT) is in effect, references to data items must be unique.

QUALIFY(EXTEND)
If QUALIFY(EXTEND) is in effect, qualification rules are extended so that some references that are not unique by COBOL standard rules can be unique.
If every level in the containing hierarchy of names is specified, the set of qualifiers is called a complete set of qualifiers.
If there is only one data item with a specific complete set of qualifiers, the reference resolves to that data item, even if the same set of qualifiers can match with another reference as an incomplete set of qualifiers.

Example

       01  A. 
           02  B. 
               03  C PIC X(001). 
               03  A PIC X(001). 
           02  C     PIC X(001). 

           MOVE SPACE TO C OF A      *> REFERS TO 02 LEVEL C (UNIQUE ONLY WITH QUALIFY(EXTEND))
           MOVE SPACE TO A           *> REFERS TO 01 LEVEL A (UNIQUE ONLY WITH QUALIFY(EXTEND))
           MOVE SPACE TO C OF B OF A *> REFERS TO 03 LEVEL C (UNIQUE BY COBOL STANDARD RULES)
           MOVE SPACE TO C OF B      *> REFERS TO 03 LEVEL C (UNIQUE BY COBOL STANDARD RULES)


© Copyright IBM Corp.