QLOAD: Using Non-QLOAD input files

We have just updated QLOAD with a couple of minor enhancements to improve your experience when using non-QLOAD files as input.

The ability to use non-QLOAD files as input to QLOAD has been around for a while, you can read more about it here. We have now enhanced this feature to allow it to operate with indexed file names which were already available for QLOAD-files.

An indexed file name is one with either %n or %N in the file name.

n Current File number
N Current File number padded to 5 characters eg.000001

So imagine you have a set of files, thus:-

msgs1.txt
msgs2.txt
msgs3.txt
msgs4.txt
msgs5.txt
msgs6.txt

each containing one or more messages, delimited say by XML tags. You can now present those files to QLOAD with the following command.

qload -m MQG1 -o Q1 -f msgs%n.txt -Cd -nns:"<msg>" -nne:"</msg>"

QLOAD will read through the files and prior to putting the messages, will report what it found and check that this is what you expected.

Loading 'msgs1.txt' : 4 messages found
Loading 'msgs2.txt' : 2 messages found
Loading 'msgs3.txt' : 2 messages found
Loading 'msgs4.txt' : 2 messages found
Loading 'msgs5.txt' : 3 messages found
Loading 'msgs6.txt' : 3 messages found
Do you want to continue? (y/n)

In addition to allowing multiple non-QLOAD files to be processed in one command, we have also added some over-rides for Message Descriptor (MQMD) attributes.

When you use QLOAD files, the MQMD attributes are all saved away in the file to allow you to reload the messages exactly as they were. If you need to you can edit the MQMD attributes to change these values before reloading.

When you use non-QLOAD files there are no MQMD attributes in the files and you would just get a default MQMD put to the queue with the message data.

With this new enhancement, you can set a number of the MQMD attributes when you put the data from your non-QLOAD file, or indeed over-ride the data in the QLOAD file to save you having to make numerous edits.

Here’s an example of loading up our multiple files and setting the reply-to-queue in the MQMD. This also sets the message type to MQMT_REQUEST as well.

qload -m MQG1 -o Q1 -f msgs%n.txt -Cd -nns:"<msg>" -nne:"</msg>" -Ar:MY.REPLY.Q

If we look at the message descriptor of the message we just put it looks like this:

[  324 bytes] Message Descriptor (MQMD)
Report       :00000000
Message Type :1 (Request msg)
Format       :'MQSTR   ' (String)
Priority     :2 (Low)
Persistence  :0 (Not Persistent)
Message Id   :414D51204D514731202020202020202037C10B650FF80140
              A M Q   M Q G 1                 7 ┴ . e . ° . @
ReplyToQ     :'MY.REPLY.Q                                      '
ReplyToQMgr  :'MQG1                                            '

The full set of MQMD attributes that you can set is as follows:

flag MQMD Attribute
-Ac:<ccsid> Message Codepage
-Ae:<expiry> Message Expiry (in tenths of a second)
-Af:<format> Message Format
-Ap:<priority> Message Priority
-Ar:<ReplyQ> Message Reply Queue and optionally Reply Queue Manager
-Ar:REPLYQ
-Ar:QM1/REPLYQ
-At:<Msg Type> Message Type: REQUEST, REPLY, DATAGRAM, REPORT

We hope this will allow you to use QLOAD to load up your message content that is currently held in files, into queues on your queue manager.


The new version can be downloaded from the QLOAD Download Page. Any current licensed users of QLOAD can run the new version on their existing licence. If you don’t have a licence and would like to try out QLOAD then send an email to support@mqgem.com and a 1-month trial licence will be sent to you.

The team at MQGem would love to hear what you think. Leave your comments here.

This site uses Akismet to reduce spam. Learn how your comment data is processed.