The ADDRSPC (address space) parameter specifies whether a job or job step runs in virtual storage (pageable) or real storage (non-pageable). This parameter controls how the system manages the memory allocation for the program being executed, which can impact performance and resource utilization.
12//jobname JOB parameters,ADDRSPC=VIRT //jobname JOB parameters,ADDRSPC=REAL
123//stepname EXEC PGM=program,ADDRSPC=VIRT //stepname EXEC PGM=program,ADDRSPC=REAL //stepname EXEC PROC=procname,ADDRSPC.procstep=VIRT
Value | Description |
---|---|
VIRT | The job or step executes in virtual (pageable) storage. This is the default value. Pages of virtual storage can be paged out to auxiliary storage when not actively being used. |
REAL | The job or step executes in real (non-pageable) storage. All pages required by the job or step will remain in central storage throughout execution (will not be paged out). |
If you omit the ADDRSPC parameter, the default is ADDRSPC=VIRT. This means the job or step will execute in virtual storage.
1//MYJOB JOB (ACCT),'JOHN DOE',CLASS=A,ADDRSPC=VIRT
Requests that all steps in the job execute in virtual storage (this is the default behavior)
1//STEP1 EXEC PGM=TIMECRIT,ADDRSPC=REAL,REGION=2M
Requests that STEP1 execute in real storage with a region size of 2MB
1234//MYJOB JOB (ACCT),'JOHN DOE',CLASS=A,ADDRSPC=VIRT //STEP1 EXEC PGM=PROGRAM1 //STEP2 EXEC PGM=TIMECRIT,ADDRSPC=REAL //STEP3 EXEC PGM=PROGRAM3
STEP1 and STEP3 will execute in virtual storage (as specified on the JOB statement), but STEP2 will execute in real storage (overriding the JOB statement)
1//STEP4 EXEC PROC=MYPROC,ADDRSPC.PROC1=REAL,ADDRSPC.PROC2=VIRT
The PROC1 step within MYPROC will execute in real storage, while the PROC2 step will execute in virtual storage
The ADDRSPC parameter dates back to MVS systems when real storage was a critically limited resource. In those earlier environments, the distinction between virtual and real storage allocation had significant performance implications. Programs that needed immediate response time or had time-critical sections would request real storage to avoid paging delays.
In modern z/OS environments, the parameter remains for compatibility but has less practical significance due to sophisticated system memory management, high-performance paging systems, and large real storage capacities. Most applications today run with ADDRSPC=VIRT.
Parameter | Relationship |
---|---|
REGION | Specifies the amount of storage requested. With ADDRSPC=REAL, it requests real storage; with ADDRSPC=VIRT, it requests virtual storage. |
MEMLIMIT | Controls the amount of virtual storage above the bar. Works with ADDRSPC=VIRT to define the total memory available to the program. |
EXEC parameters | ADDRSPC on EXEC overrides ADDRSPC on JOB for that specific step. |
1//STEP1 EXEC PGM=PROGRAM1,ADDRSPC=REAL // Not necessary for most applications
1//STEP1 EXEC PGM=PROGRAM1,ADDRSPC=REAL,REGION=100M // May request too much real storage