Detected File Name

All questions about Control-M jobs definitions
Post Reply
User avatar
HowardLyle
Nouveau
Nouveau
Posts: 26
Joined: 05 Aug 2008 12:00

Detected File Name

Post by HowardLyle » 07 Feb 2012 11:34

I'm running AFT 7.0 and am watching and then transferring a file. In the Advanced --> File Watcher tab I am using the Auto-Edit variable to detect the file name that is being watched.

I then use this variable as a parameter in a command job that is forced in when the transfer is successful.

This works fine for all of the file names I use this for except for one.

The file name in question has a prefix of %BMOCOM-SEND%random_rest_of_file_name. The FW watches for %BMOCOM-SEND%* and it finds the file(s) and transfer them successfully.

The Auto-Edit in the filewatcher strips off the %BMOCOM-SEND% prefix because it thinks it is a variable. I get an error in the Alerts console stating "Encountered error while setting value for autoedit."

The parameter in the forced in job resolves to "random_rest_of_file_name".

In the job that gets forced in when the transfer is complete I have tried to create an Auto-Edit variable in the Set tab that has the %BMOCOM-SEND% prefix and uses the value in the FW Auto-Edit (which is the truncated file name) but that is not working - maybe I have that set up and resolving incorrectly.

I'll take any suggestions on how to set up either Auto-Edit variable in either job since the file name is dynamic.

User avatar
rchkevin
Nouveau
Nouveau
Posts: 67
Joined: 29 Oct 2007 12:00
Location: Chennai

Post by rchkevin » 09 Feb 2012 5:10

Please try using double quotes so that it does not assume it as a variable.
"%BMOCOM-SEND%"*

User avatar
HowardLyle
Nouveau
Nouveau
Posts: 26
Joined: 05 Aug 2008 12:00

Post by HowardLyle » 09 Feb 2012 4:06

Thanks, but I tried that and recieved this error message:

File watching for file '"%BMOCOM-SEND%"*' failed. File does not exist.

I am going to assume that is because it thinks the file name to watch for is "%BMOCOM-SEND%"* instead of %BMOCOM-SEND%*

User avatar
HowardLyle
Nouveau
Nouveau
Posts: 26
Joined: 05 Aug 2008 12:00

Post by HowardLyle » 09 Feb 2012 11:03

Thanks for your reply as well, Chookgate.

You are correct about using a . to delimit between system Auto Edit variables (which I've used successfully in adding date/time stamps to file names) a test with a . before the * results in the same error message - File does not exist.

User avatar
HowardLyle
Nouveau
Nouveau
Posts: 26
Joined: 05 Aug 2008 12:00

Post by HowardLyle » 09 Feb 2012 11:04

Thanks for your reply as well, Chookgate.

You are correct about using a . to delimit between system Auto Edit variables (which I've used successfully in adding date/time stamps to file names) a test with a . before the * results in the same error message - File does not exist.

Post Reply