As input to my program I have an ascii table file with an amount S9(9)v99 defined as sign trailing separate. If a record meets certain criteria, a sign reversal is necessary. I am doing this by multiplying the amount by -1. This causes an amount value of 1000000- to become
-00010000013. Amounts not requiring this action move thru the program fine, no problem. Debug shows me that as soon as the compute or multiply(I tried both) happens, it messes up my amount. I am obviously not a COBOL programmer. I inherited this code and it is just one application(I plan to rewrite it in the future). Maybe I should just write a simple program to read the file in via sign trailing separate and output it to something COBOL likes better. I am using CA-Realia COBOL on a PC. Please help. Thanks.
-00010000013. Amounts not requiring this action move thru the program fine, no problem. Debug shows me that as soon as the compute or multiply(I tried both) happens, it messes up my amount. I am obviously not a COBOL programmer. I inherited this code and it is just one application(I plan to rewrite it in the future). Maybe I should just write a simple program to read the file in via sign trailing separate and output it to something COBOL likes better. I am using CA-Realia COBOL on a PC. Please help. Thanks.