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


  • Subject: Re[4]: duplicate record Id's in multi user environment
  • From: "Eric N. Wilson" <doulos1@xxxxxxxx>
  • Date: Mon, 16 Oct 2000 07:32:00 -0700
  • Organization: Doulos Software & Computer Services

> The ideal solution to that problem is (I think !:)) -- the only way
> to get a next number is through the trigger program. When the
> trigger starts the first time, it checks for the last key in the
> file and resets the value of the data area based on the file.

Richard, don't you think this solution is fraught with peril? Since
each job gets to open the trigger at least once and if you have a few
hundred jobs doing a write request simultaneously there would be a
high potential for all the jobs to try to use the same number? I am
probably misunderstanding you again (something I am notorious for :-)

In answer to someone else's question. What happens if you do not set
LR on in a trigger? A trigger acts just like any other program in your
invocation stack... Just remember to initialize your program
variables, set file pointers, and any other initialization tasks that
need to occur manually and the trigger program flys compared to when
you do set LR on. I usually try to get the run environment in the
*INZSR (Call to QUSRTVJOBI) and if it is running in batch I do not set
on LR and if it is running interactively I do set on LR... I know that
closing the program can be and is inefficient but with interactive
jobs the time to load a program vs. the time in between user
keystrokes is negligible (even for the fastest typist).


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.