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



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


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.