Hi.. welcome
to my page at “We Are Knowledge”… in here you will getting many IT knowledge
from dekstop programming until web programming.. you will getting the IT
knowledge like it.. Let’s do read my article..
C’mon read
this article, this article discuss about “COBOL”, and I giving tutorial of “FORM
TO USING”.. ok.. direct to go..
Definition :
Form
>> This
command is used to display / receive data from a variable.
To
>> This
command is used to enter the value / value store the variables.
Using
>> This
command is used to substitute and TO FORM command means the command can do two
things above.
Ok.. now I
want making program using “FORM TO USING” for you, you can copy this :
1. open cmd,
method :
a. press icon windows + R >>
write “cmd” >> enter
b. click start >> Run >>
write “cmd” >> enter
2. if you
put the instalation of cobol in “program files”, follow this :
a. cd..
b. cd..
c. cd program files/cobol
d. edit ftu.cob
3. copy
paste this coding, you must follow the line ::
LINE ::
8 12
IDENTIFICATION
DIVISION.
PROGRAM-ID. FEE.
AUTHOR. W-A-K.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01
DM.
02 BRG PIC A(25).
02 HRG PIC 9(6) VALUE 0.
02 JL PIC 9(3) VALUE 0.
02 TOT PIC 9(6) VALUE 0.
SCREEN SECTION.
01 HL.
02 BLANK SCREEN.
01 LM.
02 LINE 6 COLUMN 3 VALUE 'NAME OF
GOODS : '.
02 COLUMN PLUS 1 PIC A(20) TO BRG.
02 LINE 8 COLUMN 3 VALUE 'HARGA : '.
02 COLUMN PLUS 1 PIC 9(6) TO HRG.
02 LINE 10 COLUMN 3 VALUE 'QUANTITY
: '.
02 COLUMN PLUS 1 PIC 9(3) TO JL.
01 LT.
02 LINE 14 COLUMN 3 VALUE 'TOTAL :
'.
02 COLUMN PLUS 1 PIC 9(6) FROM
TOTAL.
PROCEDURE DIVISION.
STR.
DISPLAY HL.
DISPLAY LM.
ACCEPT LM.
COMPUTE TOT = JL * HRG.
DISPLAY LT.
INT.
STOP RUN.
And if t is..
save with name “wak”.. and you must exit
Compile your
program with write >> cobol wak.cob
Running your
program with write >> runcob wak.cob
Ok.. just it…
I hope you
likely…
See you
later brother…
No comments:
Post a Comment