Skip to main content

This article explains how to change the file size of the external file SYSOUT.

Problem:

We are using the Compiler Directive outDD ( SYSOUT_abc 132 L ) to collect the output of display statements but after a few weeks the SYSOUT_abc file becomes more than 4 Gigabytes and results in an error. To resolve this, we removed or renamed the SYSOUT_abc file(s) so a new one is being used. The physical name of a SYSOUT file can be assigned dynamically just like any other COBOL file, but how can this be done?

Resolution:

SYSOUT is an external file so its name can be changed by setting the value of the SYSOUT environment variable (or whatever name has been specified in the outdd directive.) The example below will direct output to two files.

set sysout=fred

run x.int

set sysout=bert

run x.int

Old KB# 14597

#EnterpriseDeveloper
#MFDS