Im using cobol 85 to create a program which inputs number of 10 digits, and if user types "END" the program ends. But i cant seem to clear the screen using DISPLAY AT "position". Is there any suggestions? Thank you. Here is the source code:
IDENTIFICATION DIVISION.
PROGRAM-ID. INPUT-ASSIGMENT.
******************************************************************
DATA DIVISION.
WORKING-STORAGE SECTION.
******************************************************************
01 A.
03 A1 OCCURS 10 TIMES PIC X(3).
01 I PIC 9(3).
01 J PIC 9(3).
01 KETA PIC 9(4).
01 DT-IN PIC X(3).
******************************************************************
PROCEDURE DIVISION.
PERFORM MAIN-SYORI.
STOP RUN.
******************************************************************
MAIN-SYORI SECTION.
PERFORM INITIALIZE-RTN.
PERFORM TAMEKOMI-SYORI.
PERFORM TORIDASHI-SYORI.
******************************************************************
INITIALIZE-RTN SECTION.
DISPLAY SPACE.
MOVE 1 TO I.
MOVE 1 TO J.
******************************************************************
TAMEKOMI-SYORI SECTION.
PERFORM UNTIL I > 10 OR DT-IN = "END"
DISPLAY "3文字を入力してください:"
ACCEPT DT-IN
IF DT-IN NOT = "END"
MOVE DT-IN TO A1(I)
ADD 1 TO I
END-IF
END-PERFORM.
******************************************************************
TORIDASHI-SYORI SECTION.
DISPLAY SPACE.
PERFORM VARYING J FROM 1 BY 1 UNTIL J > I - 1
DISPLAY A1(J)
END-PERFORM.
DISPLAY "プログラムは終了しました.".
******************************************************************
END PROGRAM INPUT-ASSIGMENT.
DISPLAY SPACE AT 0101 WITH ERASE EOS
, depending on your use case you may want to WITH ERASE EOL
instead.