We would like to include scripts dynamically in a job by using object variables. Is that possible. Please look at the following line of code present in process tab of a job.
The value of &TEST# is defined in variables and prompts page to "JOBI.NEW.1".
So when I run the job, I got the following error.
Include '&TEST#' not found in object 'JOBS.UNIX.NEW.2', line '00005'.
This capability does not exist in the current version of the Automation Engine. However, it has been requested. If you like the idea, please vote for it!
Allow variables in :INCLUDE statements
Oh, I wish this would have already been allowed as I found this is really helpful. Anyways, I have voted up your idea and I am eagerly waiting for its implementation in the coming releases.
Understanding the processing of script in the Automation Engine, it's clear that this is not working. First includes have to get part of whole script and than script variables can be processed. I would say make sense and it's very similar to some programming languages as ABAP, ... where includes also can not be addressed dynamically.
It’s clear that adding this capability would significantly change the way AE scripts are evaluated. In particular, using this capability would probably require that the generate at runtime option be enabled.
I know and I see the big plus having this but I'm knowing too, that this might be a lot of effort for existing customers who use script and cant use generate at run time for each object might be effected. That's a big comparability topic I have concerns because of business critical workload could be effected. It's nothing against the idea, wish, input It's fact we have customers with thousands of objects and a lot line of script used in these over a long time.
Backward compatibility won’t be a problem if it is implemented like this:
If an :INCLUDE statement contains a variable:
There is one possibilty: If you put an include with a variable in his name in an include you can achieve it.
I tried your solution but it still didn't resolve the string value dynamically.Please find the attached export files. Did you mean $string or &String in your script? I tried both but didn't work.Also could you please show the script inside JOBI.OUTER.
Your example does not work if you replace "INNER" with "&STRING#" and set the value of this variable earlier in the script.
Sorry, I do not know why it should not work. I tried it by myself and it worked (as you can see in the screenshot)...
I will check it on monday.
No problem, please try it on Monday.
Your example did not use a script variable.