Obsolete Features
Obsolete features of ANSI85 are those that will be deleted from the
next[REV BEG] full revision of the COBOL standard.[REV END] HP COBOL
II/XL supports them, but its successor may not. If you use obsolete
features in your program, you may not be able to compile it on compilers
that implement the next ANSI COBOL.
This table lists the obsolete features, justifies their being obsolete,
and tells you how to make your program independent of them.
Obsolete Elements of ANSI85 COBOL
----------------------------------------------------------------------------------------------
| | | |
| | | How to Make Your Program |
| Obsolete Feature | Justification for | Independent of the Feature |
| | Obsolescence | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| AUTHOR paragraph, | These paragraphs do not | Either leave it out |
| INSTALLATION paragraph, | affect program operation. | entirely, or identify the |
| DATE-WRITTEN paragraph, | Comments can serve the same | information such as author |
| DATE-COMPILED paragraph, | purpose as they do. | and installation, with |
| SECURITY paragraph | | comments in the |
| | Interaction between the COPY | IDENTIFICATION DIVISION. |
| | statement and the comment | |
| | entries in these paragraphs | |
| | is often ambiguous. For | |
| | example, how can you tell if | |
| | a comment entry contains the | |
| | word COPY or a COPY | |
| | statement? | |
| | | |
| | DATE-COMPILED and SECURITY | |
| | are implementor-defined | |
| | comment entry paragraphs, | |
| | most of which were obsoleted | |
| | in order to clean up and | |
| | regularize COBOL. | |
| | | |
----------------------------------------------------------------------------------------------
Table 2-0. Obsolete Elements of ANSI85 COBOL (cont.)
----------------------------------------------------------------------------------------------
| | | |
| | | How to Make Your Program |
| Obsolete Feature | Justification for | Independent of the Feature |
| | Obsolescence | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| MEMORY-SIZE clause | This feature is a carry-over | Leave it out. The operating |
| | from the time when many | system performs its |
| | systems required a | function. |
| | specification of memory size | |
| | allocation to load the run | |
| | unit. Memory capacity for a | |
| | family of main frame models | |
| | often ranged from 8K to 64K. | |
| | COBOL programs used the | |
| | MEMORY-SIZE clause to | |
| | generate objects for | |
| | specific models. | |
| | | |
| | In today's computing | |
| | environment, this function | |
| | is more appropriately | |
| | controlled by the host | |
| | operating system. In 1974 | |
| | Standard COBOL, the | |
| | MEMORY-SIZE clause was | |
| | optional; therefore, no | |
| | standard conforming COBOL | |
| | implementations require it. | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| MULTIPLE FILE TAPE clause | Allowing users to | Instead of using the |
| | sequentially access multiple | MULTIPLE FILE TAPE clause or |
| | files on a labeled tape | the VALUE OF clause (also |
| | without rewinding the tape | obsolete), use a file |
| | is a function of the | equation (see Chapter 5 |
| | operating system, not the | for details). |
| | COBOL program. | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| RERUN clause | Seven forms of the RERUN | Leave it out. The operating |
| | statement are provided. | system performs its |
| | | function. |
| | The RERUN clause provides | |
| | only half of a complete | |
| | rerun/restart facility. | |
| | That is, the syntax and | |
| | semantics for restart are | |
| | not specified. Due to the | |
| | variety of forms of the | |
| | RERUN clause, there is no | |
| | guarantee that a program | |
| | that uses it would be | |
| | transportable. | |
| | | |
| | In today's computing | |
| | environment, this feature is | |
| | more appropriately | |
| | controlled by the host | |
| | operating system. | |
| | | |
----------------------------------------------------------------------------------------------
Table 2-0. Obsolete Elements of ANSI85 COBOL (cont.)
----------------------------------------------------------------------------------------------
| | | |
| | | How to Make Your Program |
| Obsolete Feature | Justification for | Independent of the Feature |
| | Obsolescence | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| DATA RECORDS clause | The DATA RECORDS clause | Leave it out. The same |
| | gives redundant information | information is in the record |
| | and could mislead someone | description associated with |
| | who reads the program. | the file. |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| LABEL RECORDS clause | Specifying the presence of | Leave it out. The operating |
| | file labels is a function of | system performs its |
| | the operating system, not | function. |
| | the COBOL program. | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| VALUE OF clause | Describing file label items | Leave it out. The operating |
| | is a function of the | system performs its |
| | operating system, not the | function. |
| | COBOL program. | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| REVERSED phrase | The hardware necessary for | Do not use this phrase. It |
| | this function is not widely | has never been implemented |
| | available; thus, it is | for HP COBOL II/XL. |
| | infrequently implemented and | |
| | not appropriate for | |
| | standardization. | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| ENTER statement | The ENTER statement is | Do not use this phrase. It |
| | optional and implementation | has never been implemented |
| | defined; therefore, it is | for HP COBOL II/XL. |
| | not portable and is not | |
| | appropriate for | |
| | standardization. | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| STOP LITERAL statement | The STOP LITERAL statement | Do not use the STOP LITERAL |
| | is implementation defined; | statement. If necessary use |
| | therefore, it is not | DISPLAY to send messages to |
| | portable and is not | the console. (If a tape |
| | appropriate for | mount is necessary, the |
| | standardization. | operating system will handle |
| | | the delay.) |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| ALTER Statement | The ALTER statement makes a | Use the GOTO DEPENDING ON |
| | program difficult to | statement instead. |
| | understand and maintain. | |
| | The ALTER statement provides | |
| | no unique function, because | |
| | the GO TO DEPENDING ON | |
| | statement can serve the same | |
| | purpose. | |
| | | |
----------------------------------------------------------------------------------------------
Table 2-0. Obsolete Elements of ANSI85 COBOL (cont.)
----------------------------------------------------------------------------------------------
| | | |
| | | How to Make Your Program |
| Obsolete Feature | Justification for | Independent of the Feature |
| | Obsolescence | |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| Debug Module features: * | Today's computing | Do not use features that |
| Object time switch (PARM=1 | environment usually provides | support the Debug Module. |
| in RUN command), USE FOR | interactive debug | Refer to the[REV BEG] HP |
| DEBUGGING statement, Special | facilities, which provide | COBOL II/XL Reference |
| register DEBUG-ITEM | the function of the Debug | Manual. |
| | Module without requiring | |
| | COBOL source statements. | Debug your program with HP |
| | | Symbolic Debugger/XL, HP |
| | | TOOLSET/XL, or DEBUG (the |
| | | MPE XL System Debugger).[REV |
| | | END] |
| | | |
----------------------------------------------------------------------------------------------
* The following Debug Module features are not obsolete and are now part
of the nucleus module:
* WITH DEBUGGING MODE clause of the SOURCE-COMPUTER paragraph.
* Debugging lines (lines with the letter D in column seven).