Index filter using "LIKE"

 2 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Anur
Basic Member Send Private Message
Posts: 6
Basic Member

Index filter was working fine untill I added the LIKE condition after which it started giving runtime error.

Can someone tell me what is missing

Code snippet

         STRING            " (M10-PROC-FL NOT = 'SP' )"    DELIMITED BY SIZE            " AND (M10-PT-CODE  LIKE '275700%'  ) "                                                   DELIMITED BY SIZE            " AND (M10-ALL = 1) "                DELIMITED BY SIZE                                             INTO FILTER-STRING.             PERFORM 890-CREATE-FILTER.

Error message from job log

                Execution error : file 'mfini'                 error code: 119, pc=0, call=1, seg=0                 119     Name is not unique (binding symbol 'mfini')

                890-CREATE-FILTER: error at FILTER-STRING(74)                     illegal character '%'.                     FILTER-STRING context:

PKS
Advanced Member Send Private Message
Posts: 23
Advanced Member

Try assigning '275700%' to a Variable and use it

Replace the second line with AND (M10-PT-CODE LIKE ? ) Add these lines after CREATE-FILTER MOVE TO ALPHANUM-FILTER-VALUE. PERFORM 890-SET-ALPHANUM-FILTER-VALUE.

Anur
Basic Member Send Private Message
Posts: 6
Basic Member
Thanks, Will try that