REGION Parameter

Purpose

The REGION parameter in JCL specifies the amount of main storage (memory) to be allocated to a job or job step. It limits the amount of virtual storage available to programs executing within a job step. REGION can be specified at both the JOB level (affecting all steps) and the EXEC level (for individual steps).

Syntax

On JOB statement:

jcl
1
//jobname JOB (accounting-information),programmer-name,REGION=value

On EXEC statement:

jcl
1
//stepname EXEC PGM=program-name,REGION=value

Format

The REGION parameter can be specified in several formats:

  • nK - Kilobytes (1K = 1,024 bytes)
    • Example: REGION=4K (4 kilobytes)
  • nM - Megabytes (1M = 1,048,576 bytes)
    • Example: REGION=2M (2 megabytes)
  • nG - Gigabytes (1G = 1,073,741,824 bytes) - on newer systems
    • Example: REGION=1G (1 gigabyte)
  • 0K or 0M - Special values that request the maximum available region size
    • Example: REGION=0M (maximum available region)

Examples

Basic Usage on JOB Statement

jcl
1
//PAYROLL JOB (ACCT123),'JOHN SMITH',REGION=4M

Allocates 4 megabytes of memory for all steps in the job

Basic Usage on EXEC Statement

jcl
1
//STEP1 EXEC PGM=IEBGENER,REGION=8M

Allocates 8 megabytes of memory for this specific step

Maximum Region Size

jcl
1
//BIGSTEP EXEC PGM=SORT,REGION=0M

Requests maximum available region size for this step

Step Override

jcl
1
2
3
4
//PAYROLL JOB (ACCT456),'JANE DOE',REGION=2M //STEP1 EXEC PGM=PROG1 //STEP2 EXEC PGM=PROG2,REGION=6M //STEP3 EXEC PGM=PROG3

STEP1 and STEP3 use the JOB-level REGION of 2M, while STEP2 overrides with 6M

Memory Allocation

The REGION parameter controls two types of storage allocation:

  • Below the 16MB line - Traditional 24-bit addressable storage
    • Limited to approximately 16MB maximum
    • Used by older programs and system services
  • Above the 16MB line - Extended 31-bit addressable storage
    • Can go up to 2GB or higher depending on system configuration
    • Used by most modern programs

System Considerations

  • The actual maximum REGION size is installation-dependent
  • Values are often limited by system settings in SMFPRMxx (IEFUSI exit)
  • Specifying REGION=0K or REGION=0M requests the maximum region size allowed
  • The REGION parameter affects virtual storage, not real storage (physical memory)
  • Region size limits may be enforced by:
    • JES2/JES3 initialization parameters
    • IEFUSI installation exit
    • System resource manager settings
    • Workload Manager (WLM) service definitions

JCL EXEC vs JOB REGION

LevelEffectOverride
JOB statement REGIONApplies to all steps in the jobCan be overridden at the EXEC level
EXEC statement REGIONApplies only to the specific stepTakes precedence over JOB level REGION

Typical REGION Sizes

SizeTypical Use
512K - 2MSmall utility programs (IEFBR14, IDCAMS for simple operations)
4M - 8MMedium-sized batch programs, compilers
16M - 32MLarge batch programs, database utilities
64M - 128MVery large applications, sort programs with large datasets
0M (maximum)Memory-intensive applications, unpredictable memory needs

REGION vs MEMLIMIT

In modern z/OS environments, two parameters control memory allocation:

  • REGION - Controls virtual storage in the traditional address spaces (up to 2GB)
  • MEMLIMIT - Controls 64-bit addressable storage (above the 2GB bar)
    • Used for 64-bit applications and very large memory requirements
    • Can specify much larger values (terabytes)

Notes

  • REGION is optional - if omitted, an installation-defined default is used
  • Specifying too small a REGION can cause S80A (REGION) abends
  • Specifying too large a REGION can be wasteful and may be rejected by the system
  • REGION=0M requests the maximum REGION size but may be limited by installation settings
  • The actual amount of memory used depends on the program's requirements
  • For large memory needs above 2GB, consider using the MEMLIMIT parameter
  • Some installations may enforce REGION size limits for different job classes

Common Mistakes

  • Specifying insufficient REGION size, causing S80A (OUT OF STORAGE) abends
  • Using outdated REGION specifications that don't account for modern program requirements
  • Specifying unnecessarily large REGION values, potentially impacting system performance
  • Not considering 64-bit addressing needs with MEMLIMIT for newer applications
  • Assuming REGION controls real memory usage rather than virtual memory limits

Related Concepts

Related Pages