Concrete examples help. Depending on what your actual calculations need to be perhaps sql isn't the best approach.
If a variable is reported by contents as having a TIME format then the value is a number of seconds (and fractions of second). So adding durations is the total duration. The format controls how the value is displayed to us humans so we can look at it and say 4 hours and 8 minutes instead of having to do division and such.
You want to be careful using sql and Sum if attempting to add variables together as Sum in Sql is more of an aggregate across records function.
Perhaps a data step is a better approach if you are worried about a "cluttered mess" in code. Arrays and variable lists, features not available in Proc SQL, may make the code for the first step much cleaner.
... View more