× 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.



On further review, I need to look for the character # that follows
the word 'invoice', then take the string that follows this, as in this case:
INVOICE # XKC02G146L

that is the standard, then I can code for the deviant cases.

if it is easier I guess I can just look for '#' and forget about 'invoice'


> http://tinyurl.com/9ehns
>
> This is from 1998, so there are no doubt better ways today, but it shows
> a way to eliminate all of the characters except the ones you list in a
> constant.
>
> Essentially you can define a 40-element array of 1-character each.  Then
>   do a for/endfor loop, reading and saving digits. When I find a digit I
> start a new record.  If i am reading digits and find anything but a
> digit, then the record is done.  That way I can have several invoice
> numbers per 40-char. comment.
>
>
>
> steema@xxxxxxxxxxxxx wrote:
>> On further relection, it is ok if there are 'wrong' invoice numbers in
>> this mix.
>> I have a comment field of 40 that will have some valid invoice numbers,
>> and maybe non-valids like a phone number.
>>
>> I just want to wade through this 40 pos. field and pick up all
>> contiguous
>> numerics. I won't even be concerned about the X before it, I can add
>> this
>> if I want.
>>
>> The purpose here is to speed up a process by aggregating these invoice
>> numbers.
>>
>> I am seeking the most elegant and efficient way to do this.
>>
>> Thanks,
>> Steve
>
> --
> -----------------------------------
> Booth Martin
> http://martinvt.com
> -----------------------------------
> --
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.