Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

FS111

Hey y'all.. Hopefully a really stupid question with a really simple answer?

I have a table that I've Selected (Basic+) and am Readnexting through. for some reason, when I get to the end of the list, I get a message "FS111 No More Records Available". I'm doing the same thing in a number of other places, but this is the only one generating the message, and it's causing the process to hang until someone presses or clicks something.

Why would I be getting this in one situation and not in others? Is there a way to prevent the message from displaying?

Gratzi!

Comments

  • Are you performing a latent or active select?
  • Just selecting the file variable
  • In Arev, it was possible to edit a MESSAGES record and make it invisible or basically disabled. Is that possible in OI if there are no other options? Where are the system message text records stored?
  • Oh, so you are seeing an actual message box appear? I'm sorry, I assumed you were describing a system error rather than a dialog box. I would need to see a screenshot of that message. If it is coming from the engine then it is likely hardcoded and can't be suppressed in the way you suggested.
  • The reason I asked about the type of select you were doing is because if you do a latent select (which is what you are doing with the selecting of a file variable), then it is possible for the pointer to get misaligned due to ongoing activity in the table. The best practice is to do an active select.
  • So I need to call RList?
  • Here is the error msg:


  • Won't there be a lot of overhead with resolving the select? The table in question has over 3 million records
  • That looks like an OI message, but I don't think it is using a message that is designed using the UI Workspace. Most likely it is created purely in code and called using the Msg() function. In which case you wouldn't be able to edit anything to make it work the way you want. There are heroic measures you could explore that would allow some form of interception, such as code hooking, but honestly I recommend seeing if RList solves the problem first.
  • Yes, there is overhead but it is a tradeoff as to where you want the overhead.
  • Well the FS111 is back. I changed the select to a resolved RList select and even saved the list. After doing an Activate_Save_Select, I loop through the records but still get the FS111 message at the end.

    This is part of a larger process that is supposed to run uninterrupted. I can't have it pause for user input.

    Any more suggestions?

    Thanks!
  • Are you confident that all the records have been read by the time the FS111 message is displayed? I'm beginning to suspect you have a specific record that is creating a conflict for you.
  • Affirmative.. it Readnexts and Reads through the entire list and displays FS111 at the end.
  • No GFEs either? If not, then I got nothing. I would need to test this myself to come up with any other ideas. Sorry.
  • I got it.. just have to set @file_error = '' at the end of the Readnext loop.

    Thanks for the help!
  • That will work, but keep in mind this only masks the symptom and doesn't deal with the underlying problem. For now you might be getting all the data but later on this might not be happening but you won't know because you'e cleared the error flag.
  • Can we see your readnext looping code?
  • It's pretty simple..

    eof = 0
    call rlist('SELECT CONTRACTS',4,'CONTRACTS','','')
    call activate_save_select('CONTRACTS')
    loop until eof
    readnext ctid then
    reado ctrec from ct@, ctid then
    |
    |
    end
    end else
    eof = 1
    @file_error = ''
    end
    repeat


    I started doing a Basic+ Select. Don thought the problem was with an unresolved select. I tried doing an rlist('SELECT CONTRACTS',5,'','',''), but that also generated the FS111 at the end of the Readnexts. Actually doing the save list and activate also brings up the FS111. Setting @file_error is the only thing that has worked.



  • I think this is your problem.
    You are trying to read a non existant record to get your EOF status (Which I what I suspected.

    Try:
    Loop
    readnext ctid else Eof=1
    until Eof
    reado ctrec from ct@, ctid then
    |
    |
    end

    repeat
  • @BarryStevens are you sure his logic would process an extra read? First, my understanding of the code suggests that the EOF flag will get set the moment the cursor is exhausted and the looping logic is bypassed accordingly. While I use your syntax myself (and prefer it due to readability), I think Michael's logic is okay. Second, he is getting an FS111 (FS_READNEXT_DONE$) error rather than an FS100 (FS_REC_DNE$) error. Finally, Michael reported that his code works fine with other tables.

    @Michael an FS111 error is actually normal when the cursor is exhausted. I was operating under the assumption that your list was getting exhausted prematurely. So now I'm questioning why you are seeing a dialog in the first place. I never see an FS111 dialog although I get FS111 conditions all the time. I see that you have a GUI running this process. Have you tried running your code without using this GUI just to see if the error displays? Do you have some process that checks Get_Status() or @FILE_ERROR and displays the error message as a result?
  • @Don, I get the error regardless of running from a GUI. When it gets to the end of the select list, I get the FS111 message. Again, it doesn't happen when using the same logic against a smaller table.

    I haven't been checking any status or errors until now. I'm just trying to process through the entire table.

    For now I can just stick with setting @file_error to null. It is a great mystery though.

    Thanks guys!
  • edited January 2019
    I'm guessing everything is just academic going forward since you have a suitable workaround, but I am still very curious about his. When you process smaller tables, do you observe @FILE_ERROR being populated with FS111?
Sign In or Register to comment.