Sandeep Chellingi will be Speaking at MQTC v2.0.1.8

Sandeep Chellingi of Prolifics will be speaking at MQ Technical Conference v2.0.1.8 (MQTC).

    Sandeep Chellingi’s Sessions:

  • MQ and IIB Deployment Patterns using Docker on IBM Cloud Private
  • MQ High Availability and Disaster recovery Implementation scenarios

For more information about MQTC, please go to:
http://www.mqtechconference.com

Regards,
Roger Lacroix
Capitalware Inc.

Education, IBM MQ, MQ Technical Conference Comments Off on Sandeep Chellingi will be Speaking at MQTC v2.0.1.8

Fedora 28 Released

Fedora Project Contributors have just released Fedora v28.
https://fedoraproject.org/wiki/Releases/28/ChangeSet

Fedora is a Linux-based operating system, a suite of software that makes your computer run. You can use the Fedora operating system to replace or to run alongside of other operating systems such as Microsoft Windows or Mac OS X. The Fedora operating system is 100% free of cost for you to enjoy and share.

Regards,
Roger Lacroix
Capitalware Inc.

Linux, Open Source, Operating Systems Comments Off on Fedora 28 Released

IBM MQ Lab Speakers’ Sessions for MQTC v2.0.1.8

The IBM MQ Lab in Hursley, UK will be sending a group of speakers (speakers names TBA) to MQ Technical Conference v2.0.1.8 (MQTC). Here are the list of sessions so far:

  • What’s New in IBM MQ
  • Introduction to IBM MQ
  • Benefiting from the IBM MQ Appliance
  • Introduction to MQ Publish/Subscribe
  • Running MQ in the Cloud
  • MQ in the Cloud – The New MQaaS offering
  • MQ Hybrid Cloud Architectures
  • Running MQ in containers
  • Connecting MQ to the Rest of the World
  • Using open-source solutions to monitor your queue managers
  • Helping MQ developers with new language bindings and developer outreach material
  • Building a highly available and scalable solution with MQ clusters?
  • MQ and MQ Appliance HA & DR
  • MQ Administration, the Web Console, & REST API
  • Where’s my message?
  • Securing your MQ environment
  • Tuning z/OS Shared Queues
  • MQ, Data Protection, and Regulatory Compliance
  • The enterprise differentiator of IBM MQ on z/OS

Note: There are another 3 MQ for z/OS sessions to be given. Session names are unknown right now.

For more information about MQTC, please go to:
http://www.mqtechconference.com

Regards,
Roger Lacroix
Capitalware Inc.

Education, IBM i (OS/400), IBM MQ, Linux, MQ Technical Conference, Programming, Security, Unix, Windows, z/OS 1 Comment

Ubuntu 18.04 Released

Ubuntu has just released Ubuntu v18.04.
http://releases.ubuntu.com/18.04/

Super-fast, easy to use and free, the Ubuntu operating system powers millions of desktops, netbooks and servers around the world. Ubuntu does everything you need it to. It’ll work with your existing PC files, printers, cameras and MP3 players. And it comes with thousands of free apps.

Regards,
Roger Lacroix
Capitalware Inc.

Linux, Open Source, Operating Systems Comments Off on Ubuntu 18.04 Released

Earth Day(s)

Now that Earth Day has passed, it is time to put it in context. There are plenty of people who don’t care about the environment and ignore the whole thing but for the ones that make an attempt, do you treat it like: Valentine’s Day, Mother’s Day, Father’s Day and your Anniversary? One and done.

There are people who will say ‘no I try all year long’ but as Yoda would say ‘don’t try, do’. 🙂

I’ve always been pretty anal about recycling glass, plastic, aluminum cans, paper, cardboard for the blue box program but that was about it. Before we moved in 2011, our previous city (Markham, Ontario) also had a green bin (organic material) program too (I wish London, Ontario would implement a green bin program.).

Researchers claim that 50% of the food in North America gets wasted, so I’ve always tried to keep food waste to a minimum. Anything in the fridge older than 4-5 days, gets fed to the dogs. Its good for the environment and saves me money on dog food, especially when there are many mouths. 🙂


Lots of dogs!!! Those mouths love leftover food!! That picture was taken in our old house, so the dogs are much older now. And yes, that is a TV remote in my left hand!! The dogs and I watch TV together.

Note: The reason my arm is in the air is because my wife walked into the room and said for me to move my arm as she wanted a picture of the dogs on me!!

Our old house had mainly incandescent light bulbs and some CFL (Compact Fluorescent Light) light bulbs aka the twisty ones. Probably a 80-20% split (20% being CFL). When we moved in 2011, our new/current house probably had 65-35% split between incandescent and CFL light bulbs (35% for CFL).

Incandescent light bulb (worst)
CFL (Compact Fluorescent Light) light bulb (better)
LED (Light-Emitting Diode) light bulb (best)

About 6-7 weeks, after we moved to our current house, I accidentally left my truck unlocked and someone ransacked it overnight but they got nothing because I really don’t have anything of value in my truck. Around 6 weeks later, my wife accidentally left her minivan unlocked and it was ransacked. My daughters (10 & 12) had left their wallets in the minivan which had some cash and several gift cards which were stolen. My wife had several gift card that were stolen too. All total, probably about $400 in cash and gift cards were stolen. My wife was mad as hell. She called the London police (London, Ontario) to report it but they said they don’t look into those crimes. They said to fill out a web form on the London police web site, “if you want to”. (Talk about making the crime statistics look good!) Oh course, that made her even madder. She said to me: I want a security camera for the front of the house and I want the outside front lights on all night.

Tyler (son #2) and I setup a PC with a USB video camera to record the front of the house. That was easy because I have lots of hardware hanging around. Our house has 5 flood lights at front that are on a timer. It was originally set for dusk to midnight. I changed it to dusk to dawn. So, that made my wife happy (except for the burglary of her minivan).

After a few weeks, I started to think about five 100 watt outside flood lights running all night long. This was just before Christmas which means we have 9 hours of daylight and 15 hours of darkness. So all night is really a long time. I started to do searches on energy consumption of light bulbs and that is when I came across LED (Light-Emitting Diode) light bulbs. I was shocked that they used roughly one-tenth the electricity of an incandescent light bulbs but they were really expensive in 2011.

We happened to be at Micro Center in Madison Heights, MI (my favorite store) and they had a sale on LED flood lights. I really don’t remember the wattage but I think they were 5 watts and were equivalent to 40 watts of an incandescent light bulb. They were less than $10 each, so I bought 5 of them and installed them when I got home. Of course, they weren’t as bright as the original flood lights but they were reasonably bright and did the job. I went from using 5 * 100 watts for 15 hours to using 5 * 5 watts (for 15 hours), now that’s a hell of a savings plus I’m actually being environmentally friendly.

This incident, of course, got me thinking. What about all the other light bulbs inside our house? I’ve never ever counted the light bulbs in our house. Have you ever count the light bulbs in your house? It is a whole lot of light bulbs, way more than I thought it had. We have 5 kids who are home-schooled and I work at home. There are lots of light bulbs being used. The following Spring, I discovered that the Province of Ontario has a program called Save on Energy. They run the program in the Spring and Fall where you get a coupons ($1, $2, $3, etc.) to use to purchase energy efficient light bulbs (they must have the Energy Star blue label on the package).

Back then, LED light bulbs were expensive, so if I was going to spend money on new LED light bulbs then I didn’t want to be wasting my money. After a bunch of research, CREE LED light bulbs were some of the best on the market. I decided to replace the light bulbs in the kitchen and family room (most used rooms). 4 Pot lights (flood) in each room. At the local Home Depot, back then I think the CREE BR30 LED 65 watt light bulbs were $17.99 each (or maybe $18.99). The CREE BR30 LEDs only uses 9.5 watts each. Amazing! The Save on Energy program had a coupon for $5.00 off (you were only allowed to buy 5 bulbs per purchase). So, I purchased 4 CREE BR30 LEDs and then went back and purchased 4 more. With tax, that was over hundred dollars for 8 light bulbs. Wow. Expensive. (At least after 6 years, they are still lighting the kitchen and family room.).

So, over the years, each Spring and Fall, I have purchased more CREE BR30 LED light bulbs – so many flood lights in this house. I think it was last Spring (or maybe Fall 2016), Canadian Tire had a sale on the Noma 3 pack 60 watt of A19 (standard bulb) plus Save on Energy had a coupon, so the end price was ONLY 99 cents. 3 LED light bulbs for 99 cents, now that is a price everyone can afford!!! Each Noma A19 LED bulb only uses 10 watts. Of course, when I checked the store stock, most stores were sold out (you needed to do the purchase in person to use the coupon). I happened to find one store that coincidentally my wife was near. I called and asked her to go and buy 5 of the 3 packs and told her to take 2 kids with her and have them each buy 5 of the 3 packs. She said ‘What? You want 45 light bulbs?’. I said yes, we have a ton of light bulbs in this house and at $15 for 45 LED light bulbs, I definitely want those LEDs. So, they bought them, brought them home and I spent an hour running around the house changing every light bulb we have. I had 3 left over when I was done!!!

Of course, everyone asks “what did you do with your old light bulbs?”. I put them in several plastic storage containers and put the containers on top of the cupboards in the utility room. The old lights bulbs still work and if/when we move, I’m taking all of my LED light bulbs with me. In total, I bought 25 CREE BR30 LED bulbs for inside of the house (and another 5 for outside), so I have spent a lot of money on them (even with the coupons). Hence, they are coming with me.

Is my electricity bill lower, yes it is. Is my environmental footprint lower because of ALL of the LED light bulbs, yes it is. This is NOT one day a year ‘thing’ but something that is done 365 days a year.

So, to my fellow “First World” people:
(1) recycle your glass, plastic, aluminum cans, paper, cardboard, etc.,
(2) manage your food waste (get a dog or 2 if you need to) and
(3) reduce your energy consumption which is REALLY easy if you switch all of your light bulbs to LED light bulbs.

Don’t be a ‘one and done’ person. Do it all year long. And as Yoda said ‘don’t try, do’.

Regards,
Roger Lacroix
Capitalware Inc.

Education, General 1 Comment

Determining if the MQ client fileset package is installed

IBM Support has posted a Technote on determining if the MQ client fileset package is installed. Example commands are listed for AIX, HP-UX, Linux, Solaris, and Windows operating systems.
https://www.ibm.com/support/docview.wss?uid=swg21299538

Regards,
Roger Lacroix
Capitalware Inc.

IBM MQ, Linux, Unix, Windows Comments Off on Determining if the MQ client fileset package is installed

Linux Help! Anyone, Anyone

Attention Linux SysAdmin gurus. I could use your Linux expertise. I have an X86-64 bit PC with SLES 11 SP2 64-bit installed. It has been running great for many years. When I turned it on this afternoon and it failed to boot with what looks like a hard drive issue.

Click to see a larger/readable image:


The PC only has 1 hard drive. One of the messages I see says that /var is not available. /var is not on a separate hard drive because it only has one hard drive.

It says to manually repair it. How do I do that? (I’m not a Linux SysAdmin.)

I would prefer to fix it, if possible. I can buy a new hard drive, install it but I just don’t want to go through the whole process of installing Linux, MQ, etc..

Help.

Regards,
Roger Lacroix
Capitalware Inc.

Linux 4 Comments

IBM MQ v8.0 End of Service Date

The end of service date for IBM MQ v8.0 on distributed platforms (Linux, Unix, Windows and IBM i) is April 30, 2020. The IBM MQ Software lifecycle page is at:
http://www-01.ibm.com/common/ssi/ShowDoc.wss?docURL=/common/ssi/rep_ca/4/897/ENUS918-054/index.html

Regards,
Roger Lacroix
Capitalware Inc.

IBM i (OS/400), IBM MQ, Linux, Unix, Windows 2 Comments

Creating A JMS (MQRFH2) Message in non-JMS Java Application

This is the third post regarding JMS (MQRFH2) messages in non-JMS application. The previous 2 are:

If you want to create JMS messages then the simplest solution is to use the IBM MQ classes for JMS. In case you didn’t know, you can run MQ/JMS applications in stand-alone mode rather than using a J2EE server (i.e. WAS, WebLogic, JBoss, etc..). Here are 2 links from the MQ Knowledge Center to get you started:

There are cases where people don’t want to create a JMS application to put JMS messages to an MQ queue. IBM doesn’t have any really good Java coding samples that demonstrate the creation of an JMS message using the MQRFH2 class. In this blog posting, I’ll show you a fully functioning non-JMS Java example that creates a JMS messages using the MQRFH2 class.

You can download the source code from here.

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Hashtable;

import com.ibm.mq.MQException;
import com.ibm.mq.MQMessage;
import com.ibm.mq.MQPutMessageOptions;
import com.ibm.mq.MQQueue;
import com.ibm.mq.MQQueueManager;
import com.ibm.mq.constants.CMQC;
import com.ibm.mq.headers.MQRFH2;

/**
 * Program Name
 *  MQTest71
 *
 * Description
 *  This java class will connect to a remote queue manager with the
 *  MQ setting stored in a HashTable and put a JMS message
 * (aka MQRFH2 message) on a queue.
 *
 * Sample Command Line Parameters
 *  -m MQA1 -h 127.0.0.1 -p 1414 -c TEST.CHL -q TEST.Q1 -u UserID -x Password
 *
 * @author Roger Lacroix
 */
public class MQTest71
{
   private static final SimpleDateFormat  LOGGER_TIMESTAMP = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS");

   private Hashtable<String,String> params;
   private Hashtable<String,Object> mqht;
   private String qMgrName;
   private String outputQName;

   /**
    * The constructor
    */
   public MQTest71()
   {
      super();
      params = new Hashtable<String,String>();
      mqht = new Hashtable<String,Object>();
   }

   /**
    * Make sure the required parameters are present.
    * @return true/false
    */
   private boolean allParamsPresent()
   {
      boolean b = params.containsKey("-h") && params.containsKey("-p") &&
                  params.containsKey("-c") && params.containsKey("-m") &&
                  params.containsKey("-q") &&
                  params.containsKey("-u") && params.containsKey("-x");
      if (b)
      {
         try
         {
            Integer.parseInt((String) params.get("-p"));
         }
         catch (NumberFormatException e)
         {
            b = false;
         }
      }

      return b;
   }

   /**
    * Extract the command-line parameters and initialize the MQ HashTable.
    * @param args
    * @throws IllegalArgumentException
    */
   private void init(String[] args) throws IllegalArgumentException
   {
      int port = 1414;
      if (args.length > 0 && (args.length % 2) == 0)
      {
         for (int i = 0; i < args.length; i += 2)
         {
            params.put(args[i], args[i + 1]);
         }
      }
      else
      {
         throw new IllegalArgumentException();
      }

      if (allParamsPresent())
      {
         qMgrName = (String) params.get("-m");
         outputQName = (String) params.get("-q");

         try
         {
            port = Integer.parseInt((String) params.get("-p"));
         }
         catch (NumberFormatException e)
         {
            port = 1414;
         }

         mqht.put(CMQC.CHANNEL_PROPERTY, params.get("-c"));
         mqht.put(CMQC.HOST_NAME_PROPERTY, params.get("-h"));
         mqht.put(CMQC.PORT_PROPERTY, new Integer(port));
         mqht.put(CMQC.USER_ID_PROPERTY, params.get("-u"));
         mqht.put(CMQC.PASSWORD_PROPERTY, params.get("-x"));

         // I don't want to see MQ exceptions at the console.
         MQException.log = null;
      }
      else
      {
         throw new IllegalArgumentException();
      }
   }

   /**
    * Connect, open queue, write a message, close queue and disconnect.
    *
    */
   private void testSend()
   {
      MQQueueManager qMgr = null;
      MQQueue queue = null;
      String msgData = "This is a test message from MQTest71";
      int openOptions = CMQC.MQOO_OUTPUT + CMQC.MQOO_FAIL_IF_QUIESCING;
      MQPutMessageOptions pmo = new MQPutMessageOptions();

      try
      {
         qMgr = new MQQueueManager(qMgrName, mqht);
         MQTest71.logger("successfully connected to "+ qMgrName);

         queue = qMgr.accessQueue(outputQName, openOptions);
         MQTest71.logger("successfully opened "+ outputQName);

         MQMessage sendmsg = new MQMessage();

         // Set the RFH2 Values
         MQRFH2 rfh2 = new MQRFH2();
         rfh2.setEncoding(CMQC.MQENC_NATIVE);
         rfh2.setCodedCharSetId(CMQC.MQCCSI_INHERIT);
         rfh2.setFormat(CMQC.MQFMT_STRING);
         rfh2.setFlags(0);
         rfh2.setNameValueCCSID(1208);

         /**
          * First, set the 'Message Service Domain' value.
          * Valid values for mcd.Msd are:
          * jms_none, jms_text, jms_bytes, jms_map, jms_stream & jms_object
          */
         rfh2.setFieldValue("mcd", "Msd", "jms_text");

         /**
          * Set the destination JMS queue name.
          */
         rfh2.setFieldValue("jms", "Dst", "queue:///"+outputQName);

         /**
          * Set user values.
          */
         rfh2.setFieldValue("usr", "SomeNum", 123);
         rfh2.setFieldValue("usr", "SomeText", "TEST");

         // Set the MQRFH2 structure to the message
         rfh2.write(sendmsg);

         // Write message data
         sendmsg.writeString(msgData);

         // Set MQMD values
         sendmsg.messageId = CMQC.MQMI_NONE;
         sendmsg.correlationId = CMQC.MQCI_NONE;
         sendmsg.messageType = CMQC.MQMT_DATAGRAM;
         // IMPORTANT: Set the format to MQRFH2 aka JMS Message.
         sendmsg.format = CMQC.MQFMT_RF_HEADER_2;

         // put the message on the queue
         queue.put(sendmsg, pmo);
         MQTest71.logger("Message Data>>>" + msgData);
      }
      catch (MQException e)
      {
         MQTest71.logger("CC=" +e.completionCode + " : RC=" + e.reasonCode);
      }
      catch (IOException e)
      {
         MQTest71.logger("IOException:" +e.getLocalizedMessage());
      }
      finally
      {
         try
         {
            if (queue != null)
            {
               queue.close();
               MQTest71.logger("closed: "+ outputQName);
            }
         }
         catch (MQException e)
         {
            MQTest71.logger("CC=" +e.completionCode + " : RC=" + e.reasonCode);
         }
         try
         {
            if (qMgr != null)
            {
               qMgr.disconnect();
               MQTest71.logger("disconnected from "+ qMgrName);
            }
         }
         catch (MQException e)
         {
            MQTest71.logger("CC=" +e.completionCode + " : RC=" + e.reasonCode);
         }
      }
   }

   /**
    * A simple logger method
    * @param data
    */
   public static void logger(String data)
   {
      String className = Thread.currentThread().getStackTrace()[2].getClassName();

      // Remove the package info.
      if ( (className != null) && (className.lastIndexOf('.') != -1) )
         className = className.substring(className.lastIndexOf('.')+1);

      System.out.println(LOGGER_TIMESTAMP.format(new Date())+" "+className+": "+Thread.currentThread().getStackTrace()[2].getMethodName()+": "+data);
   }

   /**
    * main line
    * @param args
    */
   public static void main(String[] args)
   {
      MQTest71 write = new MQTest71();

      try
      {
         write.init(args);
         write.testSend();
      }
      catch (IllegalArgumentException e)
      {
         MQTest71.logger("Usage: java MQTest71 -m QueueManagerName -h host -p port -c channel -q QueueName -u UserID -x Password");
         System.exit(1);
      }

      System.exit(0);
   }
}

As I said above, you can download the source code from here.

There are some things to note:

  • The order of items written to the MQMessage is very important. The MQRFH2 must be FIRST followed by the application’s message data.
  • A JMS message needs BOTH an ‘mcd’ and ‘jms’ folders.
  • The application MUST set the MQMD Format field of the message to CMQC.MQFMT_RF_HEADER_2 otherwise it is left to its default value (blank), hence, it will NOT be a JMS message.
  • If the application needs to set their own properties, then you store them in the ‘usr’ folder.

If you follow my instructions and/or use my sample Java program above then you will be able to create JMS messages in a non-JMS Java application.

Regards,
Roger Lacroix
Capitalware Inc.

IBM i (OS/400), IBM MQ, IBM MQ Appliance, Java, JMS, Linux, macOS (Mac OS X), Programming, Unix, Windows, z/OS 2 Comments

Handling A JMS (MQRFH2) Message in non-JMS Java Application

In the post ‘JMS (MQRFH2) Message But The User Sees Garbage‘, I wrote about how to properly view a JMS message (aka MQRFH2 message) on an MQ queue. I mentioned in the posting that non-JMS applications can be coded to deal with JMS messages. So in this posting, I’ll show you code for handling both styles of JMS messages with a non-JMS Java application.

1. JMS Message as a MQRFH2 Message
To get the JMS message as an MQRFH2 message, you need to set the MQGMO options field to include MQGMO_PROPERTIES_FORCE_MQRFH2.

MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = CMQC.MQGMO_PROPERTIES_FORCE_MQRFH2 + CMQC.MQGMO_FAIL_IF_QUIESCING + CMQC.MQGMO_NO_WAIT;
MQMessage receiveMsg = new MQMessage();

queue.get(receiveMsg, gmo);

if (CMQC.MQFMT_RF_HEADER_2.equals(receiveMsg.format))
{
   receiveMsg.seek(0);
   MQRFH2 rfh2 = new MQRFH2(receiveMsg);

   int strucLen = rfh2.getStrucLength();
   int encoding = rfh2.getEncoding();
   int CCSID    = rfh2.getCodedCharSetId();
   String format= rfh2.getFormat();
   int flags    = rfh2.getFlags();
   int nameValueCCSID = rfh2.getNameValueCCSID();

   String[] folderStrings = rfh2.getFolderStrings();
   for (String folder : folderStrings)
      System.out.println("Folder: "+folder);

   if (CMQC.MQFMT_STRING.equals(format))
   {
      String msgStr = receiveMsg.readStringOfByteLength(receiveMsg.getDataLength());
      System.out.println("Data: "+msgStr);
   }
   else
   {
      byte[] b = new byte[receiveMsg.getDataLength()];
      receiveMsg.readFully(b);
      System.out.println("Data: "+new String(b));
   }
}
else if (CMQC.MQFMT_STRING.equals(receiveMsg.format))
{
   String msgStr = receiveMsg.readStringOfByteLength(receiveMsg.getMessageLength());
   System.out.println("Data: "+msgStr);
}
else
{
   byte[] b = new byte[receiveMsg.getMessageLength()];
   receiveMsg.readFully(b);
   System.out.println("Data: "+new String(b));
}

2. JMS Message as an MQ Message with Named Properties
To get the JMS message as an MQ message with Named Properties, you need to set the MQGMO options field to include MQGMO_PROPERTIES_IN_HANDLE.

MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = CMQC.MQGMO_PROPERTIES_IN_HANDLE + CMQC.MQGMO_FAIL_IF_QUIESCING + CMQC.MQGMO_NO_WAIT;
MQMessage receiveMsg = new MQMessage();

queue.get(receiveMsg, gmo);

Enumeration<String> props = receiveMsg.getPropertyNames("%");
if (props != null)
{
   while (props.hasMoreElements())
   {
      String propName = props.nextElement();
      Object o = receiveMsg.getObjectProperty(propName);
      System.out.println("Property: Name="+propName+" : Value="+o);
   }
}

if (CMQC.MQFMT_STRING.equals(receiveMsg.format))
{
   String msgStr = receiveMsg.readStringOfByteLength(receiveMsg.getMessageLength());
   System.out.println("Data: "+msgStr);
}
else
{
   byte[] b = new byte[receiveMsg.getMessageLength()];
   receiveMsg.readFully(b);
   System.out.println("Data: "+new String(b));
}

There are many embedded message structures in MQ. Here is a list (most of them): MQCIH, MQDEAD, MQDH, MQIIH, MQRFH, MQRFH2, MQHSAP, SMQBAD, MQRMH, MQXMIT, MQTM and MQWIH.

The big thing to remember is that MQGMO option of MQGMO_PROPERTIES_* only applies to JMS messages (aka MQRFH2 messages). It does not apply to other embedded message structures. It is just one of those quirks in MQ that you just need to remember.

Regards,
Roger Lacroix
Capitalware Inc.

HPE NonStop, IBM i (OS/400), IBM MQ, IBM MQ Appliance, Java, JMS, Linux, macOS (Mac OS X), Programming, Unix, Windows, z/OS 2 Comments