PICture Clauses
It is frequently necessary to add up the PICture clauses to determine the overall length of a group. It is easier to add up a straight column of numbers. I usually put mine in column 36. This leaves enough room for a value clause of up to 18 characters without continuing it on the next line.
VALUE Clauses
It is frequently necessary to add up the PICture clauses to determine the overall length of a group. Lining up the VALUE clauses keeps them out of the way. I usually put mine in column 46. This leaves enough room for a value clause of up to 18 characters without continuing it on the next line. For values between 19 and 58 characters, I code the actual value right justified on the next line. Longer items will need some kind of continuation anyway so I start those right after the VALUE.
Lists in the PROCEDURE DIVISION
When using a verb that permits an operation to be performed on multiple items, align the items on subsequent lines so it is obvious that more than one item will be affected. Programmers reading the program will often overlook an extra item code on the other end of a line. Good examples:
MOVE
A
TO
B
C
D.
ADD
A
B
C
TO
D.
It is frequently necessary to add up the PICture clauses to determine the overall length of a group. It is easier to add up a straight column of numbers. I usually put mine in column 36. This leaves enough room for a value clause of up to 18 characters without continuing it on the next line.
VALUE Clauses
It is frequently necessary to add up the PICture clauses to determine the overall length of a group. Lining up the VALUE clauses keeps them out of the way. I usually put mine in column 46. This leaves enough room for a value clause of up to 18 characters without continuing it on the next line. For values between 19 and 58 characters, I code the actual value right justified on the next line. Longer items will need some kind of continuation anyway so I start those right after the VALUE.
Lists in the PROCEDURE DIVISION
When using a verb that permits an operation to be performed on multiple items, align the items on subsequent lines so it is obvious that more than one item will be affected. Programmers reading the program will often overlook an extra item code on the other end of a line. Good examples:
MOVE
A
TO
B
C
D.
ADD
A
B
C
TO
D.