|
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.
As an Amazon Associate we earn from qualifying purchases.
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.