SAS Data Management

SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop, SAS Data Preparation and others
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ThierryHerrie
Obsidian | Level 7

Hi,

 

I would like to run a job after another, disregarding the exit code of the first job. So even when the first job encounters an error, the second job should run.

I've tried several task events in Management Console, but nothing works. Every time the first job exits, the second doesn't start.

 

Can anyone help me with this?

 

Kind regards,

Thierry

1 ACCEPTED SOLUTION

Accepted Solutions
hamishcarpenter
Fluorite | Level 6

Are you using flows to run the jobs? If so then this should be possible in the flow properties which can be edited via management console:

 

Set the "Flow completion criteria" to All selected items end and the "Actions after the state of the flow is determined:" to continue running the flow and change the flow state after the flow is complete. I'd suggest leaving the source for the flow exit code as the default (the sum of the exit codes for all work items) or you may get a false positive if the last job in the flow succeeded.

View solution in original post

4 REPLIES 4
dgritt
Obsidian | Level 7

Are you using rsubmit, sasgsub or something else?

You should be able to use a macro loop to submit multiple rsubmits or sasgsub jobs.

LinusH
Tourmaline | Level 20
I don't have access to LSF at the moment, but if you don't have any failed job or similar trigger, I think it needs serious tweaking to make it work like you want.

But it seem a bit odd that you want to "allow" error exit codes on your flow, how will you catch the exception and be sure that it doesn't get harder to fix if you continue the flow? As general (not specific!) advice is to cater for error handling in the job when it's feasable and predictive errors is managed.
Data never sleeps
hamishcarpenter
Fluorite | Level 6

Are you using flows to run the jobs? If so then this should be possible in the flow properties which can be edited via management console:

 

Set the "Flow completion criteria" to All selected items end and the "Actions after the state of the flow is determined:" to continue running the flow and change the flow state after the flow is complete. I'd suggest leaving the source for the flow exit code as the default (the sum of the exit codes for all work items) or you may get a false positive if the last job in the flow succeeded.

ThierryHerrie
Obsidian | Level 7

Thanks Hamis, that did the trick.

 

@LinusH Reason I want to run job 2 after 1, even if job 1 encounters an error is because job 2 reads and analyses the log files.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 2312 views
  • 2 likes
  • 4 in conversation