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



Tony,

One point that interests me: If two or more persons are adding a memo to one 
account at the same time, this technique will mix their entries. Is that 
acceptable? You may end up with very strange memos.

Having read the other replies I think a key based on accont# and line# 
(sequence) is not sufficient to not mingle two or more memos enterd at almost 
the same time.

I just cannot imagine it happening. Methinks, the record for that specific 
account# should be locked.

But then perhaps< I misunderstand the situation.

Regards,
Carel Teijgeler



*********** REPLY SEPARATOR  ***********

On 29-1-05 at 13:52 Tony Carolla wrote:

>Excellent!  That is exactly what I was looking for.  I wasn't sure if
>the on-error operation could iter to the top of the loop.
>
>I never though of eliminating the chain, but it makes sense, and it
>will be quicker, as long as most of the accounts have at least one
>memo record.  And these are billing response records, so most of them
>do.
>
>Thanks!  
>
>
>On Sat, 29 Jan 2005 11:18:01 -0500, Alan C <steelville@xxxxxxxxxxx> wrote:
>> Hello Carel,
>> 
>> >Tony,
>> >
>> >If the memo records are created in a seperate programme, I would use a
>data area.
>> >
>> >
>> The problem with the data area is that you would have to have a separate
>> data area for each account number, if I understand Tony's situtation
>> correctly.
>> 
>> But I would use his own technique with a couple of changes:
>> 
>> Instead of:
>> 
>> - Chain using account#
>> - if no matches, sequence=1
>> - if %Found, SETGT using account#, READP, then add one to the sequnece
>> number.
>> 
>> Do this, eliminating the CHAIN:
>> 
>> - Use SETGT using account#   ( setgt(e) account# filename )
>> - Do a READPE using account#  ( readpe(e) account# filename )
>> - If not %Found, sequence = 1
>> - else sequence = sequence + 1
>> 
>> But add the loop to handle the duplicate key message:
>> 
>> - Dou   I_say_leave
>> - Monitor
>> - SETGT using account#   ( setgt(e) account# filename )
>> - READPE using account#  ( readpe(e) account# filename )
>> - If not %Found, sequence = 1
>> -     else sequence = sequence + 1
>> - Endif
>> - Write MemoRecord
>> - On-Error  DupKeyStsCode  (Or *FILE or ?)
>> -     Iter
>> - End-Mon
>> - I_say_leave = *ON
>> - Enddo
>> 
>> There are some brilliant programmers here, however, who advocate
>> avoiding use of the "iter" and "leave" op-codes. I find it hard to avoid
>> using them myself, but am still open on that issue.
>> 
>> Hope that helps.
>> 
>> - Alan
>> 
>> --
>> 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.
>> 
>> 
>
>
>-- 
>"Enter any 11-digit prime number to continue..."
>-- 
>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.