BookmarkSubscribeRSS Feed
sunilreddy
Fluorite | Level 6

Have a requirement to create a job, read data and check, if condition1 execute job1 else if condition2 execute job2 etc.. till job15.. Job1 to Job15 are already created

could you please provide your suggestions in this

4 REPLIES 4
LinusH
Tourmaline | Level 20

Can you give an example of "condition" - how does the input table look like?

And the jobs1-15 are DI Studio created jobs, and are "totally" different?

Without knowing more, I think I might suggest a non DIS solution (or user written code) with some %include to call appropriate job.

/Linus

Data never sleeps
RMP
SAS Employee RMP
SAS Employee

how are you executing your job code? This conditional execution of jobs would typically be handled in your scheduling software. Please send some more details, perhaps this is solvable in some other way.

Halaku
Obsidian | Level 7

If the conditions are on data then

1. Handle the conditions through a splitter.

2. Put a LOOP in front of each work (output) table and pass the parameter, specific to the job, to the LOOP.

3. Do the same for each condition and process job(s) in the LOOP.

4. terminate the LOOP with END LOOP transformation.

Use the ref: http://support.sas.com/documentation/cdl/en/etlug/60948/HTML/default/viewer.htm#n0t84jtm1a5wofn1e4qp...

Hope that helps.

shivas
Pyrite | Level 9

Hi Sunil,

You can create dependency jobs  in LSF scheduler.You can try that.

Thanks,

Shiva

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

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.

Discussion stats
  • 4 replies
  • 1046 views
  • 0 likes
  • 5 in conversation