46 lines
897 B
Plaintext
46 lines
897 B
Plaintext
== Why is this an issue?
|
|
|
|
OS/VS COBOL accepted the ``++EXHIBIT++`` statement, but IBM Enterprise COBOL does not. With IBM Enterprise COBOL, the ``++DISPLAY++`` statement must be used instead.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,cobol]
|
|
----
|
|
IDENTIFICATION DIVISION.
|
|
PROGRAM-ID. foo.
|
|
|
|
DATA DIVISION.
|
|
|
|
WORKING-STORAGE SECTION.
|
|
01 WS-FOO PIC X(42).
|
|
01 WS-BAR PIC X(42).
|
|
|
|
PROCEDURE DIVISION.
|
|
* Non-Compliant
|
|
EXHIBIT NAMED WS-FOO WS-BAR.
|
|
END PROGRAM foo.
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,cobol]
|
|
----
|
|
IDENTIFICATION DIVISION.
|
|
PROGRAM-ID. foo.
|
|
|
|
DATA DIVISION.
|
|
|
|
WORKING-STORAGE SECTION.
|
|
01 WS-FOO PIC X(42).
|
|
01 WS-BAR PIC X(42).
|
|
|
|
PROCEDURE DIVISION.
|
|
* Compliant
|
|
DISPLAY "WS-FOO = " WS-FOO
|
|
"WS-BAR = " WS-BAR.
|
|
END PROGRAM foo.
|
|
----
|
|
|