Because your ILE COBOL programs can be run as separate threads within a job, be aware that language elements might be interpreted in two ways:
These two types of scope are important in two contexts:
The following table summarizes the reference and state scope of various ILE
COBOL language elements:
Language Element | Reference Scope | State Scope |
---|---|---|
ADDRESS-OF special register | Same as associated record | Program invocation instance |
DB-FORMAT-NAME special register | Run-unit | Program invocation instance |
DEBUG-ITEM special register | Syntax checked only | |
Files | Run-unit | Run-unit |
FORMAT OF special register | Same as associated identifier | Same as associated identifier |
Index data | Program | Program invocation instance |
LENGTH OF special register | Same as associated identifier | Same as associated identifier |
LINAGE-COUNTER special register | Same as associated file | Same as associated file |
LINKAGE-SECTION data | Run-unit | Based on scope of underlying data |
LOCALE OF special register | Same as associated identifier | Same as associated identifier |
RETURN-CODE | Run-unit | Program invocation instance |
WHEN-COMPILED special register | Run-unit | Run-unit |
WORKING-STORAGE data | Run-unit | Run-unit |
SORT-RETURN special register | Run-unit | Program invocation instance |
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.