Hello,
I have a countdown field in my cobol program which counts the number of days left to reach a particular date(always fixed - say X date) from today. Currently, the counter counts till that X date is reached, that is counter = 000 when today = X date; and will remain as 000 eventhough X date is passed.
My requirement is to add negative numbers to counter processing, that is if the X date is passed, then counter shoud display -1, -2 etc. Please advice how cobol stores and process negative numbers. In reading a cobol book, found an option "PIC S9(03) SIGN IS LEADING SEPARATE" to process negative numbers - but not sure how to use this. or if there is a more simple work around.
If anyone came across such scenarios, please help me out.
Thanks,
Harish