MQSCX Bootstrap file

MQSCX BootstrapMQGem recently delivered a new version of MQSCX that supports the new IBM MQ V9 release. As well as support for the new command level, there were a number of other features in this new version of MQSCX. One of those new features was a bootstrap file. This is a well known named MQSCX script file that is always imported when you start up MQSCX. It can be a handy place to put any frequently used functions.

The bootstrap file can either have your frequently used functions included in it directly, or the bootstrap file can have =import file statements in it (or both). For example:-

*********************************************************************
* Load these useful functions at start up                           *
*********************************************************************
=import file(C:\MQGem\MQScripts\Utility.mqx)

Then when you start the program you’ll see:-

MQSCX Extended MQSC Program – Version 9.0.0

Licenced to Paul Clarke

Connected to ‘MQG1’

[10:50:13] =import file(C:\MQGem\MQScripts\Utility.mqx)

MQG1>

and all your utility functions will be available.

The bootstrap file could also be used to print a banner out to remind users of something each time they start up the MQSCX program. For example:-

print '*************************************************'
print '*                                               *'
print '*  MQGem Software systems must only be used by  *'
print '*               MQGem employees                 *'
print '*                                               *'
print '*************************************************'

Then when you start the program you’ll see:-

MQSCX Extended MQSC Program – Version 9.0.0

Licenced to Paul Clarke

Connected to ‘MQG1’

*************************************************

* *

* MQGem Software systems must only be used by *

* MQGem employees *

* *

*************************************************

MQG1>

Of course the bootstrap file could also be used to run a command, or a number of commands every time the program is started up. Anything you can do in a normal MQSCX script file (or interactively) you can put into the bootstrap file. Here’s one example, but of course I’m sure you can think of plenty of others.

*********************************************************************
* Always check queue manager up-time                                *
*********************************************************************
DISPLAY QMSTATUS STARTDA STARTTI

Then when you start the program you’ll see:-

MQSCX Extended MQSC Program – Version 9.0.0

Licenced to Paul Clarke

Connected to ‘MQG1’

[11:09:54] DISPLAY QMSTATUS STARTDA STARTTI

QMNAME(MQG1) STATUS(RUNNING) STARTDA(2016-08-05) STARTTI(20.58.00)

MQG1>

I’m sure there are lots of other things you could do with the bootstrap file. Let us know in the comments if you have any other ideas.


If you are a current MQSCX licence holder, you can simply download the new version of MQSCX and start using it. If you’re not a current licence holder, and you’d like to try out MQSCX, please email support@mqgem.com to request a trial licence.

Advertisements

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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s