|
Yes, a data queue can be "full". If entries are not removed as fast as they are added, or not removed at all, it will eventually reach it's size limit and generate an error. Out shop uses data queues to multithread some of our batch processes. One job feeds many which actually do the work. If the jobs taking entries off of the queue don't keep up with the job placing entries on the queue it will fill up. This happens regularly for some of the processes. That's why the check. The question was intended to be what is the best way to handle a situation where your program goes into an indefinite wait until a condition is met. One of the posts from the original thread mentioned never placing code in production similar to what I gave as an example. That got me to thinking, if it shouldn't be done this way, then how should it be done? No offense taken by the comment, just curious and always open to better ways of doing things. The example is not correct code as was pointed out by a couple of the posts. I typed it from memory without checking the program. Really embarrassing. I'm looking for the exact code now. Rick
-----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement Sent: Wednesday, January 10, 2007 11:57 AM To: RPG programming on the AS400 / iSeries Subject: Re: How would you code an infinite RPG loop - Was 1 <> 1 is true??? Hi Rick,DoW 1 = -1 If data queue is not full leave EndIf EndDoARe you asking how to tell if a data queue is full? Or are you asking how to make an infinite loop? Or, what are you asking, exactly? Is it even possible for a data queue to be "full"? -- 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.
Privileged and Confidential. This e-mail, and any attachments there to, is intended only for use by the addressee(s) named herein and may contain privileged or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited.
As an Amazon Associate we earn from qualifying purchases.
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.