07-03-2013 10:48 AM
I need to run a job automatically for 10 years in DI studio with out any manual intervention.
Following vars will be used as parameters to be passed 1) &YEAR_BEG_DAY 2) &YEAR_END_DAY derived from below.
CALL SYMPUT("YEAR_BEG_DAY",put(INTNX("YEAR",Today(),-1,'B'),DATE9.));/*FIRST DAY OF THE YEAR*/
CALL SYMPUT("YEAR_END_DAY",put(INTNX("YEAR",Today(),-1,'E'),DATE9.));/*LAST DAY OF THE YEAR*/
I need to know how this could be done in DI studio.
I`ve 2 jobs actually.
Job 1 will fetch 1 year data truncate and load Table 1 and Job 2 will do some transformations and Load another FINAL table (Append)
Again this has to be repeated for another 9 years.
Can we actually do it in a single go and should this be better manually.
07-03-2013 11:02 AM
SAS Data Integration Studio provides a loop transformation that can help with this.
07-04-2013 10:10 AM
You can add a Job either after the Loop End transformation or within the loop, see also picture below.
If the job does not have any parameter it will do its work for each iteration of the loop