Previous Topic

Next Topic

Book Contents

Book Index

%%SET

A %%SET control statement sets the values of user-defined variables. The statement may be placed in any part of the JCL stream.

The format of the statement is:

%%SET %%varname=expression

where:

Example 1

%%SET %%BACKUP_UNIT=TAPE

User-defined variable %%BACKUP_UNIT is assigned the value TAPE.

Example 2

%%SET %%BACKUP_UNIT_%%WDAY=EE%%OMONTH.%%ODAY

On Monday, 24th of September, user-defined variable %%BACKUP_UNIT_1 is assigned the value EE0924.

Example 3

//* %%SET %%SCRATCH=%%SCRATCH %%PLUS 1

//SYSUT1 DD UNIT=TAPE,VOL=SER=EE%%SCRATCH,DISP=...

When the initial value of SCRATCH is 3017, the result in the submitted member is:

//* %%SET %%SCRATCH=3017 %%PLUS 1

//SYSUT1 DD UNIT=TAPE,VOL=SER=EE3018,DISP=...

Parent Topic

Control Statements