Message . . . . : Number of parameters, &1, entered for this API was not
Cause . . . . . : Number of parameters, &1, specified was not valid. The
minimum number of parameters is &2. Refer to the APIs topic collection in
the Programming category in the i5/OS Information Center book,
http://www.ibm.com/systems/i/infocenter/, to determine the correct number of
parameters to specify.
You didn’t specify which API encountered the error
CALL QSNDDTAQ PARM(&DQNAME &DQLIB &DQSNDL &DQSNDD &KEYLE &KEYDAT)
this looks ok.
CALL QRCVDTAQ PARM(&DQNAME &DQLIB &DQSNDL &DQDATA &DQWAIT &KRULE &KEYLE &KEYDAT)
I’ve fixed the code. I think the call QRCVDTAQ is missing
data length field &DQSNDL
wait time out of order
next KRule (2A value(‘EQ’)
then &keyLE and &keyDat
then you can optionally capture the SENDERLen (3 0)value(44) and SenderVal (44 struture)
SenderVal – LenRtv 4p0, LenAvl 4p0 SenderJobName 10A SenderUser(10a) SenderJobNum 6A
I think the last two are optional.
Typically the same program is not putting the items on the Queue that are picked up by the second.
The Putter codes the Key values. (Lets say they were ‘ADD’, ‘CHANGE’, ‘DELETE’)
One or more programs are receiving from the Queue. When a program received key ‘ADD’ it will receive and remove the entries with the ‘ADD’ key but will not effect the others.
Key rules can be ‘GT’ ‘LT’ ‘NE’ ‘EQ’ ‘GE’ ‘LE’
With a wait time = 0 the receiver will not wait for an entry.
With a negative wait time the receiver will wait forever for an entry.
The value in &DQSNDL should typically be the length of the field to be sent (100) not the length of the data…
I think that simplifies the program a bit.