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



I am writing a program that creates a memo record for a customer. It accepts 
a company ID, customer ID, and the memo text. It returns an indicator, and 
the indicator is *on if the memo got created, *off if it didn't for any 
reason, including a file error.

I created a *PSSR subroutine that closes all files (if open), and returns 
*off. I placed this subroutine as all of the file spec's INFSR subroutines, 
specified USROPN, etc.

During memo creation, there is a sequence number in the memo file, and it is 
a unique key situation, the key being the company ID, customer ID and 
sequence number. Because other processes can be writing to this file at the 
same time, I use a technique (with the help of this mailing list 8-) ) that 
does the following:

- SetGT using the company ID and customer ID
- ReadPE using the company ID and customer ID
- If %Equal is off, set the seq# to 1, else add 1 to the sequence number
- Write using the (E) extender

I have conditioned the entire loop using DOU NOT %ERROR. My question is 
this: If a unique key error happens on the WRITE, will the control jump to 
my *PSSR subroutine, in spite of the (E) extender, or will it continue the 
loop, turning on the %ERROR bif? 



-- 
"Enter any 11-digit prime number to continue..."
"In Hebrew SQL, how do you use right() and left()?..." - Random Thought

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.