Error MODEL HAS INVALID SYMBOL %
search cancel

Error MODEL HAS INVALID SYMBOL %

book

Article ID: 189737

calendar_today

Updated On:

Products

Database Analyzer for DB2 for z/OS

Issue/Introduction

Using % pattern matching in a LISTDEF statement in a customized REORG model results in the following error when generating the action JCL:

    ===> 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?

Cause

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.

Resolution

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.

Additional Information

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. 

https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-mainframe-software/database-management/ca-database-analyzer-for-db2-for-z-os/20-0/reference/model-jcl/processing-considerations/set-const-percent-xx-statement.html

2. In the Symbolic Variable Syntax section of the Symbolic Variables chapter.

https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-mainframe-software/database-management/ca-database-analyzer-for-db2-for-z-os/20-0/reference/symbolic-variables/symbolic-variable-syntax.html