On 01-Sep-2015 15:33 -0600, Joe Pluta wrote:
<<SNIP>> Given that RCVMSG is a very old command for a fairly complex
API, I think there was a lot done there for "someday" that never
came. It's good to remember that I can use QMHRCVPM if I need the
more comprehensive features, but I was just trying to dust out the
cobwebs and figure out the minimum configuration for retrieving
message ID and message data. I think just specifying those two
variables should suffice. I'm running that way now and haven't wiped
out anything yet. <<SNIP>>

The System/38 CPF Gd, IMO more clearly and succinctly qualifies the specified CL variables as _only_ capable as receivers for the various parameters [PARM declared as RNTVAL(*YES)] on the Receive Message (RCVMSG) command:

To receive a message you can specify:
• ...
• A group of control language variables into which the following information is placed (each corresponds to one variable).

- Message reference key of the message in the message queue
- First-level message text (character variable)
- Length of first-level message, including length of substitution variable data (decimal variable of length 5)
- Second-level message text (character variable) Length of second-level message, including length of substitution variable data (decimal variable of length 5)
- Message data for the substitution variables provided by the sender of the message (character variable)
- Length of the message data (decimal variable of length 5)
- Message identifier (character variable at least seven characters long) Severity code (decimal variable of length 2)
- Sender of the message (character variable can be as long as 54 characters)
- Type of reply message received (character variable at least two characters long)
- Command function key that was pressed in replying to the message (character variable)

Huh. At first view, I wondered what the parameter keyword was for that last tidbit; having neither a S/38 CL Reference nor the S/38E [from QSYS38]. As described, that tidbit is something that since [though not in v1r1 AFaIK] was made available to be retrieved via an API [or two?]. However on further thought\review, I suspect that means the Return Type (RTNTYPE) parameter for the various '2#' char-02 "Reply, ..." message variants.

Even then there was no explicit mention\clarification about what happens for a variable declared shorter than what was available, nor that the MsgDtaLen is the length of the total _available_ MsgDta irrespective the size of the variable specified on the MSGDTA parameter.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 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].