Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MQ scripting

Status
Not open for further replies.

WP

Programmer
Nov 30, 1999
463
CH
Is it possible to parameterise an MQ script.

I'm running a environment setup script on an AS400. There are however many environments :(

What i'd like to do is pass the evnironment e.g.

DEFINE QALIAS(OLY.COD.A0000.TARGET.%ENV)
LIKE(SYSTEM.DEFAULT.ALIAS.QUEUE)
TARGQ(OLY.COD.L0000.TARGET.%ENV)
DEFPSIST(YES)
GET(ENABLED)
PUT(ENABLED)
REPLACE

Can this be done?

Many thanks WP Bill Paton
william.paton@ubsw.com

Check out
 
Unfortunately the MQSC command syntax is pretty limited - certain commands accept a '*' as a wildcard (at the end) but otherwise every parameter needs to be explicitly specified.

I once tried to do a similar thing on the AS/400 using global substitution within the source file but I never found an easy way to do it. Coming from a mainframe background, I wrote a small Rexx/400 program to create a temp file with my substitutions which I then passed to STRMQMMQSC to run.

Cheers,
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top