Sign in

docs ILE Concepts

Call-Level Scoping

Call-Level Scoping

Call-level scoping occurs when the data management resource is connected to the call stack entry that created the resource. Figure 1 shows an example. Call-level scoping is usually the default scoping level for programs that run in the default activation group. In this figure, OPM program A, OPM program B, or ILE procedure P2 may choose to return without closing their respective files F1, F2, or F3. Data management associates the ODP for each file with the call-level number that opened the file. The RCLRSC command may be used to close the files based on a particular call-level number passed to that command.

Figure 1. Call-Level Scoping. ODPs and overrides may be scoped to the call level.

Overrides that are scoped to a particular call level are deleted when the corresponding call stack entry returns. Overrides may be shared by any call stack entry that is below the call level that created the override.