-
Contributing Member
General coding rules
I want to know some of the general coding rules a programmer need to follow while coding a cobol program.If people participate in this discussion and put their ideas I feel we could get lot of ideas on the same.
-
Contributing Member
Re: General coding rules
There are many rules. BUt to name a few are:
All user-defined data names in the WORKING-STORAGE SECTION, will be prefixed by WSn where n is a sequence number of the working storage entries.
Subordinate data items, e.g., at the 05 level, will each be prefixed by the same prefix as that at their respective 01 level.
The IDENTIFICATION DIVISION must include program remarks bracketed by asterisks. These remarks must include the following:
a. A short overview of the purpose of the program
b. Frequency of program operation (e.g., monthly), if applicable.
c. Course number and section number
d. Program or assignment number
e. Name of instructor
-
Junior Member
Re: General coding rules
To add some more into the coding rules are:
A "/" placed in position 7 of the line preceding the DATA DIVISION and the PROCEDURE DIVISION so that these divisions begin at the top of a new page of the listing.
set the page eject symbol ("/" in column 7) to prevent group items in the DATA DIVISION and modules (paragraphs) in the PROCEDURE DIVISION from being separated by a page break.
All FD entries in the FILE SECTION will be separated by at least on blank line.
All 01 entries in the WORKING-STORAGE SECTION will be separated by at least one blank line.
Leave Spacing between DIVISIONS, SECTIONS, LEVELS, and paragraphs.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules