× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



From: Kurt Anderson

Joe, I thought I'd write up the test for you, since you're helping me
out.

D VAR_Scan C '[scan]'
D Data S 1024a
D pos S 5u 0

/free
Data = x'25' + 'test test [scan] test' + x'25';
pos = %scan( VAR_Scan: Data );
*inlr = *On;
/end-free

Well, the test worked - as in the %scan went past the x'25' character as
I would think it should. So then I was wondering what was different
between the test and what I was seeing in my code. Well, I was getting
data from the IFS. And this data was put into a buffer via the read
api, and the field I was scanning was pointing to that address in the
buffer. I don't really know much about the buffer - how it differs
from where a field is stored in memory and whatnot, but I can only
imagine that this is the point of issue.

Once I moved the field that was based on the buffer into a
program-defined variable field, I can scan that new variable field
without the %scan ending at the first x'25' found.

Okay, you now at least have a workaround. I'd be interested to see what the
real problem is with the original field, but that would take a little more
investigating. We'd have to know exactly how the two different fields are
defined before making any suggestions there.

Joe



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.