By default, Control-M must resolve all AutoEdit terms in the JCL or the job is not submitted. This default can be overridden by specifying an appropriate %%RESOLVE statement in the JCL.
Valid %%RESOLVE statements are:
Table 258 %%RESOLVE Statements
Statement |
Description |
---|---|
%%RESOLVE NO |
Try to resolve AutoEdit terms. If an AutoEdit term cannot be resolved, submit the job with the AutoEdit term as is. |
%%RESOLVE YES %%RESOLVE MUST %%RESOLVE (blank) |
If YES, MUST or blank is specified and a subsequent AutoEdit term cannot be resolved, the job is not submitted. |
%%RESOLVE OFF |
Do not try to resolve AutoEdit terms except for other %%RESOLVE statements. Submit the job with AutoEdit terms as is. |
Each %%RESOLVE statement remains in effect until the next %%RESOLVE statement in the JCL is encountered. |
|
The following special case %%RESOLVE statement is relevant if %%GLOBAL AutoEdit members are loaded to cache. |
|
%%RESOLVE ALLCACHE {OFF | ON} |
If an AutoEdit variable has not been resolved by searching the %%GLOBAL or %%LIBSYM/%%MEMSYM members identified in the job, the %%RESOLVE ALLCACHE statement instructs Control-M to continue the variable resolution process by checking all members loaded into cache. Members in cache are searched in the same sequence they are listed in the cache list member. A %%RESOLVE ALLCACHE statement without an ON or OFF qualifier can only be specified as the first non-comment statement in the cache list member used to load %%GLOBAL or %%LIBSYM/%%MEMSYM members to cache. For more information, see Loading Members to Cache. A %%RESOLVE ALLCACHE statement with an ON or OFF qualifier can be specified anywhere in the JCL of the job. It overrides the most current %%RESOLVE ALLCACHE function, as follows:
|
Note: When used in a Control-M SETVAR job definition, the format of the %%RESOLVE statement should be: %%RESOLVE=value.
Example:
Suppose you have a variable %%VAR1, and you want to check whether it has been defined and, if not, set a default value for it. For this scenario, use the following code:
%%RESOLVE NO
//* %%SET %%A=%%SUBSTR %%VAR1 1 2
//* %%IF %%A EQ %%
//* %%SET %%VAR1=default-value
//* %%ENDIF
%%RESOLVE YES
With %%RESOLVE NO, the %%SUBSTR function will return a value of ‘%%’ when the variable is not defined, in which case the %%IF/%%SET will define the variable and provide it with a default value.
Parent Topic |