3

I need to implement a job chain in Autosys which at some point executes a program with a variable parameter - i.e. a filename. The filename will follow a pattern and may not be hardcoded into the "jil" file. Is there any way to pass this parameter to this job?

The most favorable solution would include retrieving said filename from a file-trigger job that is also part of the chain. However, so far I couldn't figure out if this is possible.

Another constraint would be that all this should be achieved with Autosys onboard tools - the functionality of Autosys shall not be extended with additional scripts.

My "jil" files are similar to the one below - "Variable_Filename" should be replaced.

insert_job: a_job job_type: cmd machine: THE_MACHINE owner: THE_OWNER permission: gx,ge,wx,we,mx,me description: "Run a command " command: program.exe filename=Variable_Filename

If this an easy one it would already help if you could point me to a chapter in the Autosys User Guide. Thanks!

ChiliTee
  • 31
  • 1
  • 1
  • 2

1 Answers1

0

Set a Global Variable within Autosys that has the file name.

sendevent -E SET_GLOBAL -G MY_FILE_NAME=C:\path\filename.txt

Then in your JIL, reference the global like so:

command: program.exe filename=$${MY_FILE_NAME}
Erick B
  • 1,242
  • 10
  • 21