GDDM V3R2 Base Application Programming Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


How to free resources when a task terminates

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



MVS provides full task-management facilities, one feature being that when a task terminates, all the resources obtained by that task, and by any subtasks that it might have, are freed. This applies to virtual storage, files, and enqueue requests.

If you are using MVS, and not taking advantage of its tasking facilities, or if you are using VM, which does not have this feature, you can use a GDDM call to group one or more applications into an application group. Using the ESACRT call in your task manager program creates an application group and makes it current. All instances of GDDM that are initialized are associated with the current application group. Using the ESADEL call causes GDDM to issue an internal FSTERM for each instance of GDDM associated with the specified application group. Storage, files, and enqueue requests owned by all the instances are therefore freed.

When control is passed from an instance of GDDM in one application group to an instance of GDDM in a different application group, neither instance having terminated, you can use the ESAQRY call to save the current application group, and use the ESASEL call to make the target application group current.

If you are using MVS real-tasking facilities, you should not use the ESAxxx group of calls. If you do, GDDM may try to release resources that have already been released by MVS.

See the GDDM Base Application Programming Reference book for a description of each call.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012