search cancel

SFTP job cannot cannot handle single quote in filename

book

Article ID: 224308

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

Simulation, error ESP4101E SFTP_JOB SFTPWIN in Appl XXXXXXX, missing Local File Name

Sample job to demonstrate the single quote in the filename: 

SFTP_JOB SFTPWIN
   AGENT unixagent
   USER jsmith
   SERVERADDR unix.host.com
   SERVERPORT 22
   TRANSFERDIRECTION DOWNLOAD
   REMOTEDIR '/tmp'
   REMOTEFILENAME '11_a B'mytest.txt'
   LOCALNAME '11_a B'mytest.txt'
   KEYFILE /opt/CA/SFTP_KEY/username
   RUN NOW
ENDJOB

Note: The filename is 11_a '11_a B'mytest.txt' has space after _a

 

Cause

SFTP cannot handle single quote in filename

Environment

Component : ESP WORKLOAD AUTOMATION
Release : 12.0 

Resolution

When the filename contains a single quote, use one more single quote as follows: 

SFTP_JOB SFTPWIN
   AGENT unixagent
   LOCALFILENAME '11_a ''B''mytest.txt'
   REMOTEFILENAME '11_a ''B''mytest.txt'
   SERVERADDR unix.host.com
   REMOTEDIR '/tmp'
   TRANSFERDIRECTION U
   USER username
   RUN DAILY
ENDJOB

 

 

Additional Information

N/A