Previous topic |
Next topic |
Contents |
Glossary |
Contact z/OS |
PDF
JCL DD statements: Advantages of using symbolic names Reusable JCL collection |
|
When you use symbolic names to identify individual DD statements in JCL, you can improve the reusability of programs. Here's how it works. When you use symbolic names for DD statements in JCL, you can improve the reusability of programs by changing data set information without having to recompile the programs that access the data set. For example, suppose that your company uses a payroll program to record its employees' pay. Each month, you have to run the program to update pay records, using a different data set each time. In the program code, the program uses the name "PAY" to refer to the data set. Instead of changing the program each month to use a different data set name, you can use "PAY" as the label in the name field (or ddname) for the JCL DD statement that identifies the payroll data set to be used. So instead of changing and recompiling the payroll program, you make only minor changes to your JCL. The first time you run the program, your JCL looks like the JCL in Figure 1.
The next time, when the payroll data set changes to DIV1.PAYROLL, you change
only the DSN parameter value on the DD statement, and the payroll program
can continue to use the same ddname (PAY). Your JCL now looks like the JCL
in Figure 2.
The ddname connects
a program reference to a data set to the data set description (that is, the
DD statement) in the JCL. So the ddname "PAY" is a symbolic name that
the payroll program uses, and the DSNAME parameter in the JCL identifies the
real name of the data set.
The use of symbolic file names is another defining characteristic of the z/OS® operating system. It applies a naming redirection between a data set-related name used in a program and the actual data set used during execution of that program. This redirection allows the program to be used to process different input data sets simply by changing the DSNAME in the JCL. This ability becomes significant for large commercial applications that might use dozens of data sets in a single execution of the program. The format for coding program references depends on the language in which
the program is written. For example:
IBM® reserves
the following list of DD names for optional, special-function DD statements:
|
Copyright IBM Corporation 1990, 2010
|