IBM MQ Fix Pack 9.2.0.5 Released

IBM has just released Fix Pack 9.2.0.5 for IBM MQ V9.2 LTS:
https://www.ibm.com/support/pages/downloading-ibm-mq-9205

Regards,
Roger Lacroix
Capitalware Inc.

Fix Packs for MQ, IBM i (OS/400), IBM MQ, IBM MQ Appliance, Linux, Unix, Windows Comments Off on IBM MQ Fix Pack 9.2.0.5 Released

Capitalware Products Listed at LinkedIn

The other day, MQGem posted a blog item about a new feature at LinkedIn where a company can list their products.

I’ve have created a LinkedIn page for Capitalware and then added all 17 commercial products that Capitalware sells. You can view the entire list of Capitalware products at https://www.linkedin.com/company/capitalware/products/ page.

The interesting feature that LinkedIn added for users is the ability to add a product skill to your profile. To add a skill, simple go to Capitalware’s LinkedIn product page and click on the + Add as skill  button to include it in your profile. Its that easy.

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, Education, IBM i (OS/400), IBM MQ, Linux, MQ Auditor, MQ Authenticate User Security Exit, MQ Channel Connection Inspector, MQ Channel Encryption, MQ Channel Throttler, MQ Enterprise Security Suite, MQ Message Compression, MQ Message Encryption, MQ Message Replication, MQ Standard Security Exit, Unix, Windows, z/OS Comments Off on Capitalware Products Listed at LinkedIn

Explanation of Parameters in an IniFile of Capitalware Products

I have a new customer who is having a problem understanding parameters and relations of parameters in the IniFile (initialization file aka configuration file).

By no means am I taking a shot or putting down or marking fun of the customer. When English is not your first language and a new user is trying to read and understand English documentation, it is a difficult task for them.

I’ll use MQ Auditor on Linux as the example since that is the product they are having issues with but most of the following can be applied to any other back-end Capitalware product.

The customer was trying to setup MQ Auditor for use with the MQ MI (aka MQ HA) setup. They were trying to use the same path for everything.

For all Capitalware back-end products (i.e. exits), I have created and used defaults paths and filenames, so that the end-user can install and get up and running in 12-15 minutes. Once they get a feel for the product, they then can tailor it to fit into their MQ environment.

Things to remember:

  1. The location of the shared-library (Unix/Linux), Exit Module (IBM i) or DLL (Windows) has absolutely no bearing on any other parameter but the 32-bit and 64-bit libraries must be in separate directories (folders).
  2. The location of the IniFile has absolutely no bearing on any other parameter.
  3. The name of the IniFile (I did not say ‘mqa.ini’) has absolutely no bearing on any other parameter.
  4. The location of the Audit directory has absolutely no bearing on any other parameter.
  5. The location of the Archive directory has absolutely no bearing on any other parameter.
  6. The location of the LogFile has absolutely no bearing on any other parameter.
  7. The name of the LogFile (I did not say ‘mqa.log’) has absolutely no bearing on any other parameter.
  8. The location of the ExitPath has absolutely no bearing on any other parameter

The following is a valid setup for MQ Auditor on Linux:

(1) MQ Auditor can be installed in: /opt/Capitalware/MQA/exits/ and /opt/Capitalware/MQA/exits64/ rather than the default directories of /var/mqm/exits/ and /var/mqm/exits64/.

i.e. the queue manager’s qmi.ini file:

ExitPath:
   ExitsDefaultPath=/opt/Capitalware/MQA/exits:/var/mqm/exits
   ExitsDefaultPath64=/opt/Capitalware/MQA/exits64:/var/mqm/exits64

(2 & 3) The IniFile name will be ‘mqlt1.ini‘ (rather than ‘mqa.ini’, the default name) because the queue manager is called MQLT1 and I want to associate the filename with the queue manager name. The location of the IniFile will be /roger/loves/lasagna/ directory rather than the default directory of /var/mqm/exits64/.
i.e. the queue manager’s qmi.ini file:

ApiExitLocal:
   Sequence=1
   Name=MQA
   Function=EntryPoint
   Module=mqa
   Data=/roger/loves/lasagna/mqlt1.ini

As I have documented in the MQ Auditor Installation and Operation manual, the value for the Data parameter cannot exceed a length of 32 characters. This is an explicit IBM MQ requirement. I get emails all the time asking me to increase the length but I cannot because IBM is responsible for this feature/restriction.

The same restriction applies to Exit Data fields for channels. i.e. SecurityUserData, MsgUserData, SendUserData, ReceiveUserData, etc. Now, if I had a bone to pick with IBM, it would be, why did you make the Exit fields a length of 128 characters but limit the corresponding Exit Data field to only 32 characters. Why didn’t you make them both the same length? It is just one of those quirks in IBM MQ that you need to remember.

(4) The Audit directory can be /some/file/system/with/lots/of/room/ rather than the default directory of /var/mqm/audit/.
i.e. in the IniFile aka mqlt1.ini

AuditPath=/some/file/system/with/lots/of/room/

(5) The Archive directory can be /holy/cow/this/is/really/really/huge/ rather than the default directory of /var/mqm/audit/archive/.
i.e. in the IniFile aka mqlt1.ini

AuditArchivePath=/holy/cow/this/is/really/really/huge/

(6 & 7) The LogFile name will be ‘mqlt1.log‘ because the queue manager is called MQLT1 and I want to associate the log file with the queue manger rather than use the default filename of ‘mqa.log’. Hence, the location will be /roger/hates/liver/and/bloodpudding/ rather than the default directory of /var/mqm/audit/.
i.e. in the IniFile aka mqlt1.ini

LogFile=/roger/hates/liver/and/bloodpudding/mqlt1.log

(8) The ExitPath directory will be where the 64-bit shared-library files are stored. i.e. from above in # 1: /opt/Capitalware/MQA/exits64/ rather than the default directory of /var/mqm/exits64/.
i.e. in the IniFile aka mqlt1.ini

ExitPath=/opt/Capitalware/MQA/exits64/

The ExitPath parameter will be used by MQ Auditor as the default “home directory“. What do I mean by that? Lets say you don’t want to explicitly set the LogFile’s path and filename. You just want to specify the filename.
i.e. in the IniFile aka mqlt1.ini

LogFile=mqlt1.log

So, MQ Auditor will prefix the value for ExitPath to the LogFile value to create a fully qualified path and filename.

Hopefully, this will help new and existing customers who are using Capitalware’s back-end products to feel more confident in their usage.

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, IBM i (OS/400), IBM MQ, MQ Auditor, MQ Authenticate User Security Exit, MQ Channel Connection Inspector, MQ Channel Encryption, MQ Channel Throttler, MQ Enterprise Security Suite, MQ Message Compression, MQ Message Encryption, MQ Message Replication, MQ Standard Security Exit, Unix, Windows, z/OS Comments Off on Explanation of Parameters in an IniFile of Capitalware Products

Reasons to run Java on your IBM Z Mainframe

Wayne Bucek of IBM has created and posted a video on running Java on the mainframe (z/OS) titled: “Reasons to run Java on your IBM Z Mainframe

Regards,
Roger Lacroix
Capitalware Inc.

Java, JMS, Programming, z/OS Comments Off on Reasons to run Java on your IBM Z Mainframe

Idea: Make IBM MQ for Windows on ARM available

I have posted an “IBM idea” called: Make IBM MQ for Windows on ARM available.

If you are interested in it, please add your vote/comment to it.

Regards,
Roger Lacroix
Capitalware Inc.

C, C#, C++, IBM MQ, Java, JMS, Operating Systems, Programming, Windows Comments Off on Idea: Make IBM MQ for Windows on ARM available

Updated SimpleLogger Class

The other day, someone emailed me and asked if I could add code to externalize the default values used by the SimpleLogger Class. I thought about it and figured it would be reasonably straight forward.

Hence, here are the JVM Environment variables that the SimpleLogger Class supports:

  • SimpleLogger.LogFileName – any valid file name
  • SimpleLogger.LogDirectory – any valid local directory
  • SimpleLogger.IncludePackageName – valid values are: true or false
  • SimpleLogger.LogLevel – valid values are: debug, info, warn or error
  • SimpleLogger.MaxBackupFiles – any valid integer
  • SimpleLogger.MaxFileSize – any valid integer
  • SimpleLogger.LogRotationType – valid values are: daily or size

I also added a new setLogFile method that takes no paramteres.

I have generated the JavaDocs for the SimpleLogger class and created a JAR file for SimpleLogger for users to use. I zipped up the JavaDocs, JAR file and the source code for both Test_SimpleLogger.java program and SimpleLogger.java. You can download the it from here.

Simply add the SimpleLogger JAR file to your application or add the SimpleLogger source code to your utility (or handler) package of your application and then start using it.

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, HPE NonStop, IBM i (OS/400), Java, JMS, Linux, macOS (Mac OS X), Open Source, Programming, Raspberry Pi, Unix, Windows Comments Off on Updated SimpleLogger Class

IBM MQ Fix Pack 9.1.0.10 Released

IBM has just released Fix Pack 9.1.0.10 for IBM MQ V9.1 LTS:
https://www.ibm.com/support/pages/downloading-ibm-mq-91010

Regards,
Roger Lacroix
Capitalware Inc.

Fix Packs for MQ, IBM i (OS/400), IBM MQ, Linux, Unix, Windows Comments Off on IBM MQ Fix Pack 9.1.0.10 Released

My SimpleLogger can be a Replacement for Log4J

In this blog post, don’t get me wrong, I think Log4J is a great product and I am not trying to discourage anyone from using it.

I have used Log4J v1.x on hundreds of projects for customers and myself. It has always worked exactly as expected. I have never used Log4J v2.x, so I cannot/will not comment on the current security vulnerability that has been discovered.

All of the logging I have configured for use with Log4J has been extremely basic. I use the basic appender and have it write to a file. That’s it. Basically, I am using probably 5% of the available features. So, over time, I have been slowing moving away from Log4J and just using my own simple logger because that is all I have ever needed.

So, this week I spent some time prettying up my SimpleLogger code. It was written in a similar style to Log4J but there is no configuration file for it. The code is thread-safe and can be used in any project that requires simple logging code.

  • public static void setLogFile(String logFileName)
  • public static void setLogFile(String logFileName, String logDirectory)
  • public static void close()
  • public static void setIncludePackageName(boolean flag)
  • public static void setLevel(LogLevel ll)
  • public static void setMaxBackupFiles(int maxCount)
  • public static void setMaxFileSize(int maxSize)
  • public static void setRotationType(LogRotationType rt)
  • public static void error(Object data)
  • public static void warn(Object data)
  • public static void info(Object data)
  • public static void debug(Object data)
  • public static void errorDump(String title, byte[] data)
  • public static void warnDump(String title, byte[] data)
  • public static void infoDump(String title, byte[] data)
  • public static void debugDump(String title, byte[] data)

Here is a simple tester Java program that shows how to use the various methods:

package com.capitalware.logging;

import com.capitalware.logging.SimpleLogger.*;

/**
 * This class will test the SimpleLogger class.
 *
 * @author Roger Lacroix, Capitalware Inc.
 * @version 1.0.0
 * @license Apache 2 License
 */
public class Test_Logger
{
   public Test_Logger()
   {
      SimpleLogger.setLogFile("Test_Logger.log", "C:\\temp\\");
      SimpleLogger.setLevel(LogLevel.DEBUG);
      SimpleLogger.setRotationType(LogRotationType.SIZE);
      SimpleLogger.setIncludePackageName(false);

      SimpleLogger.error("this is a test message for error.");
      SimpleLogger.warn("this is a test message for warn.");
      SimpleLogger.info("this is a test message for info.");
      SimpleLogger.debug("this is a test message for debug.");

      SimpleLogger.debugDump("Kids song", "Mary had a little lamb, Little lamb, little lamb, Mary had a little lamb Whose fleece was white as snow.".getBytes());

      SimpleLogger.close();
   }

   public static void main(String[] args)
   {
      new Test_Logger();
   }
}

Here’s what the output looks like in the log file:

2021/12/15 20:27:58.187 ERROR (Test_Logger.<init>) this is a test message for error.
2021/12/15 20:27:58.188 WARN  (Test_Logger.<init>) this is a test message for warn.
2021/12/15 20:27:58.188 INFO  (Test_Logger.<init>) this is a test message for info.
2021/12/15 20:27:58.188 DEBUG (Test_Logger.<init>) this is a test message for debug.
2021/12/15 20:27:58.188 DEBUG (Test_Logger.<init>) Kids song -->>
2021/12/15 20:27:58.188 DEBUG (Test_Logger.<init>) 000000: 4D617279 20686164 2061206C 6974746C 65206C61 6D622C20 4C697474 6C65206C  Mary had a little lamb, Little l
2021/12/15 20:27:58.188 DEBUG (Test_Logger.<init>) 000020: 616D622C 206C6974 746C6520 6C616D62 2C204D61 72792068 61642061 206C6974  amb, little lamb, Mary had a lit
2021/12/15 20:27:58.188 DEBUG (Test_Logger.<init>) 000040: 746C6520 6C616D62 2057686F 73652066 6C656563 65207761 73207768 69746520  tle lamb Whose fleece was white 
2021/12/15 20:27:58.188 DEBUG (Test_Logger.<init>) 000060: 61732073 6E6F772E                                                        as snow.                        
2021/12/15 20:27:58.188 DEBUG (Test_Logger.<init>) <<-----

I have generated the JavaDocs for the SimpleLogger class and created a JAR file for SimpleLogger for users to use. I zipped up the JavaDocs, JAR file and the source code for both Test_SimpleLogger.java program and SimpleLogger.java. You can download the it from here.

Simply add the SimpleLogger JAR file to your application or add the SimpleLogger source code to your utility (or handler) package of your application and then start using it.

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, HPE NonStop, IBM i (OS/400), Java, JMS, Linux, macOS (Mac OS X), Open Source, Programming, Raspberry Pi, Unix, Windows Comments Off on My SimpleLogger can be a Replacement for Log4J

IBM’s Response to the Log4J Vulnerability

Here is a link to a list of IBM products that are affected by the Log4J v2.x vulnerability (CVE-2021-44228):
https://www.ibm.com/blogs/psirt/page/2/?s=2021-44228

The only IBM MQ related hit so far is for IBM MQ Blockchain bridge.

Note: This is an actively growing list of IBM products. Hence, you should check back each day.

Here is a link to the Log4J v2.x vulnerability description:
https://unit42.paloaltonetworks.com/apache-log4j-vulnerability-cve-2021-44228/

Regards,
Roger Lacroix
Capitalware Inc.

IBM MQ, Linux, Programming, Security, Unix, Windows, z/OS Comments Off on IBM’s Response to the Log4J Vulnerability

Log4J Vulnerability And Capitalware Products

For those who have not heard, there is a new vulnerability in Log4J v2.x. Here is a link to the Log4J v2.x vulnerability:
https://unit42.paloaltonetworks.com/apache-log4j-vulnerability-cve-2021-44228/

The Log4J v2.x vulnerability is related to the ‘lookups’ feature that was introduced in version 2.

Lookups provide a way to add values to the log4j configuration at arbitrary places. They are a particular type of Plugin that implements the StrLookup interface.

Any application that is using Log4J v2.x needs to upgrade to Log4J v2.16.0 (or later) immediately.

No Capitalware product uses Log4J v2.x.

There are 4 Capitalware product using Log4J v1.x. Note: Log4J v1.x does not have the ‘lookups’ feature, hence, it is not at risk of the vulnerability described above.

End-users cannot change the Log4J jar file in MQ Batch Toolkit because it is compiled and linked using Excelsior Jet. Both AQOL and UFM are supplied as a regular form with a script / batch file to launch them. If the Log4J v1.x was upgraded in either JAUSX, AQOL and/or UFM to Log4J v2.x then it is the responsibility of the end-user to immediately either (1) put back Log4J v1.x or (2) download and install Log4J v2.16.0 (or later).

Note: None of the 4 components use the JMSAppender with Log4J v1.x.

Please take this vulnerability seriously.

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, IBM i (OS/400), Java, JMS, Linux, macOS (Mac OS X), MQ Auditor, MQ Batch Toolkit, Open Source, Programming, Raspberry Pi, Security, Universal File Mover, Unix, Windows Comments Off on Log4J Vulnerability And Capitalware Products