Hi, John.
>Don, if the constant is used in only one place, there is no real advantage to using a constant if its value is something obvious like "my constant". But you'll understand why it might be better to use DAYS_UNTIL_EXPIRY in code rather than GOMONTH(subsview.dsub_start,12*subsview.isub_duration)-DATE().
>
>Also, the app may be subject to a standardized practice that sees all constant values #DEFINEd at the top of each proc, in which case you'd need to respect that standard.
Actually, what you describe there shouldn't be a constant (note that it must be evaluated based on other values and the dayly-changing Date() function). In this case, you should provide a method called DaysUntilExpiration() or similar. I'd probably put this method on the class representing the expiring document, like Policy.DaysUntilExpiration(), or event better -if there are more than one "expiring" documents, in an abstract class at a higher level, like:
AbstractDocument.DaysUntilExpiration()
Regards,