The amount of space needed by a job or step can be specified in the REGION parameter of the JOB or EXEC statement. If REGION is on the JOB statement, each step of the job executes in the requested amount of space. If on the EXEC statements in a job, each step executes in its own amount of space. Use the EXEC statement REGION parameters when different steps need greatly different amounts of space.
The REGION parameter differs depending on whether the program uses virtual or central storage.
When the minimum requested length for a variable-length GETMAIN or the amount requested for a fixed-length GETMAIN exceeds this second value, the job or step abnormally terminates. See z/OS MVS Initialization and Tuning Guide and z/OS MVS Programming: Assembler Services Guide.
Region size for central (real) storage: When ADDRSPC=REAL is coded, the system establishes one value from the REGION parameter or the installation-defined default. The value is used as an upper boundary to limit region size for all GETMAINs.
Note that this is the minimum region for successful execution, but not necessarily the minimum region size for successful job completion. Programs executed in central storage should perform as much cleanup as possible before terminating.
//J28 JOB ,'F. GOLAZESKI',CLASS=D
//S1 EXEC PGM=PROGREAL,REGION=20K,ADDRSPC=REAL
//DD1 DD DSNAME=A.B.C,DISP=OLD
//S2 EXEC PGM=PROGVIRT,REGION=75K,ADDRSPC=VIRT
//DD2 DD DSNAME=MYDS2,DISP=OLD
This example shows how to request storage for a program that must not be paged and for a program that can be paged. Step S1 executes in central (real) storage, without paging, while step S2 executes in virtual storage, with paging.
//STEPA EXEC PROC=MYPROC8,REGION.FIRST=750K,
// REGION.SECOND=700K
This EXEC statement assigns space requests to two procedure steps, FIRST and SECOND, of a procedure named MYPROC8.
z/OS UNIX system services considerations: In z/OS UNIX System Services, callable service BPX1SRL lets a program modify its REGION size. Note that only superusers can increase their REGION size. See z/OS UNIX System Services Programming: Assembler Callable Services Reference for more information on the BPX1SRL callable service.