According to the RPGLE V5R4 manual %scan can not return an array of
characters found.
<quote>
Note: Unlike the SCAN operation code, %SCAN cannot return an array
containing all occurrences of the search string and its results cannot
be tested using the %FOUND built-in function.
</quote>
Has this changed?
Terry Anderson
Programming Manager
Citation Corporation
Switchboard 1.251.867.5481 ext 212
Direct Line 1.251.809.2312
Fax 251.867.0525
Cell 1.251.363.4975
------------------------------
message: 8
date: Tue, 24 Nov 2009 08:55:52 -0500
from: "Mark S. Waterbury" <mark.s.waterbury@xxxxxxx>
subject: Re: Copy variable to PF
Hi, David:
The SCAN opcode, or even better, the $scan BIF, can return an array of
every position where the search argument was found. So, you can "scan"
for the ";" and get an array of integers containing the positions of
each ";". Then it is an easy matter to loop through this array, and
dsubstring the results to where ever your program wants them.
This mailing list archive is Copyright 1997-2026 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.