z/OS MVS JCL Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example: using JCL symbols

z/OS MVS JCL Reference
SA23-1385-00

Suppose that processing for some JCL is charged to multiple departments, all with different accounting numbers, and the JCL is to reflect the number of the department to be charged for the processing.

Code a symbol in the source JCL to represent the different account numbers:
ACCT=&ACCTNO
Assume that the source JCL is a started task named TEST. There are three departments (A, B, and C) with three accounting codes (ACODE, BCODE, and CCODE) respectively. You can have each department indicate its accounting code on the START command. For example, when department A enters the following command:
START TEST,ACCTNO=ACODE

The system places the ACODE value in the ACCTNO field.

You can also use symbols to set default values that can later be overridden (as needed).

For example, if the procedure TEST has the following JCL coded:
ACCT=&ACCTNO
you can set the value of ACCT to ACODE by including the following JCL on the PROC statement of procedure TEST:
ACCTNO=ACODE

ACODE is provided as the default value.

If another value is provided on the START command (for example, START TEST, ACCT=BCODE), the new value (BCODE) overrides the default (ACODE) provided in the JCL, but only for this instance of the started task. If the START command is entered again without a value, the default will again be provided.

Note: This example modifies the step-level accounting data defined by the EXEC statement ACCT parameter. The START command JOBACCT parameter can be used to specify job-level accounting data.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014