Output Limitation Support

In line with mainframe practice, you can limit the amount of output sent to SYSOUT datasets. You can apply limits to the whole job by giving a value in the JCL job card. You can set global limits for the number of lines output using environment variables.

Limits to LINES, PAGES, CARDS, and BYTES

The LINES, PAGES, CARDS, and BYTES keyword parameters on the JCL job card are supported. PAGES, CARDS and BYTES are translated to a number of lines using the following values:

  • 60 LINES for every PAGE
  • 25 LINES for every CARD
  • 132 BYTES for every LINE

For example, an entry of PAGES=(100,CANCEL) on the job card equates to an output limit of 6000 lines before the job is cancelled.

Specifying limits with the OUTLIM parameter

Any SYSOUT DD statement can contain an OUTLIM parameter that specifies the maximum number of lines output to that dataset. When the limit has been reached the system will:
  • call the user exit, if it exists
  • process the global setting, if it exists
  • Abend the step with S722 abend code

The OUTLIM value is ignored for SYSABEND, SYSMDUMP and SYSUDUMP datasets.

The user may implement an OUTLIM user exit to call if the output limit is reached. This can tell the system whether to continue or abend the job. The user exit program must be called MFJUSOXT, a sample of which is included in the source\enterpriseserver\exits folder of your product.

Specifying global limits with environment variables

Global limits are set by environment variables, either in the environment in which the enterprise server region was started or by entering the values in the enterprise server region's configuration settings. These values apply to all jobs that run in that region.

The format of the variable value is similar to that which would be entered in the JCL job card accounting information: it should contain the limit value and, optionally, the action to perform when that limit is reached:

ES_JES_***=NUMBER | (NUMBER,WARNING | CANCEL | DUMP)

Where:

  • Where *** can be one of LINES, PAGES, CARDS, BYTES, or OUTLIM
  • The actions you can specify are CANCEL, DUMP or WARNING. WARNING is the default action.
  • CANCEL and DUMP cause the job to abend at that point, WARNING issues a message but processing continues. If you give no action for LINES, PAGES, CARDS, and BYTES the system issues a warning and continues processing. If you give no action for OUTLIM, the default action is to issue a warning.
  • If set to WARNING, then the warning message JCLCM0010W is repeated for every multiple of the value. For example, ES_JES_PAGES=10 issues a warning every 600 lines of SYSOUT in the job.

Note that the behavior described here applies to the ES_JES_OUTLIM environment variable, and not to the OUTLIM parameter on the DD statement. If the OUTLIM parameter on a DD statement is exceeded, the default action specified in the ES_JES_OUTLIM environment variable will be performed. If no action is specified, a warning will be issued.

The OUTLIM parameter on a DD statement can be used to override the VALUE defined by the ES_JES_OUTLIM environment variable, but not to override the action on ES_JES_OUTLIM. So, if ES_JES_OUTLIM=50000,CANCEL then OUTLIM=100000 on the DD statement allows the job step to write 100,000 lines to SYSOUT before cancelling the job.

Environment Variable Value Range Example
ES_JES_LINES 0-99999999
ES_JES_LINES=(100,CANCEL)
Limit the number of lines output to 100000. When this limit is reached cancel the job. This results in an S722 Output limit exceeded system abend code being produced.
ES_JES_PAGES 0-99999999
ES_JES_PAGES=10
Each page is assumed to hold 60 lines, therefore when 600 lines (60×10) have been processed issue a warning and carry on.
ES_JES_CARDS 0-99999999
ES_JES_CARDS=(30,WARNING)
Each card is assumed to hold 25 lines, therefore at 750 lines (25×30) issue a warning message and carry on.
ES_JES_BYTES 0-999999
ES_JES_BYTES=(100,DUMP)
Value for bytes is in thousands, each line is assumed to hold 132 bytes, therefore at 100000/132 lines the job will be cancelled.
ES_JES_OUTLIM 1-16777215
ES_JES_OUTLIM=5000
When the above is set, a warning will be issued when 5000 lines of output is exceeded.
ES_JES_OUTLIM=(1000,CANCEL)
When the above is set, it causes a step to abend with an S722 abend code if the output limit of any SYSOUT dataset exceeds 1000 lines. Individual OUTLIM values can be set on each SYSOUT dataset. For example, //SYSPRINT DD SYSOUT=*,OUTLIM=500.

If the output of SYSPRINT exceeds 500 lines and ES_JES_OUTLIM=(1000,CANCEL) then the step will be cancelled with an S722 abend code.