Home

 

More on passing arguments

 

This example is written with Windows style path separator characters.

This example shows how to define a server service object to start a program called runserv when a queue manager is started. One of the arguments that is to be passed to the starting program is a string containing a space. This argument needs to be passed as a single string. To achieve this, double quotes are used as shown in the following command to define the command service object:

  1. The server service object is defined, using the following MQSC command:
       DEFINE SERVICE(S1) SERVTYPE(SERVER) CONTROL(QMGR) +
         STARTCMD('C:\\Tools\runserv.exe') +
         STARTARG('-m +QMNAME+ -d "C:\\Tools\"') + 
         STDOUT('C:\\Tools\+MQ_SERVICE_NAME+.out')
    
    
    DEFINE SERVICE(S4) +
           CONTROL(QMGR) +
           SERVTYPE(SERVER) +
           STARTCMD('C:\\Tools\runserv.exe') +
           STARTARG('-m +QMNAME+ -d "C:\\Tools\"') +
           STDOUT('C:\\Tools\+MQ_SERVICE_NAME+.out')
    
    Where:

    • +QMNAME+ is a token representing the name of the queue manager.

    • "C:\\Tools\" is a string containing a space, which will be passed as a single string.

 

Parent topic:

Examples on using service objects


fa11490_


 

Home