Hello my friends IT knowledge lover. You are on my blog at “We Are
Knowledge”.in here you will getting many IT knowledge and general knowledge. In
this blog to be found IT knowledge from “Web programming” like as : HTML, PHP,
JAVASCRIPT until “Dekstop programing” like as : cobol, visual basic 6, c++. And
in here you also can find article about graphic design using “Adobe Photoshop”..
Like this article discuss about COBOL. You know program language
COBOL ? if you do not know, let’s do read my article.. and topic of our
discussion this time is “SYNTAX-SYNTAX
ON SEQUENTIAL FILE”. You will know ??? C’
mon to read this article… have fun for read it friends..
In COBOL to be found “division”, that is ::
1. Identification Division
2. Environment Division
3. Data Division
4. Procedure Division
But for SEQUENTIAL FILE just discuss point 2 (two) until 4
(four)..
1. ENVIRONMENT DIVISION
Example ::
INPUT-OUTPUT SECTION.
FILE-CONTROL
SELECT name_of_file ASSIGN TO { DISK PRINTER }
[ORGANIZATION IS [LINE] SEQUENTIAL]
ACCESS MODE IS SEQUENTIAL.
FILE STATUS IS name_of_data.
Logic ::
SELECT
>> You should write this first
ASSIGN
>> choose the form of files that will be used, disk or print
files.
FILE STATUS
>> This syntax is used to indicate (to know) the type of
error that occurred
2. DATA DIVISION
In syntax on data division the equation,
ie :
LABEL RECORD IS OMMITED == LABEL RECORDS ARE OMMITED
LABEL RECORD IS STANDARD == LABEL
RECORDS ARE STANDARD
LABEL RECORD IS OMMITED
>> This syntax is used to print
files that do not have a label
LABEL RECORD IS STANDARD
>> This syntax is used to print
a file that has the label
3. PROCEDURE DIVISION
OPEN
>>
this syntax for openning your file to be accessed.
CLOSE
>>
this syntax for clossing your file which has been used, because if you not
close, possibility your file be broken
WRITE
>> use
this syntax if you want to display the output to a printer or to record data to
a file that you designated.
REWRITE
>> This
syntax is used to re-record the files you've recorded earlier
READ
>> this
syntax used for reading in your file
Ok. just it..
I hope you like..
see you later friends...
No comments:
Post a Comment