Due to the complex tax rules governing short sales, all short
sales that result in capital gains are categorized as Short
Term and all short sales that result in losses are categorized as Long Term.
This general rule is used because there is not enough information
to assign a more accurate holding period. Overall, it is a conservative approach
to reporting your short sale losses, and errors will over-report your tax
liability rather than under-report it. Your short sale losses, however, may be
reportable as short term.
We advise that you consult your tax advisor to best determine
which holding period is correct for your short sales.
I don't understand the programming problem. Look at the date of the sale, and of the purchase. No matter which occurred first, if the dates are less than a year apart, I believe it should be reported as a Short Term trade.