<snip> I am abending on S0C4 because getmained areas are automatically being freed at end of step, before IEFACTRT gets control. It is not clear to me if SUBPOOL alone can solve the problem. Do I need to specify TCBADDR=TCBJSTCB on the STORAGE macro so that the "input TCB" is the job-step TCB? What course is recommended? </snip>
What is recommended is no different than for any program -- you need to understand your environment and the termination characteristics. If you obtained storage while the job is running, and that storage is owned by any task within the jobstep program task tree (i.e., the task tree with the EXEC PGM=xxxx task at the top), then that storage will have been freed if you then run after the termination of that jobstep program task (which is when IEFACTRT runs, I think). Perhaps what is recommended is that your IEFACTRT exit routine not rely on storage obtained within the jobstep program task tree. TCBJSTCB when running under the jobstep program task tree will not be of help. That is athe jobstep program task or a jobstep subtask of that task. You can identify the proper task or you can get storage in a subpool that is not owned by a task (LSQA). If you get such storage, then it is up to you to make sure it gets freed in a timely fashion; the system won't help until the ownership rules indicate that it should (e.g., end of address space for non-task-owned LSQA). <snip> The documentation says one can dynamically allocate within IEFACTRT but the BPXWDYN routine returns a non-zero return code. (Same code that works fine in a regular program.) Is this a limitation of BPXWDYN? Should I code an SVC 99 call myself? <snip> "Can dynamically allocate" is not the same as to "can use BPXWDYN". I would guess that you cannot use BPXWDYN except from within the jobstep program task tree. Why did you not post the return information from your BPXWDYN? That might have told you what the problem was, and would have helped the readers from having to guess. Peter Relson z/OS Core Technology Design ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN