I have a problem with the Compiler for the programming language COBOL. I use the program "OpenCobolIDE" (GnuCOBOL 1.1 Mingw).
Firstly here is the code of an example program.
IDENTIFICATION DIVISION.
PROGRAM-ID. HelloWorld.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
01 name pic x(32).
PROCEDURE DIVISION.
beginn section.
DISPLAY "What is your Name?: " with no advancing.
accept name.
DISPLAY "Your Name: ",name .
STOP RUN.
END PROGRAM HelloWorld.
After typing my name, "Albert", the console doesn't send the message "Your Name: Albert" back. The Console is after "Albert" empty. But if I set the length of the string name to 6, because my name is 6 characters long, then the program works correctly and the console shows "Your Name: Albert".
In addition to this ,the clause with no advancing
doesn't work correctly.
When I use this command the console doesn't print "What is your Name?", it skips the line and I have to enter my name first and after entering my name the console shows: "What is your Name?: Albert". But in the .exe of the compiled program the command line with no advancing
works correctly.
Why is it so, and how I can repair that?