LINES Parameter

Purpose

The LINES parameter specifies the maximum number of lines of SYSOUT data that a job can produce. It provides a means to limit job output volume, helping to prevent runaway jobs from producing excessive output and consuming system resources. This parameter is part of JES2 and JES3 job control and resource management.

Syntax

JOB Statement Format

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

Alternate Format (JES2 Only)

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

Parameter Values

maximum

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

warning

  • The number of lines 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 line 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,LINES=5000

This job will be terminated if it produces more than 5000 lines of SYSOUT data.

With Warning Threshold

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

This job has a maximum limit of 20,000 lines, with a warning issued at 10,000 lines.

JES2 With Action Specification

jcl
1
2
//TESTJOB JOB (ACCT),'JOHN DOE',CLASS=A, // MSGCLASS=X,LINES=(50K,30K,WARNING)

This job will issue a warning at 30,000 lines and another at 50,000 lines but will continue running.

Unlimited Lines

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

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

Parameter Interactions

Relationship with Other Resource Parameters

The LINES parameter is one of several JOB statement resource limit parameters. It can be used in conjunction with:

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

Parameter Hierarchy

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

Implementation Details

JES2 Implementation

  • In JES2, the LINES parameter can be specified with three values
  • The third value (action) is unique to JES2
  • JES2 tracks SYSOUT data lines at the job level
  • The OUTLIM parameter on DD statements can override the job-level limit for specific outputs

JES3 Implementation

  • In JES3, only the maximum and warning values can be specified
  • JES3 always terminates the job when the maximum value is reached
  • JES3 may impose installation-defined limits regardless of the LINES parameter

Measurement Method

  • The line count includes all SYSOUT data produced by the job
  • This includes printed output, job logs, and system messages directed to SYSOUT
  • The count does not include:
    • Data written to disk or tape data sets
    • JCL statements
    • System overhead data

Practical Applications

Common Use Cases

  • Report Generation Jobs: Setting appropriate limits for jobs that generate reports to prevent excessive output if selection criteria are too broad
  • Log Analysis Jobs: Preventing runaway output when processing large log files
  • Data Extract Jobs: Limiting the amount of data extracted to SYSOUT when debugging or sampling
  • Testing and Debugging: Using lower LINES limits during testing to catch potential issues
  • Production Control: Setting standard limits for all production jobs to ensure consistent resource usage

Finding an Appropriate Limit

Consider these factors when setting LINES limits:

  1. Historical output volume for the job
  2. Available spool space in your JES environment
  3. Expected growth in data volumes over time
  4. Critical nature of the job (critical jobs might need higher limits)
  5. Print infrastructure capacity and constraints

Troubleshooting

Common Issues

IssuePossible Solution
Job terminated due to LINES limitIncrease the LINES limit if the output is legitimate, or fix the application if it's producing excessive output
No warning before job terminationAdd a warning value to get notified before the job is terminated
Job not producing expected outputCheck if a restrictive LINES limit is causing the job to terminate early
Inconsistent behavior between systemsCheck for different JES2/JES3 settings or installation-defined limits on different systems

Messages and Codes

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

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

Best Practices

  1. Always specify a LINES limit for jobs that produce significant output
  2. Include a warning threshold when possible to get advance notice
  3. Set reasonable limits based on the job's normal output patterns
  4. Use with other resource parameters (BYTES, PAGES) for comprehensive control
  5. For long-running or critical jobs, consider using WARNING action instead of CANCEL
  6. Document the expected output volume in job documentation
  7. Review and adjust limits periodically as application needs change
  8. Consider writing output to datasets instead of SYSOUT for large volumes of data

Related Concepts