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



We have used similar tactics to move data between interactive and batch
jobs. In our case the interactive job creates a unique queue, and sends a
request for data along with the unique queue name to a batch process on the
input queue for the batch process. The batch process does it's thing and
begins returning entries in the queue. The interactive process reads up to a
subfile of records and displays them to the user. When the user presses page
down the program simply reads another pagefull from the queue. Since the
background process was still running and filling the queue while the user
reviewed the first screen the second and subsequent screens are essentially
instantaneous. Should the user enter different search criteria (thus
requiring the batch job to stop and change course) it simply deletes the old
queue and creates a new one. The coolest part was that because we couldn't
know how many records the batch job would return and didn't want to wait to
find out in case it was *waytoomany we just deleted the queue. There are no
locks on queues even when reading or writing them! The batch job then gets a
nice clean little error on it's next attempted write which we coded to mean
'Quit this request and move on'. The whole thing avoids the 'Interactive
Tax' quite nicely and a single batch job can service many interactive users.
Overheard creating and deleting queues has never been an issue.

  - Larry

John Taylor wrote:

> Mark,
>
> I use this approach in some custom "wizards" I've created for retrieving
> data from the 400.  The client creates the data queue, calls an RPG program
> to populate it, processes the resulting records, then deletes the queue as
> part of a cleanup process. The time it takes to create the queue is measured
> in milliseconds, and isn't even worth worrying about when you consider the
> overall processing time required to transfer the records. Of course, this
> assumes that you're transferring dozens of records (or more) at a time. I
> certainly wouldn't use this approach for something like a lookup function
> which only returns a single record, yet is called many times.
>
>
> Regards,
>
> John Taylor
>
>>Hello all,
>>
>>How expensive is Data Queue creation? What I'm trying to do is to get data
>>from a VB application to the 400. I've thought of a number of different
>>ideas and have decided to at least give a data queue a try. I was just
>>wondering how expensive it is to create a unique data queue every time and
>>then destroy it, or to fiddle with a keyed data queue.

--
Larry Bolhuis           | IBM Certified Solutions Expert
Vice President          |     iSeries Technology V5 R1
Arbor Solutions, Inc.   |     e-business for AS/400 V4 R2
(616) 451-2500          | IBM Certified Specialist  AS/400
(616) 451-2571 -fax     |     RPG IV Developer
lbolhuis@arbsol.com     |     System Administrator for OS/400 V4 R4
www.arbsol.com          |     Professional Network Administrator
                         |       Network/Multiple Systems
                         |     Client Access




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.