AS/400 Data Queues

2515 pts.
Tags:
AS/400
AS/400 Data Queue
RPG
Hi all
I am new to RPG and AS/400. I want to know,
Does data queues are maintained session wise?
  • if yes then if we have allocated memory of e.g. 2GB, then each session will reserve 2GB?
  • if no then (it is like common shared data) how can we manage data queue. If one user wants to clear data queue and it has data for another user?
Sorry if it is a silly question.

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 9  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • ToddN2000
    We use data queues here a lot. They are shared, not session specific as if they were created in QTEMP. Our data queues are shared and created in a production library. We have async jobs that monitor these looking for new data to process. Once new data is found it is processed and removed from the data queues.

    It all depends on you job and the work flow on how you want it to function. 

    Do you have any further details?
    15,605 pointsBadges:
    report
  • hunshabbir7
    Thanks todd

    Actually I am confused, I have followed this article. Here when this guy wants to send data to the data queue first he delete and then create data queue(I don't know why he didn't use QCLRDTAQ command to clear data). Then he sends data to the queue.. My concern is if some one else is using the same application how data queue will be managed. If one is deleting and other wants his data back. I think you can understand. 
    2,515 pointsBadges:
    report
  • hunshabbir7
    I wrote a program which sends some data to the data queue and another program to receive data and save it in a PF. It is okay but the scenario is when I run this program for the first time it pushes data in the queue I again run this program from another user it again pushes data but it deletes the queue first and then put its own data, in the end I only receive data which was inserted in the end. How I can append data rather then removing. Remember I followed the technique of clearing data from the article mentioned in the above comment. I think by using QCLRDTAQ command program will behave similarly.
    2,515 pointsBadges:
    report
  • philpl1jb

    Not sure why you would want to delete and recreate the queue or clear the queue.  Why would you want UserB to muck with the processing from UserA?  This is an issue of process design.

    If you want various users or processes to share the same queue but see different entries you should look at keyed queues. 

    With Keyed Queues UserA could put stuff on the queue with the key 'UserA' and then receive stuff from the queue with the key 'UserA'.  They would not see any of UserB's entries.  Periodically, perhaps at IPO the Queue could be cleared to get rid of any stray entries that don't need to be serviced.

    51,355 pointsBadges:
    report
  • hunshabbir7
    I got the reason why he is not clearing the data queue by clear command. In this article Michael Otey writes in Some Data Queue Caveats section that data queues only grows and never get shrink when  entries are removed from them. Memory remains occupied by them, and when they reach to a threshold level they automatically extend the size. To tackle this situation he suggests to delete and recreate them periodically. But it should be in some other job which we will run biweekly or monthly 
    2,515 pointsBadges:
    report
  • philpl1jb

    To take care of the size, you might have to drop the queue and recreate it.

    Either clearing or recreating would remove all unserviced elements.

    51,355 pointsBadges:
    report
  • ToddN2000
    here is a good link from IBM. It mentions an auto reclaim option when you create the data queue.

    15,605 pointsBadges:
    report
  • hunshabbir7
    Thanks Todd and Philp you helped me learning about Data Queues and also helped to clear my confusions. Actually I wanted to use keyed data queues from where every user could get his own data. Thanks again.
    2,515 pointsBadges:
    report
  • WoodEngineer
    We use data queues for several processes.  One program receives data from a specific data queue.  This removes conflicts.  It determines what to do with the data and routes it to the correct process.
    We had the same concern regarding data queues growing.  To solve this, the program which processes the data queue deletes it once a week during a quiet time, then re-creates it and starts the process all over again.
    6,875 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following