• Subject: Re: data queues
  • From: DAsmussen <DAsmussen@xxxxxxx>
  • Date: Thu, 22 Jan 1998 18:40:09 EST
  • Organization: AOL (http://www.aol.com)

James and Juris,

In a message dated 98-01-22 17:05:27 EST, you write:

> Juris Krikis wrote:
>  > I would be grateful if somebody would give a brief summary on data
>  > queues, their usage, application and etc.
>  >
>  > Thanks.

>  Data queues are useful in inter program communications.  A sending program,
>  let's say order entry, sends information to a data queue that is received
>  another program, let's say a bill of lading print program.
>  Several programs can add entries to a single date queue.  Several programs
>  receive entries from a single data queue.
>  Data queues can be thought of as a data file, either sequential or indexed,
>  a few limitations.  There is no OS command to display the contents of a
>  queue but you will find a command to do this in QUSRTOOLS.  Maybe the R4Vx 
>  has such a command.  The only way I know of to clean up a data queue is to
>  delete/create the queue. (It just grows and grows)

There is an API to clear data queues, I created a _very_ small command to call


>  Under the CISC OS, when an entry is received from the queue it was 
>  automatically removed from the queue.  If you need the entry again for
>  process it could
>  be added back to the queue but that practice could cause some serious cycle
>  stealing looping.  I thought I heard mention that the RISC OS versions has
>  function to retain the entry, don't know for sure.

Haven't investigated this function, as we don't need it.  The receive API's
still do destructive reads under V3R7 as they did on V3R2 with the same
parameters passed to the API.

>  Our primary application is to drive print programs: shipping labels, bills
>  lading, invoice printing, etc. where both a batch process and on-demand
>  is desired and the actual print programs are constantly running is the
>  waiting for entries to appear.  When an entry appears, the printer file is
>  opened, form produced, printer file closed, back to top of loop for a wait.

This is an _excellent_ application!  We use them to replace reading "work"
files in the BPCS CIMPath product to interface inventory transactions to
foreign devices and/or programs.  If your transaction volume gets too heavy,
you can just start another copy of the data queue "reader" program...

>  Another reason we included the "verb" is to let the program know that a
bunch of
>  entries are batched together and to skip the printer open/close functions
>  there will be no wait between entries.
>  Data queues are a handy little tool.  A look through QUSRTOOLS will give
you sn
>  example of writing to and reading from a queue.

Just note that you have to use the OS/400 Data Queue API's in order to use


Dean Asmussen
Enterprise Systems Consulting, Inc.
Fuquay-Varina, NC  USA
E-Mail:  DAsmussen@aol.com

"Be true to your teeth, or your teeth will be false to you." -- Dental Proverb
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 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].