Shorter Forms
COBOL-IT Report Writer offers you several ways to shorten the amount of code you write. You have already seen several, such as shortening COLUMN to COL. Of course, the shorter forms may not always be clearer, and you may decide not to adopt them all. Here are some of them:
-
The keywords TYPE, SOURCE, VALUE, and PRESENT may be omitted. This reduces your coding effort at a cost of making your program less readable to a maintenance programmer unfamiliar with report writer.
-
If you do not code a TYPE clause in a level-01 entry, TYPE DETAIL is implied.
-
You may write LINE and COLUMN (or COL) in the same entry, provided that there is only one item in the LINE. So you could code:
03 LINE + 1 COL 20 VALUE "GOLF"
instead of
03 LINE + 1. 05 COL 20 VALUE "GOLF".
If there is second item in the line, this second method is the only way.
-
You may code the LINE clause in the level-01 entry, provided that there is only one LINE in the report group. So you could code:
01 ACCOUNT-ENTRY TYPE DE LINE + 1.
instead of:
01 ACCOUNT-ENTRY TYPE DE. 05 LINE + 1.
If there is another LINE in the report group, this second method is the only way.