Index filter using "LIKE"

Sort:
You are not authorized to post a reply.
Author
Messages
Anur
Basic Member
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
    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
      Posts: 6
      Basic Member
        Thanks,
        Will try that
        You are not authorized to post a reply.