BookmarkSubscribeRSS Feed
Soulbroda
Obsidian | Level 7

I am presently working on a load job that requires a conditional start to only run when the file received at the start point has records in it. Kindly see below diagram and advice if this is the best way to go about it. What condition will I also use to configure the conditional start. When I tried NOBS>0, it didn't work as I expected.

 

 

Conditional Start / EndConditional Start / End

1 REPLY 1
MichaelLarsen
SAS Employee

Use the transformations Conditional Start and Conditional Start, you can find them in the Transformations under Control.

 

The condition specified in Conditional Start is a macro expression, so either in a step before or in the precode of Conditional Start, enter the code that will create the macro variable. Example:

%let Rows=0;

proc sql noprint;

  select count(*) into : Rows trimmed

 from &_INPUT1 ;

quit;

 

the above example will only work with a User Written Transformation using the output table from Step 3 as input.

 

In your Conditional Start the condition would then be: &Rows > 0