Extract Utility User's Guide - Supra - Cincom

Extract Utility User's Guide - Supra - Cincom Extract Utility User's Guide - Supra - Cincom

11.07.2015 Views

Setting the z/OS STACK parameterWhen you code the STACK parameter, you set aside an area of memory calledthe stack/heap for Extract to use. The stack/heap has two areas, theProcedure Call Stack and the Dynamic Memory Heap, as shown in the followingfigure:Stack0(Unused)Heapxxx KAs the figure shows, the stack starts at the beginning of the area. It storessome run-time information and all global variables. In addition, when eachprocedure starts, it allocates an area on the stack to store its local variables,and call and return information.As the procedure calls more nested procedures, the stack grows larger. As thenested procedures return, the stack grows smaller. Thus, the size of the stackdepends on the levels of nesting in the procedure calls, and the number andsize of the procedures' parameters and local variables. As the stack gets larger,it allocates space toward the heap area.The heap is the area that Extract dynamically allocates at run-time. Here,Extract stores internal context information, that is, variables that are notstored in the stack area. When Extract no longer needs the space, it is freed.As an area is freed, it can be reallocated. Thus, this area varies in size. When aprocedure allocates the first heap area, it starts at the end of the space. Whena procedure allocates a new area, it takes the new area from the space closerto the stack. As the following figure shows, when the stack and heap getlarger, the unused space between them gets smaller:Stack0(Unused)Heapxxx KExtract Utility User's Guide, P25-9513-03 26Chapter: 3. Executing the Extract utilitySection: Choosing run-time options in z/OS

Estimating the size of the stack/heapBecause the size of the stack/heap varies, it is difficult to provide reliableestimates or formulas to determine the size. It is best to use the STACK valueof at least 400K. If this number proves to be insufficient, increase it as neededuntil Extract runs successfully.You know when the size is too small because you receive an error message andan abend code at run-time. The message states that the stack and heap havecollided; that is, they are out of memory.To estimate how much larger to make the stack, consider the level ofcomplexity in the UCL program. Complex tasks require more space. Forexample, if the files from which you extract data have extraordinarily largelogical records, you may discover you need to increase the STACK value.Because the heap area is allocated dynamically, its size varies more than thestack and is harder to predict. The heap gets larger as the UCL gets morecomplex. The size of the heap depends on the number of control blocks Extractcreates for internal use.Extract Utility User's Guide, P25-9513-03 27Chapter: 3. Executing the Extract utilitySection: Choosing run-time options in z/OS

Setting the z/OS STACK parameterWhen you code the STACK parameter, you set aside an area of memory calledthe stack/heap for <strong>Extract</strong> to use. The stack/heap has two areas, theProcedure Call Stack and the Dynamic Memory Heap, as shown in the followingfigure:Stack0(Unused)Heapxxx KAs the figure shows, the stack starts at the beginning of the area. It storessome run-time information and all global variables. In addition, when eachprocedure starts, it allocates an area on the stack to store its local variables,and call and return information.As the procedure calls more nested procedures, the stack grows larger. As thenested procedures return, the stack grows smaller. Thus, the size of the stackdepends on the levels of nesting in the procedure calls, and the number andsize of the procedures' parameters and local variables. As the stack gets larger,it allocates space toward the heap area.The heap is the area that <strong>Extract</strong> dynamically allocates at run-time. Here,<strong>Extract</strong> stores internal context information, that is, variables that are notstored in the stack area. When <strong>Extract</strong> no longer needs the space, it is freed.As an area is freed, it can be reallocated. Thus, this area varies in size. When aprocedure allocates the first heap area, it starts at the end of the space. Whena procedure allocates a new area, it takes the new area from the space closerto the stack. As the following figure shows, when the stack and heap getlarger, the unused space between them gets smaller:Stack0(Unused)Heapxxx K<strong>Extract</strong> <strong>Utility</strong> <strong>User's</strong> <strong>Guide</strong>, P25-9513-03 26Chapter: 3. Executing the <strong>Extract</strong> utilitySection: Choosing run-time options in z/OS

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!