runonthespot_5678

Escaping when using &UC_JOBMD, nested quotes.

Discussion created by runonthespot_5678 on Feb 20, 2015
Latest reply on Mar 29, 2015 by Jennifer_Jinhong_34
Hi all,

I'm attempted to run something from the command line with the agent UCXJWX6M.exe, that passes a username / password stored in a login object using GET_LOGIN, into a module, where these are passed as an XML string.

This means I need to use &UC_JOBMD to run a job to decrypt the password.
The trouble I'm having is that the command line job takes an XML string with the username/password in it as a part of the XML.  I can't figure out how to correctly escape this.  I don't want to decrypt the password separately, as I don't want it to appear in plain text in the logs.

My current process script looks like this:

:SET &LI# = GET_LOGIN("CLIENT_DDT.LOGIN.SYSA","*",SYSA,LOGIN_INFO)
:SET &PW# = GET_LOGIN("CLIENT_DDT.LOGIN.SYSA","*",SYSA,PASSWORD)
:SET &XML# = "<WizardValues><Value name='username'>&LI#</Value><Value name='password'>&PW#</Value></WizardValues>"
&UC_JOBMD='EngineCmd.exe C:\Workflows\Module.mod "&XML#"'

basically the XML parameter is already requiring nesting of quotes (so using " for the outside and ' for the inside) but then this has to be inside the &UC_JOBMD script too, and the usual escaping tricks ("" or \") don't work...

Outcomes