AutoSys Workload Automation

 View Only

 AutoSys Global Variable in FileWatch filename

Jump to Best Answer
AlHowarth's profile image
AlHowarth posted Aug 02, 2021 02:38 PM
AutoSys r11.3
Host - Windows Sever 2012R2

I need to create a file watch job, for a file that contains the current date in YYYYMMDD format.  An example of the file's name would be report_20210802.txt
I created a global variable: XX_TODAY_YYYMMDD.  The value is: %date:~10,4%%date:~4,2%%date:~7,2%

In my file watcher job, I state the file location is: D:\Scripts\report_$XX_TODAY_YYYMMDD.txt
I'm sure my syntax is wrong, but can't find good examples.
Chandrasekaran Venkataraman's profile image
Chandrasekaran Venkataraman Best Answer
Try the $$global_name, $$(global_name), or $${global_name} formats for  global variables.
Anthony Konrad's profile image
Anthony Konrad

Hi, 

Try to evaluate/export GV in environment variable via auto.profile which is executing each Job started.

Thanks & Regards,
  Anthony Konrad
  EPAM Systems, Inc.
  EPAM/LSEG