Use AFT Filewatch for *.* need filename variable set at Xfer
Use AFT Filewatch for *.* need filename variable set at Xfer
Using CM for AFT with file watch for *.* on 6.3.01, is there a variavble that is set durring the transfer that I can use for the filename found? I want to use the Steps Tab.
On COMPSTAT=0
Set Variable NAME = \%%JOBFILENAME VALUE = %%FILENAME
where %%FILENAME is the unknown variable. Then I can use this global variable in other jobs.
I have reviewed the ctmfw solutions but I feel that this can be done without using a script. It seems to me that the AFT would place the filename into a variable since it needs to use this for the rename, overwrite, and delete.
On COMPSTAT=0
Set Variable NAME = \%%JOBFILENAME VALUE = %%FILENAME
where %%FILENAME is the unknown variable. Then I can use this global variable in other jobs.
I have reviewed the ctmfw solutions but I feel that this can be done without using a script. It seems to me that the AFT would place the filename into a variable since it needs to use this for the rename, overwrite, and delete.
I need the name of the variable that is set at time of transfer. The sysout indicates this is a variable. Example below.
File for watch is '*.*' in directory '\Clients\TERI\RECEIVE\Load'.
Minimum file size is [0]Bytes;
Time to wait is [0]Minutes;
Start to watch for file: AIM20090914132928_6516.CRCL
File watching for file 'AIM20090914132928_6516.CRCL' completed successfully. Minimum file size is [0]Bytes.
AIM20090914132928_6516.CRCL has to be a variable.
File for watch is '*.*' in directory '\Clients\TERI\RECEIVE\Load'.
Minimum file size is [0]Bytes;
Time to wait is [0]Minutes;
Start to watch for file: AIM20090914132928_6516.CRCL
File watching for file 'AIM20090914132928_6516.CRCL' completed successfully. Minimum file size is [0]Bytes.
AIM20090914132928_6516.CRCL has to be a variable.
Hi,
I think that the $$AFTFILE$$ can only be use on the File_Trans panel (ie: rename Output file)
Another suggestion by combining the use of <ctmfw> to detect the file and assigns it the global variable.
1) Create one sample rule like:
INTERVAL 10
ON_FILEWATCH /tmp/AGEN* CREATE
THEN
DO_CMD ctmvar -action set -var "%%\MY_FILENAME" -varexpr %FILENAME%
END_ON
2) On your AFT job in Set Tab put:
%%PRECMD ctmfw -input <full path name of rule file>
Set the file name detected to Global Variable before execution of the file-transfert
or
%%POSTCMD ctmfw -input <full path name of rule file>
Set the file name detected to Global Variable after execution of the file-transfert
Try
I think that the $$AFTFILE$$ can only be use on the File_Trans panel (ie: rename Output file)
Another suggestion by combining the use of <ctmfw> to detect the file and assigns it the global variable.
1) Create one sample rule like:
INTERVAL 10
ON_FILEWATCH /tmp/AGEN* CREATE
THEN
DO_CMD ctmvar -action set -var "%%\MY_FILENAME" -varexpr %FILENAME%
END_ON
2) On your AFT job in Set Tab put:
%%PRECMD ctmfw -input <full path name of rule file>
Set the file name detected to Global Variable before execution of the file-transfert
or
%%POSTCMD ctmfw -input <full path name of rule file>
Set the file name detected to Global Variable after execution of the file-transfert
Try
Best regards
Walty
Walty
Thank you for your input. I have successfully performed it using the POSTCMD.
However, how about this? I posted the question to Development in Israel through a contact and his reply is below. Too simple!!! For the solution below you must have imported the latest AFT Application Form. Select the advanced button next to the file transfer definition, and go to the File Watcher tab.
From Development:
Regarding the auto edit, what about the “Auto-Edit containing detected file name:%%” field in the file watch tab?
In page 56 in the Admin guide: “5 Specify the Auto-Edit variable name that contains the detected file name.”
After the transfer this autoedit will be a global autoedit containing the name of the detected file.
However, how about this? I posted the question to Development in Israel through a contact and his reply is below. Too simple!!! For the solution below you must have imported the latest AFT Application Form. Select the advanced button next to the file transfer definition, and go to the File Watcher tab.
From Development:
Regarding the auto edit, what about the “Auto-Edit containing detected file name:%%” field in the file watch tab?
In page 56 in the Admin guide: “5 Specify the Auto-Edit variable name that contains the detected file name.”
After the transfer this autoedit will be a global autoedit containing the name of the detected file.
After rereading your solution I noticed that you said the same thing as development below. Thank you for your input. So sorry I misunderstood it.gglau wrote:AFT enhancement in FP1 allows file watch before transfer. And with file watch, name of the watched file can be assigned to a global variable. Try this out.
Wirklich good.i werde darüber betreffen.
__________________________________________________
Diablo 3 Gold;WOW Gold;Diablo 3 Gold Kaufen;Guild Wars 2 Gold
__________________________________________________
Diablo 3 Gold;WOW Gold;Diablo 3 Gold Kaufen;Guild Wars 2 Gold