Previous Topic

Next Topic

Book Contents

Book Index

Introduction to AutoEdit Control Statements and Functions

  1. Edit the JCL of IDJOB6, delete the previously added comment lines, and add the following comment lines in their place. Do NOT exit the JCL.

    //* %%SET %%A=%%$CALCDTE %%$ODATE -1

    //* THE VALUE OF A IS: %%A

    You can now examine the components of the preceding %%SET statement.

%% SET

where %%SET is an AutoEdit control statement.

Control statements are used to define the AutoEdit environment, and to control AutoEdit processing, in the JCL. Control statements can appear anywhere in the JCL member to be submitted. When a control statement is detected in a JCL line, for example, in a JCL remark statement, the line containing the control statement is submitted as part of the job. If the control statement appears in a non-JCL line, for example, in a line beginning without a // symbol, the control statement is resolved and the resolved value can be applied to subsequent JCL lines, but the control statement is not submitted as part of the job.

Control statement %%SET sets values of user-defined variables. The format of the statement is:

%%SET %%varname=expression

where:

%%A

%%A is a user-defined AutoEdit variable.

Unlike system variables whose names and meanings are predefined and recognized by Control-M, user-defined variables are defined by the user. You could just as easily have called this variable %%FRED or, if you wanted a more meaningful name, %%BACKDATE.

%%$CALCDTE

%%$CALCDTE is an AutoEdit function. Like system variables, AutoEdit functions are predefined and have set meanings. In the JCL, AutoEdit functions can only be specified in a %%SET control statement.

Function %%$CALCDTE performs date manipulation by adding or subtracting a specified number of days from a specified date.

Parent Topic

AutoEdit and JCL