This time I want giving you tutorial about COBOL programing... And you after enter to step more difficult..
But.. Calm down,, in here you certain understand, because I giving you element....
Perform in COBOL likely FOR in C++ programing... If in COBOL perform in C++ using until..
This is LOOPING....
In programing COBOL little different with other program... Because COBOL program not have compiller.. In compiller helped other aplication...
Ok...dirrect to use.... firstly you must open notepad or other for make program. If program code done you must saving in folder same with place installer COBOL program..
1. Open CMD with method...
press icon windows + R... and write CMD >> ENTER
OR
click start >> Run.. and write CMD >> ENTER
2. In here you must understand using CD, CD...
CD.. for back to folder
cd program files\cobol for enter in COBOL program
edit for enter in make code... You can using this for make code...
If you put program installer in drive D,E or other you enough write "D :, E :".....
Or you can use Notepad but save in folder same...
You can copy paste this program code in your program
IDENTIFICATION DIVISION.
PROGRAM-ID. PERFORM.
AUTHOR. MY KNOWLEDGE.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 Y PIC 99.
77 A PIC 99
PROCEDURE DIVISION.
GOING.
DISPLAY " ".
DISPLAY "INPUT YOUR MAX NUMBER".
DISPLAY "1 - 99 : ", ACCEPT A;
PERFORM VIEWING VARYING Y
FROM 1 BY 1 UNTIL Y > A.
STOP RUN.
VIEWING.
DISPLAY "NUMBER OF - ", Y;
And result :
Look On... you must put statement in column different. not one line.. But column 8 and column 12
If done you must compille before execution program
before, you must save it in place same with Cobol program...
And exit...
For compille write "COBOL namefile.cob >> enter"
Because nothing error you can working your program with write "RUNCOB namefile.com >> ENTER"
And I input NUMBER : 16 and this result....
If you input NUMBER : 5 certain different result...
Ok just it....
Thanks for reader was come in my site...
No comments:
Post a Comment