Vern, I know what you mean about the token string (DB2_TOKEN_STRING). In your earlier test, DB2_TOKEN_COUNT is 2, but there are 3 substitution variables in the message definition.

I believe RTVMSG looks at the definition of the field data in the message file. For SQL0551, it's

                                    Decimal       Vary
Field     Data Type     Length     Positions     Length     Dump
 &1       *CHAR         *VARY                       2       *NO
 &2       *CHAR         *VARY                       2       *NO
 &3       *CHAR         *VARY                       2       *NO

It doesn't have to scan for a token separator, it just grabs the appropriate amount of data from MSGDTA based on the definition.



On 6/13/2025 3:33 PM, Vern Hamberg via MIDRANGE-L wrote:
Agreed, Peter. Still, I'm not convinced that the DB2_TOKEN_STRING or even the DB2_ORDINAL_TOKEN_n array (my interpretation) map reliably to MSGDTA. I mean, one of the tokens is the qualified file name. I might play with Marco's approach, with more substitution variables. I don't know if I can reproduce Dan's scenario.

*Regards*

*Vern Hamberg*

IBM Champion 2025 <cid:part1.IHYe2CSl.KtB0ualw@centurylink.net> CAAC (COMMON Americas Advisory Council) IBM Influencer 2023

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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