Openedge String Function

Posted by rrajan on 06-Aug-2013 09:47

define variable cyes as character no-undo.

define variable cfound as character no-undo.

cyes = "yes/no".


cyes = cyes + " ".

cfound = string("TXT" = "TXN",cyes).

if length(cfound) > 680 then do:

display  length(cfound).




The problem in the above code is we are appending a space in each iteration to the variable cyes, when it reaches a certain limit(not sure on exact limit) it gives a progress error. I believe it is due to the string function limitation and not the variable limitation. Does anybody know why this is happening ?

This above code gives the following error saying

"SYSTEM ERROR: bffld: nxtfld: scan past last field. (16)

An internal data error occurred while PROGRESS attempted to retrieve a field from either a record or workfile"

All Replies

Posted by jquerijero on 06-Aug-2013 15:29

Is there a reason why you have to format the logical value NO ("TXT" = "TXN") to "no            ...(n spaces)"?

Posted by rrajan on 06-Aug-2013 15:32

I dont have any specific reason, but when this happens progress terminates saying the error message. I want to understand why this happens

Posted by Rob Fitzpatrick on 06-Aug-2013 15:45

Rather than trying to debug your solution, what is the problem your code is intended to solve?

This thread is closed