Question: ```

    data _null_;
    set hash.bankholidays;

        retain total 0; 
        format date :date9.;

        set hash.oyster;
            datetime = datepart(datetime);
            format datetime :date9. ;

            if date eq datetime then do;
            total = total + amount; end;

    put "total =" total; 

    run;    

```

This gives me a popup dialog box in eclipse: 
`Multiple SET/MERGE statements in a data step`

I'm wondering what's going on here? It seems to be saying that you can't have a set statement within a set statement, but I'm sure I've done it before. 

eg. 

```

    data data_ex.giftwrap_ribbon_final; 
    set data_ex.giftwrap_w_ribbon_fl; 
        if not missing (first) and not missing (last) then do;
            do i = first to last;
            set data_ex.ribbon (keep=ribbon_colour) point = i;
            output;
            end;
        end; 

        else do;
        ribbon_colour = ''; 
        output; 
        end;
    run;

```

could I get some clarification here? 

Also, about that last put. How do I tell it to execute the put after the set statement has finished?

Answer: 
The expression `--a` is the pre-decrement operator, meaning: decrement the value of `a` *before* using it in the expression. Compare it with the expression `a--`, which uses the current value of `a` in the expression and at the end of the evaluation, decrements it.
The `--` and `++` pre and post operators are an area where Java looks just like C or C++, but has significantly different rules.

Evaluation can never appear to be delayed, and the results are fully defined. The key concept is to separate the side effects of an operator from its value.

The general rules for expression evaluation are in [Chapter 15. Expressions](http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html) in the Java Language Specification. The specifics for --a are in [15.15.2. Prefix Decrement Operator --](http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.15.2) As a side-effect, it reduces the value of a by 1. The value is the value of a *after* the new value is stored.

The [postfix decrement](http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.14.3) has the same side-effect, performed at the same point in expression evaluation, but the value of the postfix decrement expression is the value of the variable *before* the new value is stored.