MQ

MQ

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Mapping of constants to strings?

    Posted Wed February 02, 2022 10:11 AM

    Is there a mapping of  the integer value like MQIA_ACCOUNTING_INTERVAL to its MQSC string equivilent( AcctInt) ? ( or even "AccountingInterval")  so I can use nice names when displaying PCF output?

    I can use MQIA_STR (MQIA_ACCOUNTING_INTERVAL) to return "MQIA_ACCOUNTING_INTERVAL." which is halfway there.


    If not I could take the string "MQIA_ACCOUNTING_INTERVAL"  strip the front bit off, convert to lower case, change any character after a _ to upper case, and remove the _ to make AccountingInterval.

    Rather than write it myself, I thought I would see if it has been done before.

    Colin



    ------------------------------
    Colin Paice
    ------------------------------


  • 2.  RE: Mapping of constants to strings?

    Posted Wed February 02, 2022 10:50 AM
    Edited by Mark Taylor Mon February 07, 2022 05:07 AM
    Read amqsevta.c and cmqstrc.h

    See also https://marketaylor.synology.me/?p=1070

    ------------------------------
    Mark Taylor
    Winchester
    ------------------------------



  • 3.  RE: Mapping of constants to strings?

    Posted Thu February 03, 2022 03:41 AM

    Thank you.

    The formatConstant  function in amqsevta.c takes MQRC_UNEXPECTED_ERROR and returns "Unexpected Error"

    Colin



    ------------------------------
    Colin Paice
    ------------------------------



  • 4.  RE: Mapping of constants to strings?

    Posted Fri February 04, 2022 02:29 PM
    Hi Colin,

    You might be interested in some lookup C code I wrote for Completion and Reason Codes.  You can read my blog posting here: C Code to Lookup MQ Reason Code

    later
    Roger

    ------------------------------
    Roger Lacroix
    CTO
    Capitalware Inc.
    London ON Canada
    https://capitalware.com
    ------------------------------