12-04-2014 08:30 AM
I am totally unaware of using shell scripting in user written code in SAS DI.
Can anyone tell me how to write shell script in 1st job in order to call 2nd job in SAS data integration instead of using conditional transformations.
I need to call the 2nd job depending on a condition: Example: If variable1 > 100 then "Call The 2nd job" else "End the current job execution."
I guess I would need to use SYSTASK for this purpose like: If variable1 > 100 then SYSTASK COMMAND "<PUT HERE THE SHELL COMMAND TO EXECUTE THE SECOND JOB>" NOWAIT;
I have never used SYSTASK. Can anyone please help me with this..
12-04-2014 09:45 AM
Why do wish to this in a shell script?
And what do you mean by variable1? Is it an environment variable?
It seems tat this is a strictly OS related question, not a SAS specific one - please use an appropriate forum.
12-06-2014 06:42 PM
Implemented as a DI job it's about conditional processing. With newer DI version you would get special transformations for this.
If you're not on a sufficiently new DI version then you could easily do it with a loop job. The Loop transformation will call the inner job "some job" as many times as there are records in the loop control table.
"If variable1 > 100" then populate the control table with a single row, else pass in an empty table into the Loop transformation (and the inner job won't get executed).
The inner job "some job" doesn't need any parameters and you also don't need to defined such parameters in the Loop node.
12-06-2014 12:20 PM
Why using systask in DI? DI is designed to process flows with jobs using some scheduling mechanism.
Why going to break that idea and doing something on your own.
Explain your question on the logical parts not your technical implementation but the idea why you want to do this.