search cancel

The bop_cmd does not work using a parameter that has single quotes.


Article ID: 52581


Updated On:


CA IT Asset Manager CA Software Asset Manager (CA SAM) ASSET PORTFOLIO MGMT- SERVER SUPPORT AUTOMATION- SERVER CA Service Desk Manager - Unified Self Service CA Service Desk Manager CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager



We want to use the bop_cmd with the an NSM Message action. However, when the bop_cmd has parameters that include single quotes, it does not work.
How may we use those characters as part of the parameters passed to bop_cmd?


At first, you can use the single quote in the parameter value of the bop_cmd with the escape character '\' as follows.
This command is the sample after copying the $NX_ROOT\samples\call_mgt\gencr.frg to c:\.
The first parameter has the single quote as a parameter.
The value of the parameter expected is te'st. In order to do that, you can put '\' before the single quote.

For example:
      bop_cmd -f c:\gencr.frg "gencr('te\'st', '', '', '2', '', '', 'servicedesk', '', '', '', '', '', 'Incident')"

If the parameter value is fixed value, you can set it as shown above.
However, if the parameter value is dynamic value and you give it as a variable, you will need some sort of scripting solution.
The bop_cmd does not automatically recognize that it is a part of parameter value. Therefore, you need to specify it yourself.

This is not dependent on the integration with NSM. This can be replicated without NSM, byt using the bop_cmd at the command prompt.
This is the Windows design that it is necessary to use the escape character when we use a special character on a command prompt, and not specific to CA Service Desk.

Relevant technical document: TEC488392


Component: ARGIS