HP OpenVMS Systems Documentation |
HP COBOL
|
Previous | Contents | Index |
The compiler listing file for an HP COBOL program differs on Alpha and I64 from VAX when a COPY statement inserts text in the middle of a line.
In the following two compiler listing files, LCOP5D.LIB contains "O". The HP COBOL on Alpha and I64 compiler keeps the same line and inserts the COPY file contents below the source line. On VAX, the compiler splits the original source line into parts.
HP COBOL on Alpha and I64 Listing File for COPY Statement
----------------------------------------------------------- 13 P0. MOVE COPY LCOP5D. TO ALPHA. L 14 "O" |
HP COBOL on VAX Listing File for COPY Statement
----------------------------------------------------------- 13 P0. MOVE COPY LCOP5D. 14L "O" 15C TO ALPHA. |
For the REPLACE and COPY REPLACING statements, the line numbers in compiler listing files differ between Alpha and I64 listing files and VAX listing files. HP COBOL on Alpha and I64 arranges the line number for the replacement line to correspond to its line number in the original source text, while subsequent line numbers differ. HP COBOL for OpenVMS VAX arranges the line numbers consecutively.
The following source program produces compiler listing files with different ending line numbers on Alpha and I64 and VAX:
REPLACE ==A VERY LONG STATEMENT== by ==EXIT PROGRAM==. A VERY LONG STATEMENT. DISPLAY "To REPLACE or not to REPLACE". |
HP COBOL on Alpha and I64 Listing File for REPLACE Statement
----------------------------------------------------------------- 1 REPLACE ==A VERY LONG STATEMENT== by ==EXIT PROGRAM==. 2 EXIT PROGRAM. 6 DISPLAY "To REPLACE or not to REPLACE". |
HP COBOL on VAX Listing File for REPLACE Statement
----------------------------------------------------------------- 1 REPLACE ==A VERY LONG STATEMENT== by ==EXIT PROGRAM==. 2 EXIT PROGRAM. 3 DISPLAY "To REPLACE or not to REPLACE". |
The diagnostic messages for the COBOL source statements REPLACE and DATE-COMPILED result in compiler listing files that contain multiple instances of the source line.
On Alpha and I64, for a REPLACE statement in an HP COBOL program, if the compiler issues a message on the replacement text, the message corresponds to the original text in the program, as shown in the following:
HP COBOL on Alpha and I64 Listing File for REPLACE Statement
18 P0. REPLACE ==xyzpdqnothere== 19 BY ==nothere==. 20 21 copy "drep3hlib". L 22 display xyzpdqnothere. ...................1 %COBOL-F-UNDEFSYM, (1) Undefined name LR 22 display nothere. |
On VAX, the compiler message corresponds to the replacement text, as shown in the following:
HP COBOL on VAX Listing File for REPLACE Statement
18 P0. REPLACE ==xyzpdqnothere== 19 BY ==nothere==. 20 21 copy "drep3hlib". 22LR display nothere. 1 %COBOL-F-ERROR 349, (1) Undefined name |
The following two compiler listing files demonstrate the difference between using the DATE-COMPILED statement with HP COBOL on Alpha or I64 and VAX.
HP COBOL on Alpha and I64 Listing File for DATE-COMPILED Statement
33 * 34 date-compiled .............1 %COBOL-E-NODOT, (1) Missing period is assumed 34 date-compiled 16-Jul-1992. 35 security. none. |
HP COBOL on VAX Listing File for DATE-COMPILED Statement
33 * 34 date-compiled 16-Jul-1992. 1 %COBOL-E-ERROR 65, (1) Missing period is assumed 35 security. none. |
On OpenVMS Alpha and I64, the /SEPARATE_COMPILATION qualifier produces distinct listings. For separately compiled programs (SCP) compiled without /SEPARATE_COMPILATION, the listings are ordered as follows:
With /SEPARATE_COMPILATION, the listings are ordered as follows (consistent with the order on VAX):
HP COBOL on Alpha and I64 and HP COBOL on VAX may use different control byte sequences in VFC files to accomplish similar output file formatting.
VFC formatted REPORT WRITER or LINAGE files are normally viewed by using the TYPE command or by printing them out. If you need to mail reports through electronic mail or to bring them up in an editor, you can do so by compiling with /NOVFC on the compile command line.
All REPORT WRITER and LINAGE files that are opened in a single .COB source file will have the same format (either VFC or NOVFC). VFC is the default. For example:
$ COBOL A/NOVFC,B/VFC,C/NOVFC,D |
In this example, source files B and D will produce reports in VFC format. (Behavior is different when the source file list items are separated by plus (+) signs. See Section 1.2.2.1, Format of the COBOL Command on OpenVMS.)
On Tru64 UNIX, the REPORT WRITER and LINAGE files produce ASCII
file output, which can be viewed or mailed electronically.
B.4.4 HP COBOL Statement Differences on Alpha, I64, and VAX
The following COBOL statements and clause behave differently on Alpha and I64 than they do onVAX:
When you use any extended feature of ACCEPT or DISPLAY within your program, visible differences in behavior between HP COBOL on Alpha and I64 and VAX exist in some instances. The Alpha and I64 behavior in these instances is as follows:
Screen update behavior is not identical for HP COBOL on Alpha and I64 and HP COBOL on VAX, and they sometimes use different escape sequences for ACCEPT and DISPLAY to accomplish similar screen formatting.
Previous | Next | Contents | Index |