AnsweredAssumed Answered

PSET use syntax in RAFTP job

Question asked by TimOsgood611330 on Jan 31, 2018
Latest reply on Feb 2, 2018 by TimOsgood611330
I have an RAFTP JOBS that moves a file using wildcards, *Intercept_Vendor_Extract_CORE* on Host A.
However, I need to change the the name of the file if moved to a specific folder on Host B.

In the Transfer window, you cannot rename a file using wildcards as it gives an error.  My solution was to do a post process, collect the full original name and create its new name. 

I used 

In the Report of the job I get these entries:
Variable '&FILE#' was stored with value 'Intercept_Vendor_Extract_CORE123.txt'.
Variable '&NEWNAME#' was stored with value 'Intercept_Vendor_Extract_CORE123.vnd'.

All good.

To do the rename, I created a second RAFTP JOBS to rename the file.  I put both JOBS in a workflow.

Old file/directory  /DPA/OSC/CGI/CORE/Processing/dor/&FILE#
New file/directory /DPA/OSC/CGI/CORE/Processing/dor/&NEWNAME#

This process gives an error that I read as it can't find file &FILE#. (the original file name is in the location)  It is not reading the variable value.  I've tried using single/double quotes, searched the community but can't find an answer as to why it doesn't use the variable content vs the variable name.

Executing command: rename /DPA/OSC/CGI/CORE/Processing/dor/'&FILE#' /DPA/OSC/CGI/CORE/Processing/dor/'&NEWNAME#'
com.uc4.ftpjob.DataTransferException: File/Folder /DPA/OSC/CGI/CORE/Processing/dor/'&FILE#' does not exist.

Is this a syntax issue that I am missing on each rename line? or is there something else I need to do in the rename job?