Hi ,
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.
DATA _NULL_;
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*/
RUN;
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.
Take a look at the Loop transformations.
SAS Data Integration Studio provides a loop transformation that can help with this.
Basic Steps:
Thats a great option.
Also just wanted to know if we could add a second job adjacent to the first one with out using the any of the loop parameters.
Lop parameters are optional, if you don't map them, they are not used.
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
Thanku very much.
Please mark the answers as "helpful" or "correct" this will help others too
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.