Every user-defined name in a COBOL program is assigned, by the user, to name a resource that is to be used in solving a data processing problem. In order to use a resource, a statement in a COBOL program must contain a reference that uniquely identifies that resource.In order to ensure uniqueness of reference, a user-defined name may be qualified, subscripted or reference-modified as described in the following paragraphs.
When the same name has been assigned in separate programs to two or more occurrences of a resource of a given type, and when qualification by itself does not allow the reference in one of those programs to differentiate between the two identically named resources, then certain conventions which limit the scope of names apply. These conventions ensure that the resource identified is that described in the program containing the reference.
Unless otherwise specified by the rules for a statement, any subscripting and reference modification are evaluated only once as the first operation of the execution of that statement.
Every user-defined name explicitly referenced in a COBOL source program must be uniquely referenced because either:
These higher level names are called qualifiers and the process that specifies uniqueness is called qualification. Identical user-defined names may appear in a source program; however, uniqueness must then be established through qualification for each user-defined name explicitly referenced, except in the case of redefinition. All available qualifiers need not be specified so long as uniqueness is established. Reserved words naming the special registers require qualification to provide uniqueness of reference whenever a source program would result in more than one occurrence of any of these special registers. A paragraph-name or section-name appearing in a program may not be referenced from any other program.
Regardless of the above, the same data-name must not be used as the name of an external record and as the name of any other external data item described in any program contained within ocontaining the program which describes that external data record. The same data-name must not be used as the name of an item possessing the global attribute and as the name of any other data item described in the program which describes that global data item.
An exception regarding the qualification requirement is made with respect to the operand of a REDEFINES clause because its position within the hierarchical structure of the Data Division implicitly supplies any qualification that might be needed.
In the hierarchy of qualification, names associated with a level indicator are the most significant, followed by names associated with level-number 01, followed by names associated with level-numbers 02, . . ., 49. The name of a conditional variable may be used as a qualifier for any of its condition-names.
Qualification is performed by following a data-name, condition-name, LINAGE-COUNTER, screen-name, split-key-name, or by one or more phrases made up of a qualifier preceded by IN or OF.IN and OF are logically equivalent.
Format 1:Qualification for Data-Names and Condition-Names
Format 2:Qualification for LINAGE-COUNTER
Format 3:Qualification for Screen-Names
Format 4:Qualification for Split-Key-Names
The rules for qualification are as follows:
COBOL Related Interview Questions
|VSAM Interview Questions||IBM - VSAM Interview Questions|
|IBM-CICS Interview Questions||JCL Interview Questions|
|IBM DB2 Interview Questions||IBM-JCL Interview Questions|
|DB2 Using SQL Interview Questions||IBM-JCL&VSAM Interview Questions|
|IBM Mainframe Interview Questions||COBOL, CICS, JCL, VSAM, DB2 Interview Questions|
|DB2 SQL Programming Interview Questions||IMS/DB Interview Questions|
|Mainframe DB2 Interview Questions|
Procedure Division Statements
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.