Using % pattern matching in a LISTDEF statement in a customized REORG model results in the following error when generating the action JCL via Database Analyzer for Db2 for z/OS (PDA):
===> ERROR *** LIB: 'model_library_name'
INVALID CHARACTER STRING == IN CONTROL STATEMENT
===> ERROR *** MEM: model_member_name
===> ERROR MODEL HAS INVALID SYMBOL
===> ERROR **********************************
The error occurs when using % pattern matching. For example:
LISTDEF REORGTS
INCLUDE TABLESPACE dbname.%
When using * pattern matching the error does not occur and the action JCL is correctly generated. For example:
LISTDEF REORGTS
INCLUDE TABLESPACE dbname.*
Both % and * are supported characters for DB2 pattern matching so why does using % result in the error?
PDA uses the % character as a prefix for its symbolic variables in model processing. So PDA is treating the % as a user-defined symbolic variable.
To resolve this you will need to specify two percent signs (%%), for example
LISTDEF REORGTS
INCLUDE TABLESPACE dbname.%%
This will stop PDA from interpreting the single % as a symbolic variable. The action JCL should then be generated with the desired single % character.
The use of the percent sign % in model JCL is documented in two places in the PDA Reference Guide documentation.
1. In the Processing Considerations section of the Model JCL chapter.
2. In the Symbolic Variable Syntax section of the Symbolic Variables chapter.