BookmarkSubscribeRSS Feed
AndreK
Calcite | Level 5

Hi,

 

I have a job flow set up. One of the jobs has a warning (but not an error and does not fail). In this scenario the next job in the flow after the one with the warning does not start and I think this is because of the previous job having a return code.  One used to be able to control this in LSF but how does one do this in Viya Flows so that the next job would start and accept a job with warnings as a complete job? I have tried abort 0 in my code which works but this changes the job status to 'Cancelled' which is not ideal.

 

Thanks

Andre

5 REPLIES 5
ballardw
Super User

What warning are you getting and what steps have been taken to prevent reoccurrence of the warning?

AndreK
Calcite | Level 5

It is a column width warning on an append as one table is updated by two different sources and columns widths are different.

But there should surely be a way to not treat warnings in this manner and where a flow will continue.

Patrick
Opal | Level 21

The following is not the solution for your question but it should avoid the problem.

I don't have sufficient experience with scheduling under Viya and I guess available functionality also depends on what scheduler you are using (which is?). 

Imho one should always try and create production jobs that don't end with a Warning condition. If the process can create a known and expected Warning condition that's o.k. then I'd document this in the code and would also implement some logic to reset the return code (&syscc). See below sample.

data master;
  length var $20;
  var='AAA';
run;
data trans;
  length var $10;
  var='BBB';
run;

%let sv_syscc=&syscc;
proc append base=master data=trans;
run;

/* reset &syscc to 0 if warning raised due to variable length mismatch between base and data tables */
%if &sv_syscc=0 and &syscc=4 and %sysfunc(find(&SYSWARNINGTEXT,different lengths,i))>0 %then
  %do;
    %let syscc=0;
  %end; 

 

AndreK
Calcite | Level 5

Thank you for the suggestion. I have tested setting the syscc to 0. This behaves the same way as abort 0. Where the return code is correct but the job status shows as cancelled on monitoring.

gwootton
SAS Super FREQ

In your flow you can select the job dependency and choose "Ends with any exit code".

 

gwootton_0-1716919391753.png

 

--
Greg Wootton | Principal Systems Technical Support Engineer