PAGES Parameter

Purpose

The PAGES parameter specifies the maximum number of pages of SYSOUT data that a job can produce. It helps control output volume and prevents runaway jobs from generating excessive output that could overwhelm print resources. This parameter is part of JES2 and JES3 resource management.

Syntax

JOB Statement Format

jcl
1
//jobname JOB parameters,PAGES=(maximum[,warning])

Alternate Format (JES2 Only)

jcl
1
//jobname JOB parameters,PAGES=([maximum][,warning][,action])

Parameter Values

maximum

  • The maximum number of pages of SYSOUT data the job can produce
  • Valid values:
    • Integer from 1 to 9999999
    • Followed by K (thousands) or M (millions)
    • Examples: 100, 5K, 2M
  • The job will be terminated if this limit is exceeded
  • Special value: 0 - indicates no limit

warning

  • The number of pages at which a warning message is issued to the operator
  • Must be less than or equal to the maximum value
  • Same format as maximum (integer with optional K or M suffix)
  • If omitted, no warning message is issued

action (JES2 Only)

  • Specifies the action to take when the maximum page limit is reached
  • Valid values:
    • CANCEL - Terminate the job (default)
    • DUMP - Terminate the job with a dump
    • WARNING - Issue a warning message but allow the job to continue

Usage Examples

Basic Maximum Limit

jcl
1
2
//TESTJOB JOB (ACCT),'JOHN DOE',CLASS=A, // MSGCLASS=X,PAGES=1000

This job will be terminated if it produces more than 1000 pages of output.

With Warning Threshold

jcl
1
2
//TESTJOB JOB (ACCT),'JOHN DOE',CLASS=A, // MSGCLASS=X,PAGES=(5K,3K)

This job has a maximum limit of 5,000 pages, with a warning issued at 3,000 pages.

JES2 With Action Specification

jcl
1
2
//TESTJOB JOB (ACCT),'JOHN DOE',CLASS=A, // MSGCLASS=X,PAGES=(10K,7K,WARNING)

This job will issue a warning at 7,000 pages and another at 10,000 pages but will continue running.

Unlimited Pages

jcl
1
2
//TESTJOB JOB (ACCT),'JOHN DOE',CLASS=A, // MSGCLASS=X,PAGES=0

This job has no limit on the number of output pages it can produce.

Page Definition

How Pages are Counted

The definition of a "page" in JES context depends on several factors:

  • Line-mode output: Pages are counted based on form control specifications such as skip-to-channel-1 (new page) commands
  • AFP/Page-mode output: Each formatted page is counted as one page
  • Default behavior: If no form control is specified, JES typically counts based on a default page size (e.g., 60 lines per page)
  • FORMDEF/PAGEDEF: When Advanced Function Presentation (AFP) is used, these resources can affect page boundaries

Note:

Page counting may vary between JES2 and JES3, and installations may have customized definitions. Check your installation's documentation for specific details on page accounting.

Parameter Interactions

Relationship with Other Resource Parameters

The PAGES parameter is one of several JOB statement resource limit parameters that can be used together:

ParameterFunction
LINESLimits the total lines of output data
BYTESLimits the total bytes of output
CARDSLimits the number of input cards (JES2 only)
REGIONLimits the memory allocation for each step
TIMELimits the CPU time for the job

Enforcement Hierarchy

When multiple output limiting parameters (PAGES, LINES, BYTES) are specified, the job will be terminated when any one of the limits is reached first.

Implementation Details

JES2 Implementation

  • In JES2, the PAGES parameter can be specified with three values
  • The third value (action) is unique to JES2
  • JES2 tracks page counts at the job level
  • Output descriptors or DD statement parameters may override job-level settings

JES3 Implementation

  • In JES3, only the maximum and warning values can be specified
  • JES3 always terminates the job when the maximum value is reached
  • Page counting may be affected by JES3 installation parameters

Practical Applications

Common Use Cases

  • Report Generation Jobs: Setting page limits for report output, particularly for large reports
  • Production Printing: Ensuring print jobs don't exceed physical printer capacity or paper availability
  • Application Testing: Limiting output during testing phases to prevent excessive output due to errors
  • Resource Management: Preventing individual jobs from monopolizing printing resources
  • Cost Control: Managing page output to control printing costs in environments where charging is page-based

Determining Appropriate Limits

Consider these factors when setting PAGES limits:

  1. Normal output volume for the specific job
  2. Available printer capacity and paper resources
  3. Business requirements for the output
  4. Historical data on page usage patterns
  5. Print scheduling and resource allocation policies

Troubleshooting

Common Issues

IssuePossible Solution
Job terminated due to PAGES limitIncrease the PAGES limit if the output is necessary, or modify the application to reduce output
Inconsistent page counting between environmentsCheck page definitions and form control settings; may need to adjust limits for different environments
Advanced formatting affecting page countsWhen using FORMDEF/PAGEDEF resources, ensure page definitions align with resource definitions
Incomplete output due to page limitationsUse the WARNING action in JES2 for critical jobs to ensure complete output even if limits are exceeded

Messages and Codes

When a job exceeds its PAGES limit, you may see messages like:

  • $HASP375 JOBNAME ESTIMATED PAGES EXCEEDED (JES2)
  • IAT1600 JOB JOBNAME CANCEL REQUESTED BY PAGES ESTIMATION ROUTINE (JES3)

Best Practices

  1. Use realistic PAGES limits based on the job's normal output patterns
  2. Always include warning thresholds to provide advance notice before job termination
  3. Consider using LINES instead of or with PAGES for more predictable output control
  4. For AFP/page-mode output, ensure page definitions align with how JES counts pages
  5. For critical jobs, use the WARNING action in JES2 environments rather than CANCEL
  6. Monitor output patterns over time and adjust limits as application behavior changes
  7. Use OUTDES statements for fine-grained control of output characteristics
  8. Consider writing large output to datasets instead of SYSOUT for large volumes of data

Related Concepts