|
to send data to a data queue, use this API: QSNDDTAQ with 4 required parms of 1) the data queue name, 2) the data q library, 3) a 5 digit decimal variable (or constant) containing the number of characters to send to the dtaq (entry length) and 4) the variable (or constant) containing the actual data to send to the queue. There are also two optional parms that support adding key information to the dtaq entry. If you didn't create the dtaq as SEQ(*KEYED) you don't need these optional parms. to receive from a dtaq, use the following API: QRCVDTAQ with 5 parms, where the 1st four are just like in the send API, except that the API will return entries to the variables for parms 3 & 4. The 5th parm is a 5 digit decimal variable that controls how long to wait for an entry to arrive on the dtaq. If you specify a negative value, the API waits indefinitely. Value of 0 means don't wait at all. There are additional parms that can support key and sender id info. for more info, an easy place to look is IBM's Control Language Programmers Guide - I know you're looking for RPG, but what works in one generally applies to the other. remember that with dtaqs, once an entry is received from the dtaq, it is gone if the program that processes that entry fails for whatever reason, the entry can't be retrieved. also, dtaqs grow, but even as entries are deleted, they never decrease in size; they always remain the size it was when it had the most entries. you can always schedule deletes and recreates of the dtaq as part of maintenance. HTH jw ______________________________ Reply Separator _________________________________ Subject: Data Queues Author: Jim Langston <jlangston@conexfreight.com> at Internet Date: 06/08/2000 3:37 PM I have a project that must be completed before next Tuesday that involves DDM Data Queues. That is, the data queue resides on another AS/400 connected via SNADS. The Data Queues have been set up (not hard at all) and now I need to write an RPG program on my side to send data to this data queue. Unfortunately, I have never dealt with data queues before so have absolutely no idea where to start. I have worked with data areas a bit, and was hoping data queues were somewhat similar, but could not display the data queue data like I can with data areas (DSPDTA). Can anyone send me a URL to go to? Or a boiler plate program? I need to get up and running on this very quickly, and there are a number of aspects of this program I need to write (add file trigger, data conversion and table lookup, write to data queue, find way to receive acknoledgment, etc...). Regards, Jim Langston +--- | 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 +--- +--- | 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 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.