it’s better than; should feel grateful for
Expresses that a situation, though not ideal, is at least better than the alternative, so one should feel relieved or grateful.
This pattern is used when you want to say that something is not great, but it could have been worse, so in that sense it is better than the alternative. It carries a nuance of relief or grudging gratitude. You can use it when comparing two bad options, or when a negative outcome is at least not the worst possible one.
The literal meaning is 'just better' or 'only better'. It often appears with まだ (still) to emphasize that despite the bad situation, there is some consolation. The pattern is fairly common in both speech and writing, but it is not overly formal, so you can use it in everyday conversation.
Be careful with the order: the clause that takes だけましだ is the one you consider less bad. For example, if you say 電車が遅れただけましだ, it means the train being late is better than (some other bad thing like it being cancelled). You need to have an implicit or explicit comparison in mind.