It is currently 16 Dec 2017 2:17


Post new topic  Reply to topic  [ 11 posts ] 
Author Message
PostPosted: 16 Sep 2009 4:42 
Offline
Nouveau
Nouveau
User avatar

Joined: 04 Feb 2008 12:00
Posts: 61
Location: Cleveland, OH
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.


Top
   
 Post subject:
PostPosted: 16 Sep 2009 6:00 
Offline
Nouveau
Nouveau
User avatar

Joined: 13 Jun 2007 12:00
Posts: 317
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.


Top
   
 Post subject:
PostPosted: 16 Sep 2009 6:31 
Offline
Nouveau
Nouveau
User avatar

Joined: 04 Feb 2008 12:00
Posts: 61
Location: Cleveland, OH
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.


Top
   
 Post subject:
PostPosted: 16 Sep 2009 6:37 
Offline
Nouveau
Nouveau
User avatar

Joined: 20 Jan 2006 12:00
Posts: 473
Hi,

use the variable "$$AFTFILE$$"
this is the original name of the single file you transfer with "*" wildcard

_________________
Best regards
Walty


Top
   
 Post subject:
PostPosted: 16 Sep 2009 7:26 
Offline
Nouveau
Nouveau
User avatar

Joined: 04 Feb 2008 12:00
Posts: 61
Location: Cleveland, OH
From the log:

TR5707 DO SETVAR '%%TERIFILENAME'= '$$AFTFILE$$' performed

On Set Variable I had the VALUE = $$AFTFILE$$

Looks like it didn't take it as a varable but as characters.


Top
   
 Post subject:
PostPosted: 17 Sep 2009 1:34 
Offline
Nouveau
Nouveau
User avatar

Joined: 20 Jan 2006 12:00
Posts: 473
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

_________________
Best regards

Walty


Top
   
 Post subject:
PostPosted: 17 Sep 2009 8:24 
Offline
Nouveau
Nouveau
User avatar

Joined: 04 Feb 2008 12:00
Posts: 61
Location: Cleveland, OH
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.


Top
   
 Post subject:
PostPosted: 17 Sep 2009 8:53 
Offline
Nouveau
Nouveau
User avatar

Joined: 20 Jan 2006 12:00
Posts: 473
Hi,

Good discussion !
Thank you for your answer.

_________________
Best regards

Walty


Top
   
 Post subject:
PostPosted: 17 Sep 2009 9:01 
Offline
Nouveau
Nouveau
User avatar

Joined: 04 Feb 2008 12:00
Posts: 61
Location: Cleveland, OH
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.


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.


Top
   
 Post subject: hi
PostPosted: 16 Oct 2011 2:08 
Offline
Nouveau
Nouveau
User avatar

Joined: 31 Oct 2009 12:00
Posts: 56
Noted, Good thread


Top
   
 Post subject:
PostPosted: 15 May 2013 9:49 
Offline
Nouveau
Nouveau
User avatar

Joined: 15 May 2013 12:00
Posts: 2
Wirklich good.i werde darüber betreffen.




__________________________________________________
Diablo 3 Gold;WOW Gold;Diablo 3 Gold Kaufen;Guild Wars 2 Gold


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 11 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited
The site created by Franck YOT. Images, logo, content and trademarks about Control-M products are property of BMC Software.
All the comments are property of their posters. Images, logo, content and design are © copyright by Scheduler-Usage.com. All Rights Reserved