This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

START Statement + Filter

ISAM FILE [Primary KEY with Duplicate - 20 Char] - FILE1

2021041610011234KEY1data1

2021041610011234KEY2data2

2021041610011235KEY3data2

What I want to do ==> Read 1st 2 record only. 

How I did ==>

STEP#1

MOVE  2021041610011234                  TO   FILE-KEY

START FILE1 KEY >= FILE-KEY SIZE 16

====== > FILE STATUS = 00

STEP#2

MOVE  .*10011234 *.                 TO   FILE-KEY

START FILE1 KEY WHILE KEY IS FILE-KEY

======> FILE-STATUS = 23

Somehow not able to properly defined filter. Also, documentation has very little help. Can someone please advise correct filter to be used ?

Tags:

  • 0  

    I'm wondering if the problem isn't that FILE-KEY is 20 characters and you're moving only 12 characters into it, so the remainder is spaces and they are being included in the search pattern. Perhaps you need to use a TRIMMED RIGHT in the WHILE Phrase.