My pgm is reading a dataque which is updated by another pgm running in a separate job. I am looping to QRCVDTAQ with a wait time of 1 second. If data length is not what I expect, I loop back to QRCVDTAQ. Am I constantly hogging on to the dataque not letting the other pgm have a chance to write to? Does QRCVDTAQ while waiting let the other pgm update the dataque?
Announcement
Collapse
No announcement yet.
QRCVDTAQ and the effect of WAIT time
Collapse
X
-
Re: QRCVDTAQ and the effect of WAIT time
Why are you waiting a second? Why not using wait time -1 (waits until an entry occurs) and looping around?
Even with wait time -1 it is possible to write to the data queue, that's what are data queues for.
Birgitta
-
Re: QRCVDTAQ and the effect of WAIT time
PHP Code:
d dataqueue s 10 inz('BR3BARCODE')
d dataqueueLib s 10 inz('JAMIELIB')
d dataqueueLen s 5 0 inz(4096)
d datawait s 5 0 inz(-1)
d $RcvDtaQ pr extpgm('QRCVDTAQ')
d dataqueue 10
d dataqueueLib 10
d dataqueueLen 5 0
d QueueData 4096
d datawait 5 0
// position 1-10 is reserved for the program name
// this will tell the barcode driver program which data structure to use
$RcvDtaQ (Dataqueue :
DataQueueLib :
DataQueueLen :
QueueData :
datawait );
numberoflabels +=1;
// The label name is always the first 8 char of
// data sent so use this to populate the correct
// data structure(s)
//
// override the barcodes to the correct outqueue the
// outqueue will always be in position 9 length 10
WorkingLabel = %subst(Queuedata:1:8);
Workingprogram = WorkingLabel;
All my answers were extracted from the "Big Dummy's Guide to the As400"
and I take no responsibility for any of them.
www.code400.com
Comment




Comment