IDENTIFICATION DIVISION.
PROGRAM-ID. SAMPLE.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 I PIC 9.
PROCEDURE DIVISION.
PERFORM VARYING I FROM 1 BY 1 UNTIL I > 5
DISPLAY I WITH NO ADVANCING
END-PERFORM.
STOP RUN.
PROGRAM-ID. SAMPLE.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 I PIC 9.
PROCEDURE DIVISION.
PERFORM VARYING I FROM 1 BY 1 UNTIL I > 5
DISPLAY I WITH NO ADVANCING
END-PERFORM.
STOP RUN.
Will this give the output in the following format
1 2 3 4 5
One more doubt
How can i work with cobol programs at home.
I am having window 7 os in my pc.
which cobol compiler should i use.
Where can i download it for free.
Please suggest me a solution for this.