search cancel

for SCP type jobs, how can we 'escape' special characters that from part of a vendor's remote site directory?

book

Article ID: 212154

calendar_today

Updated On:

Products

CA Workload Automation AE

Issue/Introduction

We tested '\' escaping the special character and the SCP job fails flat.

The job has the following attribute that contains a special character, '&':

scp_remote_dir: "/tmp/110_NAV&Perf/R2.3/"

Environment

Release : 11.3.6

Component : CA Workload Automation System Agent

Resolution

Change job definition and user ^ to escape &  and other special character as follow:
 
From:
scp_remote_dir: "/LDFS/Openend/Tables/110_NAV&Perf/R2.3"
 
To:
scp_remote_dir: /LDFS/Openend/Tables/110_NAV^&Perf/R2.3

Additional Information

SE findings:

Based on below Windows documentation, ^ should be used to escape & and other special characters.
https://www.robvanderwoude.com/escapechars.php

Escaping cannot be handled in the product as it cannot differentiate whether the user wanted to use & as windows literal (like running multiple commands echo hello & dir) or if the user wanted to treat & as data in the file path.
We ran the inhouse tests and confirmed that it is working after following the Microsoft Windows escaping sequence for the special characters.