Note: You can use dynamic output in a JES2 environment or a JES3 4.2.1
or later environment.
Before a program writes to a system output (SYSOUT) data set, the
program must:
- Describe the processing options for the SYSOUT data set. This
means giving the system information such as what kind of print paper
to use, how many copies, how many lines on a page, and so forth.
- Allocate the data set.
- Open the data set.
The first step in the sequence, describing the SYSOUT processing
options for the data set, can be accomplished before the program executes
by using an OUTPUT JCL statement. However, by using dynamic output,
a program can describe its SYSOUT processing options during program
execution.
The second step in the sequence, allocating the data set, can also
be accomplished in two ways. Before execution, you can allocate by
using the DD JCL statement. During execution, you can allocate
by using dynamic allocation.
To accomplish both steps dynamically, use dynamic allocation with
dynamic output. When you use them together, the available processing
options are similar to the options available through the OUTPUT and
DD JCL statements. For example, you can use dynamic output with dynamic
allocation to describe the same SYSOUT characteristics
that you could describe by using the following JCL:
//OUT1 OUTPUT COPIES=10,DEST=FRANCE
//DD1 DD SYSOUT=A,OUTPUT=*.OUT1
Dynamic output has two advantages:
- Flexibility — Dynamic output lets the application
change the SYSOUT processing options based on input data to the application
when the application executes. It provides more flexibility than
the OUTPUT JCL statement, which requires you to specify the SYSOUT
processing options before the application executes.
- Convenience — Dynamic output allows you to write
your application program so that it changes your SYSOUT processing
options based on the input your program receives. This eliminates
the need to change your JCL OUTPUT statement for each of your SYSOUT
processing requirements.
Dynamic output affects only SYSOUT data sets. The programs that
invoke dynamic output can be authorized or unauthorized. To use dynamic output,
issue the OUTADD and OUTDEL macros.
For information on the OUTPUT JCL statement, see z/OS MVS JCL Reference.
For general information on JCL, see z/OS MVS JCL User's Guide.
Note: BPXWDYN is a text interface to a subset of the SVC 99 (dynamic
allocation) and SVC 109 (dynamic output) services. BPXWDYN supports
data set allocation, unallocation, concatenation, and the addition
and deletion of output descriptors. BPXWDYN is designed to be called
from REXX,
but it may be called from several other programming languages, including
Assembler, C, and PL/I. For more information, see
z/OS Using REXX and z/OS UNIX System Services.