|
I dialed into a user I support and grabbed this from a program I wrote a few years back. They are at V3R1. Here are the changes for an indexed data queue: > > 1. Create my data queue: > CRTDTAQ DTAQ(mylib/myque) MAXLEN(48) SENDERID(*yes) ============== > <<snip>> > 4. Have separate program running in background waiting for entries to > appear on the queue: > No F specs, but an I spec to use data structure defined in step 2 and: Data Structure: ISNDDTA DS 44 I 9 18 DQJOB Job (workstation id) I 19 28 DQUSR User I 29 34 DQJOBN Job number I 35 44 DQJOBD Job description > In calcs: > *INLR DOWEQ *OFF > CALL 'QRCVDTAQ' Receive Data Queue Entry > PARM 'myque ' QNAME 10 data queue name > PARM 'mylib ' QLIB 10 data queue library > PARM QLEN 50 entry length > PARM QDATA 48 data in queue > PARM 360 QWAIT 50 wait for an hour (specify # >of seconds) PARM QFIFO 2 PARM 8 QKEYL 30 PARM *BLANKS QKEY 8 PARM 44 SNDLEN 30 PARM SNDDTA 44 > > QLEN CASEQ *ZERO CLNUP timed out, everyone went home > CAS RUNIT something appeared > END > ENDDO > Fields DQJOB, DQUSR let me know who and from which workstation submitted the entry. (a timestamp would have been nice, hint..hint..) The variables QKEYL and QKEY are there because the program I wrote used an indexed data queue to print the entries in account number order. I wrote this a couple of years ago but I recall having problems receiving the sender data in a straight FIFO sequenced queue. I do know that you can set the key value before doing the CALL and think of it as the same as a SETLL. I'm freehand typing this so the positions are not correct. best viewed at fixed pitch font. TAATOOLS contains commands for retreiving a data queue description and displaying the contents of a data queue. Real handy for testing. Possibly someone else has an example of a FIFO queue with sender information. James W. Kilgore QAPPDSN@ibm.net +--- | 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 MAJORDOMO@midrange.com | and specify 'unsubscribe MIDRANGE-L' in the body of your message. | 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.