Programming Languages on Power

Power Programming Languages

IBM Power, including the AIX, IBM i, and Linux operating systems, support a wide range of programming languages, catering to both traditional enterprise applications and modern development needs.


#Power

 View Only
  • 1.  Connecting to a MQ Queue manager via ILE RPG that is not on the IBM i

    Posted Mon November 22, 2021 11:05 PM

    Hi there,

    I have been asked if we can connect to a MQ Queue manager that is running as part of our off-platform (IBM i, v7r3) configuration.

    The services are installed and running on IBM MQ Appliance (M2001A version MQ009.2.0.2 build 330703mq).

    We have the licpgm 5724H72 - IBM MQ for IBM i installed and have been using it for years.

    We just have a "new" requirement to use the MQ Appliance.

    We would prefer if the solution is possible using ILE RPG.

    Thanks



    ------------------------------
    Dennis Nel
    ------------------------------

    #RPG



  • 2.  RE: Connecting to a MQ Queue manager via ILE RPG that is not on the IBM i

    Posted Mon November 22, 2021 11:49 PM
    Many people use MQ from RPG

    IBM provide samples although probably in an antiquated style https://www.ibm.com/docs/en/ibm-mq/8.0?topic=programs-samples-mq-i 

    And this Developerworks document is just about using RPG.

    If this isn't what you are looking for then I'd need to know a bit more - but basically any API on the system can be used from RPG.


    Jon Paris







  • 3.  RE: Connecting to a MQ Queue manager via ILE RPG that is not on the IBM i

    Posted Tue November 23, 2021 05:21 AM

    Hi Jon

    Thanks for the link, always helpful to have it saved for future reference.

    We have been using RPG to connect to a local MQ Queue Manager for years and it's really working well.

    The ask here is. How to connect to a MQ Queue manager that is NOT local to the IBM i?

    I cannot seem to find where I could "define" this MQ Queue manager. Where could I define the ip address of the new host as well as other data like user & password?

    The MQCONN API call doesn't have parameters for host, ip, port, user or password.

    So I'm wondering if there is a "configuration" file that must be configured?

    Thanks for your help



    ------------------------------
    Dennis Nel
    ------------------------------



  • 4.  RE: Connecting to a MQ Queue manager via ILE RPG that is not on the IBM i

    Posted Tue November 23, 2021 11:04 AM
    OK - missed that - sorry.

    No expert on this - just on how to make the calls work in RPG!

    But a quick google led me to this page which appears to indicate that there are commands related to connecting two systems and commands that apply to local and remote systems. There are also API equivalents for the CL commands.

    If this doesn't point you in the right direction, since you are paying IBM for this stuff, I would suggest a call to their support line. This cannot be rocket science - I know several of my former clients who only ever used MQ with remote systems - they didn't use it locally at all.


    Jon Paris




  • 5.  RE: Connecting to a MQ Queue manager via ILE RPG that is not on the IBM i

    Posted Wed November 24, 2021 07:46 AM

    Hi Jon,

    Looks like your link got lost, but using the terms MQ Client I also managed to find a few good links.

    In the end I found the link that @Paul Nicolay post most helpful and I have managed to link from RPG to the IBM MQ Appliance.


    Kind Regards
    Dennis



    ------------------------------
    Dennis Nel
    ------------------------------



  • 6.  RE: Connecting to a MQ Queue manager via ILE RPG that is not on the IBM i
    Best Answer

    Posted Tue November 23, 2021 12:54 PM
    Hi,

    You need to program using the MQ Client... for more information have a look at FAQ: MQ C Client on IBM i

    Kind regards,
    Paul

    ------------------------------
    Paul Nicolay
    ------------------------------



  • 7.  RE: Connecting to a MQ Queue manager via ILE RPG that is not on the IBM i

    Posted Wed November 24, 2021 07:41 AM

    Thanks Paul,

    This is exactly what I was looking for.

    I worked my way through the examples and I can confirm that I was able to connect and PUT/GET messages to and from our IBM MQ Appliance.

    Kind Regards



    ------------------------------
    Dennis Nel
    ------------------------------