{"id":1689,"date":"2025-02-27T11:39:15","date_gmt":"2025-02-27T11:39:15","guid":{"rendered":"https:\/\/marketaylor.synology.me\/?p=1689"},"modified":"2025-03-02T17:37:44","modified_gmt":"2025-03-02T17:37:44","slug":"mq-pcf-value-formatting","status":"publish","type":"post","link":"https:\/\/marketaylor.synology.me\/?p=1689","title":{"rendered":"MQ PCF value formatting"},"content":{"rendered":"\n<p>In MQ V8, a <a href=\"https:\/\/marketaylor.synology.me\/?p=441\" target=\"_blank\" rel=\"noreferrer noopener\">new header file<\/a> made it easy for C programs to convert MQI numbers into the corresponding string definition. For example, turning 2035 into <code>MQRC_NOT_AUTHORIZED<\/code>. For formatting PCF-based messages such as events, you can easily convert the names of fields in those events using functions like <code>MQIA_STR<\/code> or <code>MQCACH_STR<\/code>. But what about turning the values in those elements into a string? There is a new tool in the <a href=\"https:\/\/github.com\/ibm-messaging\/mq-golang\" target=\"_blank\" rel=\"noreferrer noopener\">MQ Go library<\/a> to help with MQ PCF value formatting. And it is easy to adopt or port it for other languages too.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h3 class=\"wp-block-heading\">The problem<\/h3>\n\n\n\n<p>Consider a PCF element where the name\/value pair looks like <code>{5,0}<\/code>. Calling <code>MQIA_STR(5)<\/code> in C, or <code>MQConstants.lookup(5,\"MQIA_.*\")<\/code> in Java will return the attribute name: <code>MQIA_DEF_PERSISTENCE<\/code>. We know from the context that the name will be in one of the MQIA\/MQCA\/MQBA ranges. So we can easily try each of these sets or prefixes until we find a match.<\/p>\n\n\n\n<p>The corresponding code to turn the value into a string would be <code>MQPER_STR(0)<\/code> or <code>MQConstants.lookup(0,\"MQPER_.*\")<\/code> to get <code>MQPER_NOT_PERSISTENT<\/code>. But how do we know that the function or prefix that gets us to the conversion function comes from &#8220;MQPER&#8221;? The simple answer is that there is no way programmatically to know. There is no direct relationship between an attribute&#8217;s name and the corresponding MQI definitions for the value. <\/p>\n\n\n\n<p>The original MQI designers did not consider creating or enforcing a rule. They believed (probably correctly) that a readable constant name was more useful. And they had the constraint of having to live within 31 characters for the definitions. Adding linkage in the names to give a more explicit relationship would likely mean losing characters that make the names memorable and readable.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The old solution<\/h3>\n\n\n\n<p>I&#8217;ve written code that deals with this several times before. For example as part of SupportPac MS0P I had a Java solution, and the product&#8217;s <em>amqsevta.c<\/em> has a C solution. And other applications had partial decoders, enough to demonstrate the principles.  There&#8217;s also something similar in the MQ source code itself. The C code in <em>amqsevta.c<\/em> looks something like<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">switch (cfh.Type) {\ncase MQCFT_INTEGER:\n  attr = cfin.Parameter;\n  val  = cfin.Value;\n  switch (attr) {\n    case MQIA_DEF_PERSISTENCE:\n      fn = MQPER_STR;\n      break;\n    ...\n  }\n  valString = fn(val);\n...\n}<\/pre>\n\n\n\n<p>The <em>switch <\/em>statements have been built by hand, and have to be reviewed at each release. They are also not necessarily complete.  In particular, most of these solutions do not call out the attributes needing no conversion. Because the lists are then incomplete, it&#8217;s hard to spot when there&#8217;s something new that needs to be added.<\/p>\n\n\n\n<p>A quick check of the MQI definitions gives about 750 entries in the MQIA range and its subranges such as MQIACF. While roughly half of these do not need interpretation of the value (<code>MQIA_CURRENT_Q_DEPTH<\/code> references a number that really is just a number), that still leaves a lot of functions that could be called.<\/p>\n\n\n\n<p>I&#8217;ve recently had some MQ developers asking about the best way to handle this problem for various projects. I referred them to these existing solutions, but it got me thinking about creating a better one.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The new solution<\/h3>\n\n\n\n<p>The new approach is to create a function or table that handles the mapping between the attributes and their value converter. With the additional requirement that the function also needs to know which attributes do not actually need a string conversion. And it needs to be kept up-to-date.<\/p>\n\n\n\n<p>I extracted a list of all of the 750 MQIA definitions and used existing material to make an initial version of the map. If <strong>amqsevt <\/strong>or <strong>MS0P <\/strong>knew about the definition, I used that as the starting point. Various one-off <strong>awk <\/strong>or <strong>sed <\/strong>or <strong>grep <\/strong>scripts pulled out the interesting lines and formatted them. Previously-unknown definitions were added to the map with a deliberate syntax error, to ensure they would be checked. And then I went through the list of both known and unknown values to verify it line by line.<\/p>\n\n\n\n<p>You can see the final result in the file <em><a href=\"https:\/\/github.com\/ibm-messaging\/mq-golang\/blob\/master\/ibmmq\/mqiPCFstr.go\" target=\"_blank\" rel=\"noreferrer noopener\">mqiPCFstr.go<\/a><\/em>. It has a complete map, returning the prefix:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">var pcfAttrMap = map[int32]string{\n  MQIA_ACCOUNTING_CONN_OVERRIDE:  \"MQMON\",\n  MQIA_ACCOUNTING_INTERVAL:       \"\",\n  MQIA_ACTIVE_CHANNELS:           \"\",\n  MQIA_ACTIVITY_CONN_OVERRIDE:    \"MQMON\",\n  MQIA_ACTIVITY_RECORDING:        \"MQRECORDING\",\n  MQIA_ACTIVITY_TRACE:            \"MQMON\",\n  MQIA_ADOPT_CONTEXT:             \"MQADPCTX\",\n  MQIA_ADOPTNEWMCA_CHECK:         \"MQADOPT_CHECK\",\n...<\/pre>\n\n\n\n<p>An empty string implies that no conversion is required. The value is just a number.<\/p>\n\n\n\n<p>This map was still hand-validated. Which was tedious and took time. But it was hopefully a one-time cost. The release process for the Go libraries now includes a check for any newly-defined attributes as all of the current attributes are in the map &#8211; not just those that need a conversion. That check will prompt an update to the map. The update has to be done manually, as we still can&#8217;t know what the new mapping function is. But there ought not to be a huge number of additional attributes to verify at each release. So this becomes a sustainable and maintainable piece of code.<\/p>\n\n\n\n<p>The Go file also includes a couple of helper functions to navigate the map: <code>PCFAttrToPrefix<\/code> and <code>PCFValueToString<\/code>look in the map and return either the mapping prefix or the converted string itself.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other languages<\/h3>\n\n\n\n<p>Only the Go library currently provides this mapping. But it is fairly easy to convert into other languages. One of MQ&#8217;s Java components has already adopted it, doing a mechanical conversion into Java with a <em>HashMap<\/em> initialisation. Something like an awk script can trivially take the relevant lines from Go and reformat into the corresponding syntax for a different environment.<\/p>\n\n\n\n<p>And I can even see how I might rewrite it for the C event formatter if it was useful. Even though C does not have an in-built Map type, the fact that the key is an integer means that we could generate a <a href=\"https:\/\/marketaylor.synology.me\/?p=1140\" target=\"_blank\" rel=\"noreferrer noopener\">switch\/case block<\/a> fairly easily and efficiently.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Samples<\/h3>\n\n\n\n<p>I&#8217;ve provided two programs that show how to use this new map.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">amqspcf.go<\/h4>\n\n\n\n<p>In the <a href=\"https:\/\/github.com\/ibm-messaging\/mq-golang\/blob\/master\/samples\/amqspcf.go\" target=\"_blank\" rel=\"noreferrer noopener\">mq-golang<\/a> repository, the already-available PCF sample program has been updated. <\/p>\n\n\n\n<p>The previous version knows explicitly about the <code>MQIA_Q_TYPE<\/code>definition, but no others:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Got message of format MQADMIN and length 1752:\nName: MQCA_Q_NAME                       Value: DEV.QUEUE.1\nName: MQIA_Q_TYPE                       Value: MQQT_LOCAL\nName: MQIA_ACCOUNTING_Q                 Value: -3\nName: MQCA_ALTERATION_DATE              Value: 2024-12-10\nName: MQCA_ALTERATION_TIME              Value: 11.30.47\nName: MQCA_BACKOUT_REQ_Q_NAME           Value:\nName: MQIA_BACKOUT_THRESHOLD            Value: 0\nName: MQIA_CAP_EXPIRY                   Value: -1\n...<\/pre>\n\n\n\n<p>The updated version can format all of the integer values:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Got message of format MQADMIN and length 1752:\nName: MQCA_Q_NAME                       Value: DEV.QUEUE.1\nName: MQIA_Q_TYPE                       Value: MQQT_LOCAL\nName: MQIA_ACCOUNTING_Q                 Value: MQMON_Q_MGR\nName: MQCA_ALTERATION_DATE              Value: 2024-12-10\nName: MQCA_ALTERATION_TIME              Value: 11.30.47\nName: MQCA_BACKOUT_REQ_Q_NAME           Value:\nName: MQIA_BACKOUT_THRESHOLD            Value: 0\nName: MQIA_CAP_EXPIRY                   Value: MQCEX_NOLIMIT\n...<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">amqsevtg<\/h4>\n\n\n\n<p>A bigger test that helped verify the processing is one that looks at MQ&#8217;s Event messages. I started writing a test program that could format all of the different event types, as those cover just about all of the PCF attributes. As I expanded the scope of the testing, I found that I essentially had a replica of the <strong>amqsevt <\/strong>product sample. <\/p>\n\n\n\n<p>And having done that, I decided to continue some of the OpenTelemetry integration activity that I&#8217;ve covered in other recent articles here. The program has a feature to output the formatted events directly to an OTel backend instead of <a href=\"https:\/\/marketaylor.synology.me\/?p=1542\" target=\"_blank\" rel=\"noreferrer noopener\">going via a file or named pipe<\/a> intermediate route. While not part of the PCF processing itself, it was interesting to see just how different OTel&#8217;s approach is for APIs to capture logging, compared to metrics and traces. <\/p>\n\n\n\n<p>Because this program turned out to be somewhat larger than originally intended, I&#8217;ve put it into the <a href=\"https:\/\/github.com\/ibm-messaging\/mq-metric-samples\/tree\/master\/amqsevtg\" target=\"_blank\" rel=\"noreferrer noopener\">mq-metrics-samples<\/a> repository instead of the core Go repository&#8217;s samples. Take a look at the README file to see the options and how it differs from the product <strong>amqsevt <\/strong>program. But as a demonstration, I can run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">go run . -e localhost:4317 -i -w 1 -m QM1<\/pre>\n\n\n\n<p>and in a locally-running OTel Collector, I see output like:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">LogRecord #6\nObservedTimestamp: 2025-01-13 11:28:20.433205975 +0000 UTC\nTimestamp: 2025-01-13 11:28:20.433204717 +0000 UTC\nSeverityText:\nSeverityNumber: Info(9)\nBody: Str({\"eventSource\":{\"objectName\":\"SYSTEM.ADMIN.CONFIG.EVENT\",\"objectType\":\"Queue\",\"queueManager\":\"QM1\"},\"eventType\":{\"name\":\"Config Event\",\"value\":43},\"eventReason\":{\"name\":\"Config Change Object\",\"value\":2368},\"eventCreation\":{\"timeStamp\":\"2025-01-13T11:20:37.2Z\",\"epoch\":1736767237},\"correlationID\":\"414d5120514d3120202020202020202050c980675d0f9040\",\"objectState\":\"After Change\",\"eventData\":{\"accountingQ\":\"Queue Mgr\",\"alterationDate\":\"2025-01-13\",\"alterationTime\":\"11.20.36\",\"backoutReqQName\":\"\",\"backoutThreshold\":0,\"capExpiry\":\"Nolimit\",\"clusChlName\":\"\",\"clusterName\":\"\",\"clusterNamelist\":\"\",\"clwlQPriority\":0,\"clwlQRank\":0,\"clwlUseq\":\"Useq As Queue Mgr\",\"creationDate\":\"2022-02-22\",\"creationTime\":\"12.19.26\",\"custom\":\"\",\"defBind\":\"Bind On Open\",\"defInputOpenOption\":\"Input Shared\",\"defPersistence\":\"Not Persistent\",\"defPriority\":0,\"defPutResponseType\":\"Sync Response\",\"defReadAhead\":\"No\",\"definitionType\":\"Predefined\",\"distLists\":\"Not Supported\",\"eventOrigin\":\"Mqset\",\"eventQMgr\":\"QM1\",\"eventUserId\":\"metaylor\",\"hardenGetBackout\":\"Backout Hardened\",\"inhibitGet\":\"Get Inhibited\",\"inhibitPut\":\"Put Allowed\",\"initiationQName\":\"\",\"maxMsgLength\":4194304,\"maxQDepth\":5000,\"maxQFileSize\":\"Default\",\"mediaImageRecoverQ\":\"As Queue Mgr\",\"monitoringQ\":\"Queue Mgr\",\"msgDeliverySequence\":\"Priority\",\"npmClass\":\"Class Normal\",\"objectType\":\"Queue\",\"processName\":\"\",\"propertyControl\":\"Compatibility\",\"qDepthHighEvent\":\"Disabled\",\"qDepthHighLimit\":80,\"qDepthLowEvent\":\"Disabled\",\"qDepthLowLimit\":20,\"qDepthMaxEvent\":\"Enabled\",\"qDesc\":\"\",\"qName\":\"QM2.RETRY\",\"qServiceInterval\":999999999,\"qServiceIntervalEvent\":\"None\",\"qType\":\"Local\",\"retentionInterval\":999999999,\"scope\":\"Queue Mgr\",\"shareability\":\"Shareable\",\"statisticsQ\":\"Queue Mgr\",\"streamQueueName\":\"\",\"streamQueueQos\":\"Best Effort\",\"triggerControl\":\"Off\",\"triggerData\":\"\",\"triggerDepth\":1,\"triggerMsgPriority\":0,\"triggerType\":\"First\",\"usage\":\"Transmission\"}})\nAttributes:\n     -&gt; eventCreation: Str(2025-01-13T11:20:37.2Z)<\/pre>\n\n\n\n<p>You can see the JSON body of the event with all the formatted attributes.<\/p>\n\n\n\n<p>There is also a test script to drive the creation of various kinds of events. You would need to modify the script for your own environment, but it shows an outline of how to work with these events and a consuming program.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p>This problem exists for many MQ monitoring applications. Maybe, one day, the product itself will include an externalised version of this map. But until it does, I hope this is a useful piece of work.<\/p>\n<p class=\"last-modified\" style=\"border:1px solid;padding: 10px;\">This post was last updated on March 2nd, 2025 at 05:37 pm<\/p>","protected":false},"excerpt":{"rendered":"<p>In MQ V8, a new header file made it easy for C programs to convert MQI numbers into the corresponding string definition. For example, turning 2035 into MQRC_NOT_AUTHORIZED. For formatting PCF-based messages such as events, you can easily convert the names of fields in those events using functions like MQIA_STR or MQCACH_STR. But what about &hellip; <a href=\"https:\/\/marketaylor.synology.me\/?p=1689\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;MQ PCF value formatting&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[36,35,20,40],"class_list":["post-1689","post","type-post","status-publish","format-standard","hentry","category-mq","tag-golang","tag-ibmmq","tag-mqseries","tag-pcf"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MQ PCF value formatting - Mark Taylor&#039;s Blog<\/title>\n<meta name=\"description\" content=\"A new function in the Go library helps MQ PCF value formatting of attributes into readable text. The function and samples are discussed here.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/marketaylor.synology.me\/?p=1689\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MQ PCF value formatting - Mark Taylor&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"A new function in the Go library helps MQ PCF value formatting of attributes into readable text. The function and samples are discussed here.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/marketaylor.synology.me\/?p=1689\" \/>\n<meta property=\"og:site_name\" content=\"Mark Taylor&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2025-02-27T11:39:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-02T17:37:44+00:00\" \/>\n<meta name=\"author\" content=\"Mark\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@marketaylor\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mark\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/marketaylor.synology.me\\\/?p=1689#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/marketaylor.synology.me\\\/?p=1689\"},\"author\":{\"name\":\"Mark\",\"@id\":\"https:\\\/\\\/marketaylor.synology.me\\\/#\\\/schema\\\/person\\\/2d6f4113ff54187023e20c20186bbb3c\"},\"headline\":\"MQ PCF value formatting\",\"datePublished\":\"2025-02-27T11:39:15+00:00\",\"dateModified\":\"2025-03-02T17:37:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/marketaylor.synology.me\\\/?p=1689\"},\"wordCount\":1266,\"commentCount\":1,\"keywords\":[\"golang\",\"ibmmq\",\"mqseries\",\"pcf\"],\"articleSection\":[\"IBM MQ\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/marketaylor.synology.me\\\/?p=1689#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/marketaylor.synology.me\\\/?p=1689\",\"url\":\"https:\\\/\\\/marketaylor.synology.me\\\/?p=1689\",\"name\":\"MQ PCF value formatting - Mark Taylor&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/marketaylor.synology.me\\\/#website\"},\"datePublished\":\"2025-02-27T11:39:15+00:00\",\"dateModified\":\"2025-03-02T17:37:44+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/marketaylor.synology.me\\\/#\\\/schema\\\/person\\\/2d6f4113ff54187023e20c20186bbb3c\"},\"description\":\"A new function in the Go library helps MQ PCF value formatting of attributes into readable text. The function and samples are discussed here.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/marketaylor.synology.me\\\/?p=1689#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/marketaylor.synology.me\\\/?p=1689\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/marketaylor.synology.me\\\/?p=1689#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/marketaylor.synology.me\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MQ PCF value formatting\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/marketaylor.synology.me\\\/#website\",\"url\":\"https:\\\/\\\/marketaylor.synology.me\\\/\",\"name\":\"Mark Taylor&#039;s Blog\",\"description\":\"Messaging, Music and Moving Around\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/marketaylor.synology.me\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/marketaylor.synology.me\\\/#\\\/schema\\\/person\\\/2d6f4113ff54187023e20c20186bbb3c\",\"name\":\"Mark\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9a5ae091c43730194cba7cabb5d65c1dc3f48d05caaddec6ff2319a1ce66376f?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9a5ae091c43730194cba7cabb5d65c1dc3f48d05caaddec6ff2319a1ce66376f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9a5ae091c43730194cba7cabb5d65c1dc3f48d05caaddec6ff2319a1ce66376f?s=96&d=mm&r=g\",\"caption\":\"Mark\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/marketaylor\"],\"url\":\"https:\\\/\\\/marketaylor.synology.me\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MQ PCF value formatting - Mark Taylor&#039;s Blog","description":"A new function in the Go library helps MQ PCF value formatting of attributes into readable text. The function and samples are discussed here.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/marketaylor.synology.me\/?p=1689","og_locale":"en_GB","og_type":"article","og_title":"MQ PCF value formatting - Mark Taylor&#039;s Blog","og_description":"A new function in the Go library helps MQ PCF value formatting of attributes into readable text. The function and samples are discussed here.","og_url":"https:\/\/marketaylor.synology.me\/?p=1689","og_site_name":"Mark Taylor&#039;s Blog","article_published_time":"2025-02-27T11:39:15+00:00","article_modified_time":"2025-03-02T17:37:44+00:00","author":"Mark","twitter_card":"summary_large_image","twitter_creator":"@marketaylor","twitter_misc":{"Written by":"Mark","Estimated reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/marketaylor.synology.me\/?p=1689#article","isPartOf":{"@id":"https:\/\/marketaylor.synology.me\/?p=1689"},"author":{"name":"Mark","@id":"https:\/\/marketaylor.synology.me\/#\/schema\/person\/2d6f4113ff54187023e20c20186bbb3c"},"headline":"MQ PCF value formatting","datePublished":"2025-02-27T11:39:15+00:00","dateModified":"2025-03-02T17:37:44+00:00","mainEntityOfPage":{"@id":"https:\/\/marketaylor.synology.me\/?p=1689"},"wordCount":1266,"commentCount":1,"keywords":["golang","ibmmq","mqseries","pcf"],"articleSection":["IBM MQ"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/marketaylor.synology.me\/?p=1689#respond"]}]},{"@type":"WebPage","@id":"https:\/\/marketaylor.synology.me\/?p=1689","url":"https:\/\/marketaylor.synology.me\/?p=1689","name":"MQ PCF value formatting - Mark Taylor&#039;s Blog","isPartOf":{"@id":"https:\/\/marketaylor.synology.me\/#website"},"datePublished":"2025-02-27T11:39:15+00:00","dateModified":"2025-03-02T17:37:44+00:00","author":{"@id":"https:\/\/marketaylor.synology.me\/#\/schema\/person\/2d6f4113ff54187023e20c20186bbb3c"},"description":"A new function in the Go library helps MQ PCF value formatting of attributes into readable text. The function and samples are discussed here.","breadcrumb":{"@id":"https:\/\/marketaylor.synology.me\/?p=1689#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/marketaylor.synology.me\/?p=1689"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/marketaylor.synology.me\/?p=1689#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/marketaylor.synology.me\/"},{"@type":"ListItem","position":2,"name":"MQ PCF value formatting"}]},{"@type":"WebSite","@id":"https:\/\/marketaylor.synology.me\/#website","url":"https:\/\/marketaylor.synology.me\/","name":"Mark Taylor&#039;s Blog","description":"Messaging, Music and Moving Around","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/marketaylor.synology.me\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/marketaylor.synology.me\/#\/schema\/person\/2d6f4113ff54187023e20c20186bbb3c","name":"Mark","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/9a5ae091c43730194cba7cabb5d65c1dc3f48d05caaddec6ff2319a1ce66376f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9a5ae091c43730194cba7cabb5d65c1dc3f48d05caaddec6ff2319a1ce66376f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9a5ae091c43730194cba7cabb5d65c1dc3f48d05caaddec6ff2319a1ce66376f?s=96&d=mm&r=g","caption":"Mark"},"sameAs":["https:\/\/x.com\/marketaylor"],"url":"https:\/\/marketaylor.synology.me\/?author=1"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/marketaylor.synology.me\/index.php?rest_route=\/wp\/v2\/posts\/1689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marketaylor.synology.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/marketaylor.synology.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/marketaylor.synology.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/marketaylor.synology.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1689"}],"version-history":[{"count":14,"href":"https:\/\/marketaylor.synology.me\/index.php?rest_route=\/wp\/v2\/posts\/1689\/revisions"}],"predecessor-version":[{"id":1737,"href":"https:\/\/marketaylor.synology.me\/index.php?rest_route=\/wp\/v2\/posts\/1689\/revisions\/1737"}],"wp:attachment":[{"href":"https:\/\/marketaylor.synology.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/marketaylor.synology.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/marketaylor.synology.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}