Hello
I’m a newbie COBOL developer from Brazil.
I’ve been reviewing a past evaluation code trying to solve the mistakes I made so I could show my code in GitHub or something.
One issue was with V or Decimal-Point in numeric pictures. In Brazil we use comma as decimal point in currencies, scores, etc. In a report (RELALU), the program is supposed to show students’ test scores, like 10,00; 09,80; 05,70; etc.
I wrote the SPECIAL-NAMES paragraph with the DECIMAL-POINT IS COMMA. at the 8th column. And put all test scores (NOTA, in portuguese) as PIC 99V99. I also tried, inspired by internet posts, PIC 9(02)V9(02); PIC 99,99; PIC 99.99; PIC S9(2)V9(2). I also tried changing only some of the occurrences, or changing the printer picture to alphanumeric, or taking the V off…
Absolutely nothing worked.
Besides that, my program is also printing an extra empty line at the end with a single REPROVADO(failed) word. I also can’t find out why this keeps happening, even though I tried changing stuff around in DATA and PROCEDURE divisions.
Sorry if the names seem weird or confusing in any way - I followed namings that are based on portuguese and were used by my professor, probably for didactic reasons. I used a COBOL compiler from a DOSBoxPortable used by my professor. I believe it’s an old compiler, but I don’t really know which is it. This might be the source of the problem, but I believe it’s important to write code that can work in any or most compilers if we are talking about a language like COBOL, right?
Oh, and before you ask: my professor…wasn’t really available to help me on this, even though I was his best performing student. He was quite misterious when he “answered” me.
If any good soul would be so kind to help me, I’d be very grateful. Any help, clue or advice is welcome.
Thank you