New features in COBOL 85 |
|
From "Special Report (sidebar)", Access to Wang, May 1994 |
|
[ Prior Article ] [ Return to the Catalog of articles ] [ Next Article ] |
COBOL 85 offers many interesting improvements to the language. Here are some of these new features:
FILLER items need not have any name: Example:
01 PIC X(12).
Explicit scope terminators: Specific end points for operators. Includes END-PERFORM, END-CALL, END-WRITE, END-IF, etc.
New verb EVALUATE: Allows a more understandable way of performing CASE logic; that is, decisions based on tested conditions.
EXTERNAL data: Data items can be declared EXTERNAL and are then available to all programs run by that program - without a LINKAGE SECTION, PUTPARMs, or any other coupling approach.
Nesting: Programs can also be nested within one another, allowing development of small modules that can be used in many programs.
More dimensions: Tables can be up to 7 dimensions.
Case insensitivity: Lower-case program code functions the same as upper-case code.
In-line PERFORMs: A portion of a sentence may be performed multiple times or until a condition is met without creating a separate paragraph, using an END-PERFORM statement to control the scope of execution. This removes the need to put such code into a separate paragraph.
Reference modification (substrings): Used to refer to specific positions in a character item.
Tests can be conducted before or after execution: For example:
PERFORM NEXT-PROCESS WITH TEST AFTER. . .
Previously, all tests were performed before execution; this change allows a section to be executed at least once.
INSPECT. . .CONVERTING: similar to the INSPECT. . .REPLACING statement, but allows more than one character to be examined and converted.
Program subroutines can be CALLed BY CONTENT: variables retain their original value when returning from the call. Previous standards assumed a CALL BY REFERENCE which can return differing values. Both forms can be mixed within the same subroutine call.
Copyright © 1994 Dennis S. Barnes
Reprints of this article are permitted without notification
if the source of the information is clearly identified