HP COBOL V2.8 - Release Notes __________________________________________________________________ November 19, 2004 File location: OpenVMS: SYS$HELP:COBOL028_RELEASE_NOTES.PS OpenVMS: SYS$HELP:COBOL028.RELEASE_NOTES Tru64 UNIX: /usr/lib/cmplrs/cobol/relnotes i © 2004 Hewlett-Packard Development Company, L.P. Microsoft, Windows, Windows NT, and Visual C++ are U.S. registered trademarks of Microsoft Corporation. Motif is a trademark of The Open Group in the United States and other countries. Confidential computer software. Valid license from HP and/or its subsidiaries required for possession, use, or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendors standard commercial license. Neither HP nor any of its subsidiaries shall be liable for technical or editorial errors or omissions contained herein. The information in this document is provided "as is" without warranty of any kind and is subject to change without notice. The warranties for HP products are set forth in the express limited warranty statements accompanying such products. Nothing herein should be construed as constituting an additional warranty. _______________________________________________________ Contents _________________________________________________ 1 RELEASE SUMMARY 1 1.1 Version Numbers _______________ 4 1.2 Installation information ______ 6 1.3 Problems Corrected Since V2.7 _ 7 1.4 Restrictions and Known Problems ______________________ 13 _________________________________________________ 2 RECENT ENHANCEMENTS 30 2.1 Run-time currency sign handling ______________________ 30 2.2 Extended alphanumerics ________ 30 2.3 Run-time traceback on Tru64 UNIX __________________________ 31 2.4 Reference/User/DML Manuals merged for VAX, Alpha, and I64 ___________________________ 31 _________________________________________________ 3 RUN-TIME LIBRARY NOTES 32 _________________________________________________ 4 DEBUGGER NOTES 33 4.1 Debugger Notes for OpenVMS Alpha and OpenVMS I64 _________ 33 4.2 Debugger Notes for Tru64 UNIX _ 35 _________________________________________________ 5 DOCUMENTATION NOTES 40 5.1 Documentation Changes and Updates _______________________ 40 5.2 Summary of the HP COBOL Documentation Set _____________ 42 iii Contents 5.3 Feedback on Our Documentation _ 44 _________________________________________________ 6 TROUBLESHOOTING TIPS 45 _________________________________________________ 7 HP COBOL COMPATIBILITY MATRIX 58 _________________________________________________ 8 PROVIDING PRODUCT FEEDBACK 62 iv __________________________________________________________________ 1 Release Summary These release notes contain important information about HP COBOL V2.8 including a short descriptive summary of features and sections on problems corrected, restrictions and known problems, recent enhancements, debugger notes, documentation notes, troubleshooting tips, and an HP COBOL compatibility matrix. This release includes a COBOL native compiler for OpenVMS I64. All required RTL components are included with OpenVMS I64. COBOL V2.8 was previously released on OpenVMS Alpha and Tru64 UNIX as Compaq COBOL V2.8. These release notes cover all three platforms supported by COBOL V2.8. The COBOL documentation is available on the web at http://h71000.www7.hp.com/commercial/cobol/ and is also shipping with V2.8 on OpenVMS Alpha and Tru64 UNIX and V5.7A on OpenVMS VAX. This documentation has been updated to cover V2.8 on OpenVMS I64 and will be available on the web soon. The updated documentation will ship with V2.8 for OpenVMS I64. These release notes should be made available to all users of HP COBOL. The release notes include many details to help facilitate migrations from and coexistence between HP COBOL on the four supported platforms on OpenVMS and Tru64 UNIX. Additional details concerning differences between HP COBOL on the supported platforms appear in the documentation. When a release note is specific to a particular platform, a platform tag is used. 1 At the time of the writing of these release notes, HP COBOL V2.8 for OpenVMS I64 requires: o OpenVMS I64 V8.2 or higher V2.8 is currently shipping on OpenVMS Alpha and Tru64 UNIX and supports the following versions: o OpenVMS Alpha V6.2 or higher o Tru64 UNIX V5.1 or higher Refer to the latest operating system support policies for the currently supported versions of both COBOL and the operating systems. On OpenVMS I64, HP COBOL V2.8 includes the following new functionality beyond the V2.8 releases on OpenVMS Alpha and Tru64 UNIX: o GEM BL50 upgrade o Several bug fixes (see details that follow in Section 1.3) On OpenVMS Alpha and Tru64 UNIX, V2.8 included the following new functionality, new documentation, and bug fixes beyond V2.7: o Reference/User Manuals in HTML and PDF formats on the external web merged to cover HP COBOL on VAX and on Alpha o Run-time currency sign handling compatible with ANSI-2002 standard o Enhanced support for extended alphanumerics (larger than 65,535 bytes) o Run-time performance improvements with reenabling of decimal shadowing optimization o GEM BL48 upgrade including new arch and tune support o Enhanced support for /MATH=CIT4 and /MATH=CIT3 with FUNCTION INTEGER, INTEGER-PART, MOD, and REM 2 o [OpenVMS Alpha/I64] RMS Journaling support for sequential files with variable length records o [Tru64 UNIX] Run-time traceback support o Several bug fixes (see details that follow in Section 1.3) Restriction and problems specific to OpenVMS I64 are detailed in Section 1.4. See the compatibility matrix at the end of the release notes for a summary of the functionality available across the four platforms supported by HP COBOL. 3 ___________________________ 1.1 Version Numbers The edit level number, which appears at the end of the version number, reflects the number of revisions made to the compiler or RTL. The version number of the compiler is printed at the top of each page of the source listing generated by the compiler. For example, if the following string appears in the top line: HP COBOL V2.8-1380 then the compiler is Version V2.8, edit number 1380. The compiler version number is also displayed as follows: [OpenVMS] ANAL/IMAGE SYS$SYSTEM:COBOL [Tru64 UNIX] cobol -v The version number for the V2.8 run-time library is V2.8-670 (OpenVMS Alpha and Tru64 UNIX) and V2.8-775 (OpenVMS I64) for the following: [OpenVMS Alpha/I64] DEC$COBRTL.EXE [Tru64 UNIX] libcob.so [Tru64 UNIX] libcob.a To verify the version of the run-time library: [OpenVMS Alpha/I64] ANAL/IMAGE SYS$LIBRARY:DEC$COBRTL [Tru64 UNIX] what /usr/shlib/libcob.so [Tru64 UNIX] what /usr/lib/libcob.a The version number for the V2.8 decimal support run- time library is V2.8-49 (OpenVMS Alpha and Tru64 UNIX) and V2.8-67 (OpenVMS I64) for the following: [OpenVMS Alpha/I64] LIBOTS2.EXE [Tru64 UNIX] libots2.so [Tru64 UNIX] libots2.a 4 To verify the version of the V2.8 decimal support run-time library: [OpenVMS Alpha/I64] ANAL/IMAGE SYS$LIBRARY:LIBOTS2 [Tru64 UNIX] what /usr/shlib/libots2.so [Tru64 UNIX] what /usr/lib/libots2.a The run-time library including the decimal support run-time library is included with HP COBOL V2.8 (OpenVMS Alpha and Tru64 UNIX). The V2.8 RTL support is bundled with the base system starting with the following versions: OpenVMS Alpha V7.3-2 OpenVMS I64 V8.2 Tru64 UNIX V5.1B-1 5 ___________________________ 1.2 Installation information COBOL on OpenVMS I64 is installed via a single PCSI kit which installs the COBOL compiler, DCL command, DCL help, and release notes. The COBOL RTL components needed to use the COBOL V2.8-1380 compiler are included with OpenVMS I64. The information in the HP COBOL Installation Guide for OpenVMS Alpha and OpenVMS I64 Systems can be used to install the COBOL kit for OpenVMS I64. The primary difference for installations on OpenVMS I64 from installations on OpenVMS Alpha is that there is no COBRTL PCSI kit to install. A revised version of the COBOL installation guide covering OpenVMS I64 is included with COBOL V2.8 for OpenVMS I64. 6 ___________________________ 1.3 Problems Corrected Since V2.7 The list below is broken into three parts. The first part includes release notes for problems corrected since V2.8 ASM on OpenVMS Alpha and Tru64 UNIX (V2.8-1286 compiler and V2.8-670/V2.8-49 RTL). The second part includes release notes for problems corrected since the V2.7-1262 compiler and V2.7- 641/V2.7-48 RTL for OpenVMS Alpha up through V2.8 ASM. The third part includes release notes for problems corrected since V2.7 ASM (V2.7-1209 compiler and V2.7-603/V2.6-46 RTL) up through V2.7-1262 and V2.7- 641/V2.7-48. These fixes were released as a V2.7 ECO kit for OpenVMS Alpha in Apr-2002. Problems corrected that do not apply to all three supported Alpha/I64 platforms are tagged with o [OpenVMS I64] o [OpenVMS Alpha] o [Tru64 UNIX] Note that fixes in previous releases that applied just to OpenVMS Alpha now apply also to OpenVMS I64. _______________________________________________________ Version_____Description________________________________ V2.8-1380 The compiler now correctly cleans up and exits when the BADPROTCL diagnostic is issued during COPY FROM DICTIONARY processing. 7 _______________________________________________________ Version_____Description________________________________ V2.8-1380 The compiler now correctly handles /ANALYSIS_DATA/DEBUG. Previously, the compiler would ACCVIO in some cases with this qualifier combination. V2.8-1380 The compiler now correctly handles /OPT=LEV=2 and higher for decimal variables. V2.8-1380 CALL and CANCEL can now be used with LINK/NOTRACE/NODEBUG. V2.8-1380 The Installation Verification Procedure now runs correctly if the default directory is unwritable. This can happen, for example, when the distribution medium is a CD-ROM and the default is set to the CD-ROM device prior to running the IVP. V2.8-1380 The compiler now uses "Hewlett-Packard" instead of "Compaq" in language extension diagnostics, and "HP COBOL" is now used in the listing. V2.8-1380 The COBOL compiler now correctly handles /OPT=LEV=3 and higher for decimal truncation. This corrects a problem in the following compilers V1.0 through V2.4 V2.7-1262 through V2.8-1286 where the generated code would produce incorrect results for decimal truncation. 8 _______________________________________________________ Version_____Description________________________________ V2.8-1380 [OpenVMS V8.2] DEC$COBRTL includes a fix to automatic record locking. Starting with OpenVMS V8.2 (DEC$COBRTL V2.8-775), the RTL no longer acquires multiple record locks in certain cases with START and WRITE. V2.8-1380 [OpenVMS V8.2] DEC$COBRTL includes a change to handling of the COBOL SET verb via the logical COB$SWITCHES. Starting with OpenVMS V8.2 (DEC$COBRTL V2.8-775), the RTL tries the logical name table LNM$PROCESS if the attempt to use the first entry in the logical name table searchlist LNM$FILE_DEV fails. With versions of DEC$COBRTL prior to V2.8-775, the COBOL SET verb tries just the first entry in LNM$FILE_DEV and fails if that logical name table denies WRITE access. V2.8-1286 The compiler no longer gives a GEM assertion when it attempts to issue recently added GEM diagnostics such as TUNEOVERRIDE. V2.8-1286 The RTL now correctly handles UNSTRING OR for cases where there is overlap in the DELIMITED BY strings. This regression was introduced with the V2.5-234 RTL. V2.8-1286 Now that the COBOL compiler is built with GEM BL48, GEM_SYM_OM_REQUIRED_ENTRY is set for any EXTERNAL item. 9 _______________________________________________________ Version_____Description________________________________ V2.8-1286 [OpenVMS Alpha] The RTL now detects device full on CLOSE. V2.7-1262 The RTL now correctly handles REDEFINES with overlapping MOVE for /OPT=LEV=3 (-O3) and higher. This regression from V2.5 was introduced with V2.6. V2.7-1262 The compiler now correctly handles /CHECK=BOUNDS (-check bounds) for a non- constant reference modification length. This regression from V2.0 was introduced with V2.1. V2.7-1262 [OpenVMS Alpha] The compiler now correctly handles programs with both a file USE procedure and a DBMS USE procedure. Previously, use of both types of USE procedures in a program could result in an unexpected RECACTUSE diagnostic at run-time. This regression from V2.5 was introduced with V2.6. V2.7-1262 [OpenVMS Alpha] The compiler now correctly handles DML WHERE with REDEFINES for /OPT=LEV=1 and higher. V2.7-1262 [OpenVMS Alpha] The compiler now correctly handles multiple conditions in a USE FOR DB-EXCEPTION. Previously, use of multiple conditions in this case could result in an unexpected RECACTUSE diagnostic at run- time. 10 _______________________________________________________ Version_____Description________________________________ V2.7-1262 [OpenVMS Alpha] The compiler now correctly issues an -E- diagnostic for any attempt to use a DML verb in a USE FOR DB-EXCEPTION. V2.7-1262 [OpenVMS Alpha] The compiler now correctly handles EXIT PROGRAM in a USE FOR DB- EXCEPTION. Previously, EXIT PROGRAM in this case would incorrectly return to the main procedure. V2.7-1262 [OpenVMS Alpha] The COBRTL PCSI kit can now be installed on OpenVMS Alpha V7.1-1H1 and V7.1-1H2. V2.7-1262 [OpenVMS Alpha] The RTL now properly handles DELETE of the last record in an ISAM file. Previously, the RTL would get an internal consistency check failure. V2.7-1262 [OpenVMS Alpha] The RTL now supports RMS RU-Journaling for RECORD IS VARYING for SEQUENTIAL files. V2.7-1262 [OpenVMS Alpha] The RTL now correctly handles arithmetic expressions for which the compiler issues possible intermediate truncation diagnostics with /WARNINGS=ALL. This regression was introduced by the LIBOTS2.EXE as shipped with OpenVMS Alpha V7.3 and V7.2-6C1. This corrected RTL is now also shipping with OpenVMS Alpha V7.3- 1. 11 _______________________________________________________ Version_____Description________________________________ V2.7-1262 [Tru64 UNIX] The RTL now issues the diagnostic cobrtl: severe: program datasize exceeds process datasize limit - insufficient virtual memory instead of passing this condition on to the system: Fatal Error: Program datasize exceeds process datasize limit. Insufficient virtual memory. _______________________________________________________ 12 In this section, notes tagged with [OpenVMS Alpha/I64] also apply to OpenVMS I64. ___________________________ 1.4 Restrictions and Known Problems _______________________________________________________ Version_____Description________________________________ V2.8-1380 [OpenVMS I64] The COBOL compiler requires OpenVMS I64 V8.2 or higher. V2.8-1380 [OpenVMS I64] Alpha values for the /ARCHITECTURE and /OPTIMIZE=TUNE qualifiers are accepted on the compiler invocation command. An informational is printed saying they are ignored. I64 values for /ARCHITECTURE and /OPTIMIZE=TUNE are defined in the OpenVMS I64 compiler for development purposes only. Their behavior is unpredictable and they should not be used. V2.8-1380 [OpenVMS I64] Arithmetic exception handling is not 100% compatible between I64 and Alpha in undefined situations such as when ON SIZE ERROR is not used. ON SIZE ERROR does not detect all cases of 0/0. To accomplish COBOL semantics in the areas of exception handling and rounding, the COBOL RTL makes calls to two SYS$IEEE routines. COBOL does not support /IEEE_ MODE, /CHECK=UNDERFLOW, or Whole Program Floating Point mode. 13 _______________________________________________________ Version_____Description________________________________ V2.8-1380 [OpenVMS I64] Floating point defaults to /FLOAT=IEEE_FLOAT. Since all floating point operations are done using IEEE floating, results with non-IEEE floating point datatypes are subject to these conversions and precision of IEEE operations and thus are not 100% compatible between OpenVMS I64 and OpenVMS Alpha. V2.8-1380 [OpenVMS I64] Tape support with OPEN EXTEND is not fully working. V2.8-1380 [OpenVMS I64] COBOL images translated from OpenVMS VAX and OpenVMS Alpha have certain restrictions as detailed in the binary translator release notes. V2.8-1286 HP COBOL 2.8 requires one of the following: o OpenVMS Alpha V6.2 or higher o Tru64 UNIX V5.1 or higher You should upgrade your operating system to a Y2K-compliant version. Even though HP COBOL V2.8 will install on some operating system versions that are not Y2K-compliant, HP COBOL is supported only when used on a Y2K-compliant version of the operating system. V2.8-1286 To obtain all relevant V2.8 bug fixes and to use all V2.8 functionality, you must use the latest HP COBOL RTL. 14 _______________________________________________________ Version_____Description________________________________ V2.8-1286 The Installation Verification Procedure will fail if the default directory is unwritable. This can happen, for example, when the distribution media is a CD-ROM and the default is set to the CD-ROM device prior to running the IVP. V2.8-1286 [OpenVMS Alpha] The RTL can acquire multiple record locks with automatic record locking in certain cases with START and WRITE. You can see this situation if you get an unexpected %COB-F-LOCKED_FAILED diagnostic. If you encounter this situation, you can clear the record locks using either UNLOCK ALL RECORDS or CLOSE followed by OPEN. V2.8-1286 [OpenVMS Alpha/I64] If a file is remote, results on Alpha/I64 match results on VAX with manual record locking only with OPEN ALLOWING NO OTHERS. Other OPEN ALLOWING options on Alpha/I64 result in the diagnostic at run-time with REWRITE. V2.8-1286 [Tru64 UNIX] There is a known problem with Tru64 UNIX V5.1B and programs linked against libpthreads which impacts floating exception handling. Hypersort is linked against libpthreads, and all COBOL programs on Tru64 UNIX are linked against Hypersort. If you run COBOL programs on Tru64 UNIX V5.1B, the best partial workaround to this libpthreads problem is to compile -O0. 15 _______________________________________________________ Version_____Description________________________________ V2.8-1286 [OpenVMS Alpha/I64] The compiler with /ANALYSIS_DATA writes a PROGRAM-ID to the .ANA file with hyphen (-) if the PROGRAM-ID contains underscore (_). V2.8-1286 For certain floating-point operations that raise floating exceptions (traps, faults, or signals), EV6 and later processors leave different undefined results in output registers as compared with EV56 and earlier processors. V2.8-1286 When the starting position or length of reference modification is specified by an expression which is out of range, HP COBOL on Alpha and I64 detects the out of range at run-time, if /CHECK=BOUNDS (-check bounds) is used. HP COBOL on VAX in some cases detects the out of range at compile-time. HP COBOL on Alpha and I64 issues compile-time diagnostics for constant expressions in many cases. V2.8-1286 External names with the following prefixes are reserved for use by HP COBOL: COB$, DCOB$, cob_. V2.8-1286 Because of the differences in the way expressions are evaluated in a COMPUTE between HP COBOL for OpenVMS VAX and HP COBOL on Alpha, the number of divide by 0 and undefined exponentiation diagnostics may vary between HP COBOL for OpenVMS VAX and HP COBOL on Alpha. 16 _______________________________________________________ Version_____Description________________________________ V2.8-1286 The scope of EXTERNAL and DISPLAY UPON environment variables or OpenVMS logicals is the current run unit. These language features do not preserve data between run units. V2.8-1286 If a nonnumeric literal is continued across a line break, converting the file from terminal format to ANSI format using the reformat utility causes spaces to be inserted in the literal at the point of the line break. This can result in a literal that is longer than the PIC clause, causing a syntax error. V2.8-1286 See the section "Debugger Notes" for problems and restrictions specific to debugging with HP COBOL. V2.8-1286 SORT/MERGE does not support octaword binary keys on any platform except in the case on OpenVMS Alpha and I64 where SYS$LIBRARY:SORTSHR.EXE is used. SORTSHR.EXE is the default on OpenVMS Alpha and OpenVMS I64. 17 _______________________________________________________ Version_____Description________________________________ V2.8-1286 The order of evaluation of subscripts for the implied statements created for corresponding operands for ADD, MOVE, and SUBTRACT with the CORRESPONDING phrase is not defined under the ANSI-85 standard. Some implementations such as HP COBOL-85 for NSK (Tandem COBOL) differ from HP COBOL on I64, Alpha, and VAX and instead evaluate all subscripts only once, at the start of the execution of the actual ADD, MOVE, or SUBTRACT statement. See the Reference Manual for the details on how HP COBOL on I64, Alpha, and VAX handles this situation. V2.8-1286 There are several known restrictions with SORT32 and Hypersort on OpenVMS Alpha/I64. The Hypersort restrictions are also present on Tru64 UNIX. The restrictions are documented in the OpenVMS V7.3, V7.3-1, V7.3-2, and 8.2 Release Notes. Some of the restrictions have been removed with the latest versions of SORT32 and Hypersort which are now shipping with OpenVMS Alpha V7.3-2 OpenVMS I64 V8.2 Tru64 V5.1B-1 If you use SORT or MERGE with COBOL, these restrictions may impact your programs. 18 _______________________________________________________ Version_____Description________________________________ V2.8-1286 [OpenVMS Alpha] Because of the addition of Extended File Support in OpenVMS Alpha V7.2, you may notice changes in the handling of I/O run-time diagnostics and RMS special registers on OpenVMS Alpha V7.2 and higher. In particular, a long filename which produced RMS$_FNM under versions of OpenVMS Alpha prior to V7.2 now produces RMS$_CRE on OpenVMS Alpha V7.2 and higher, and this difference is reflected in I/O run-time diagnostics and RMS special registers. You do not need to be using the new ODS-5 support to see these RMS differences. V2.8-1286 [OpenVMS Alpha/I64] In the Debugger, use SET BREAK %LABEL with numeric paragraph labels. On VAX, you instead use SET BREAK %NAME. 19 _______________________________________________________ Version_____Description________________________________ V2.8-1286 [OpenVMS Alpha] On OpenVMS V7.2 and V7.2-1, installation of the COBRTL kit may result in PCSI claiming that the "DCL INSTALL" of DEC$COBRTL.EXE or LIBOTS2.EXE failed. This is due to a bug in OpenVMS related to INSTALL REPLACE of shareable images with shared address data sections. The displayed text during installation alerts the user to this possibility and says to force the installation to proceed. On OpenVMS V7.2 and V7.2-1, a reboot after installing the COBRTL kit is strongly recommended. This is again due to the OpenVMS bug with shared address data sections - OpenVMS may fail to properly re-INSTALL the RTL and can result in strange image activation errors. It is OK to finish installing all the kits and then reboot. Again, the text displayed during installation recommends this. V2.8-1286 [OpenVMS Alpha] If you are using OpenVMS Alpha V7.1 with any version of HP COBOL and you attempt to LINK with /THREADS_ENABLE, then you must have the ALPSYS11_071 ECO installed. Note that HP COBOL programs are NOT thread-reentrant. V2.8-1286 [OpenVMS Alpha] If you are using OpenVMS Alpha V7.1 with ANY version of HP COBOL, make sure to apply RMS ECO ALPRMS01_071 if you use either of the following clauses: o APPLY EXTENSION o APPLY PREALLOCATION 20 _______________________________________________________ Version_____Description________________________________ V2.8-1286 [OpenVMS Alpha] The minimum Oracle CDD/Repository version required for HP COBOL for OpenVMS Alpha is CDD/Repository V5.3. Contact Oracle for the details on the current supported version of Oracle CDD/Repository. V2.8-1286 [OpenVMS Alpha] The minimum Oracle DBMS version required for HP COBOL is Oracle DBMS V6.1-2. Use of the HP COBOL DBMS support requires the separate COBOL-DBMS license/PAK; see the HP COBOL SPD for more information. Contact Oracle for the details on the current supported version of Oracle DBMS. V2.8-1286 [OpenVMS Alpha/I64] APPLY LOCK-HOLDING (manual record locking) is not supported for REWRITE on a primary key WITH DUPLICATES if the file is on a remote system and accessed via DECnet. Use automatic record locking instead in this case. V2.8-1286 [OpenVMS Alpha/I64] Stream_LF files (ORGANIZATION LINE SEQ or sequential VFC files with /NOVFC) are not supported for file-sharing (ALLOWING ALL or READERS) when opened for writing. 21 _______________________________________________________ Version_____Description________________________________ V2.8-1286 [OpenVMS Alpha/I64] Stream_LF files (ORGANIZATION LINE SEQUENTIAL or ORGANIZATION SEQUENTIAL with /NOVFC) are not supported if the file is assigned to a network device. V2.8-1286 [OpenVMS Alpha/I64] If you mix ANSI ACCEPT statements and extended ACCEPT statements in one program, the RECALL (UP-arrow or DOWN-arrow) will not be supported for the ANSI ACCEPT statements. V2.8-1286 [OpenVMS Alpha] Attempts to write before the end of data (OPEN EXTEND) when using a TZK10 drive (a quarter-inch cartridge (QIC) standard drive) result in a write append error. This is a restriction in the QIC standard. The QIC standard allows drives to write at the end of data (append) or write the entire tape from beginning of tape (BOT), but does not allow writing before the end of data. This restriction applies to all OpenVMS Alpha hardware platforms that support the TZK10 drive. 22 _______________________________________________________ Version_____Description________________________________ V2.8-1286 [OpenVMS Alpha/I64] There are known problems with CDD/Repository regarding translation of quadword INITIAL_VALUEs. Some values are not converted correctly and will not produce a COBOL VALUE clause or a diagnostic message. Specifically, quadword fields with initial values that cannot fit into a quadword are silently ignored. This occurs in one of the translation layers of CDD and is not reported to the compiler. Initial values that are 19 digits in length and that will fit into a quadword, but exceed the length of a COBOL literal are detected and flagged by the compiler with a diagnostic. Initial values that are 18 digits or less work correctly. The initial value clauses for all unsigned quadwords are ignored by the compiler. Again, this occurs in a CDD translation layer and cannot be detected by the compiler. This occurs with the HP COBOL for OpenVMS VAX compiler as well as the HP COBOL compiler. V2.8-1286 [Tru64 UNIX] Hypersort is built with libaio. The RTL uses Hypersort. Tru64 UNIX does not support programs built with both libaio and libaio_raw. V2.8-1286 [Tru64 UNIX] -om -call_shared (-call_shared is the default) is not supported with COBOL on Tru64 UNIX V5.1. 23 _______________________________________________________ Version_____Description________________________________ V2.8-1286 [Tru64 UNIX] If you use POINTER VALUE IS REFERENCE, and you get the following compile-time warning: An initialization requiring relocation is not correctly aligned compile using -align or -align padding. V2.8-1286 [Tru64 UNIX] Programs built -call_shared (the default) with DIGITAL COBOL V2.5 or earlier require the file /usr/shlib/osf.1/libcurses.so. which can be installed from the optional subset OSFOBSOLETE supplied with your Tru64 UNIX installation kit. If you have programs built -call_shared with DIGITAL COBOL V2.5 or earlier, and you do not have the OSF.1 version of libcurses.so installed, the programs will not load, and the following fatal error will be seen at load time: a.out /sbin/loader: Fatal Error: object libcurses.so from liblist in a.out has version "osf.1", which does not match the found object: /usr/shlib/libcurses.so with version "xpg4" If you rebuild your programs with HP COBOL V2.8, you do not need to install OSFOBSOLETE. 24 _______________________________________________________ Version_____Description________________________________ V2.8-1286 [Tru64 UNIX] The following cannot be used in a stripped image: CANCEL CALL dataname cobfunc, cobcall, and cobcancel HP COBOL for OpenVMS VAX compatible extended ACCEPT/DISPLAY X/Open SCREEN SECTION V2.8-1286 [Tru64 UNIX] CANCEL, CALL dataname, cobfunc, cobcall, and cobcancel use nlist on the main executable image. This means that these references cannot be from the main executable image to a shared object. V2.8-1286 [Tru64 UNIX] You must use ltf (logical tape facility) to initialize ANSI labeled magtapes. V2.8-1286 [Tru64 UNIX] When you compile COBOL and non-COBOL objects and/or sources together, you must specify the COBOL ones before the non-COBOL ones on the command line. If you put the non-COBOL objects/sources first, the resulting executable will contain unresolvable loader symbols and will not run. V2.8-1286 [Tru64 UNIX] For COBOL programs to access files served from UCX file-systems, you must turn off the default file locking by using the -nolocking flag. 25 _______________________________________________________ Version_____Description________________________________ V2.8-1286 [Tru64 UNIX] A COBOL application will abort if it tries to ACCEPT from any device mapped to stdout or stderr, and the application will abort if it tries to DISPLAY to any device mapped to stdin. If you define the corresponding environment variables to devices other than stdout, stderr, and stdin, the above problems do not occur. V2.8-1286 [Tru64 UNIX] There is a potential "input file reading" problem with ULTRIX Connection Software (UCX) V2.0 or higher. The export option DATA_CONVERSION is turned on by default. The behavior, as described in the UCX release notes, is as follows: When DATA_CONVERSION is on, sequential non-stream_LF files are automatically converted to stream_LF files for READ_ONLY access. Note that the conversion is done dynamically, that is, the file remains in the sequential format on disk; only the data sent to the remote NFS client are converted. There is a difference in the file size between the original sequential non- stream_LF file (on the server side) and the converted stream_LF file (on the client side and cached by the client). To prevent the occurrence of an "input file reading" problem, ask your system manager to turn off the DATA_CONVERSION option. 26 _______________________________________________________ Version_____Description________________________________ V2.8-1286 [Tru64 UNIX] On a UCX-served disk, some file names are illegal that are legal in Tru64 UNIX on disks that are not UCX- served; for example, "a.dat.dat". V2.8-1286 [Tru64 UNIX] When the NFS server is an ULTRIX system, it must be running Version 4.2 or greater of the ULTRIX lock demon for your program to access files on the NFS- served disks. Otherwise, your program will hang. Superuser privilege will be required to kill your process. V2.8-1286 [Tru64 UNIX] When compiling in the FUSE environment (using the compiler options -xref or -xref_stdout), certain COBOL programs may raise this fatal FUSE diagnostic: cobol: Severe: Fatal error -7 returned from a cross-referencing library procedure To avoid this FUSE restriction, COBOL programs must adhere to this rule: Any copy file that contains a PROGRAM-ID or END PROGRAM statement for a program must contain that entire program. This restriction also applies to debugging COBOL programs with Ladebug. 27 _______________________________________________________ Version_____Description________________________________ V2.8-1286 [Tru64 UNIX] The FUSE editor does not completely support COBOL programs with successive COPY statements where there are no intervening data item references or declarations. With these COBOL programs, the FUSE Editor cannot be used to display the file for COBOL items which are clicked on from the Cross-Referencer. To work around this FUSE restriction, insert an extra declaration between successive COPY statements in the DATA DIVISION: COPY "LIBRARY-1". 01 EXTRA-ITEM PIC X. COPY "LIBRARY-2". and insert an extra reference to a data item between successive COPY statements in the PROCEDURE DIVISION: DISPLAY "TEST 7". COPY "LIBRARY-1". move "1" to extra-item. COPY "LIBRARY-2". 28 _______________________________________________________ Version_____Description________________________________ V2.8-1286 [Tru64 UNIX] When a shared object is created and a COBOL main entry point (_cobol_main) is identified, there is no way to create a different _cobol_main when building the executable image when -call_shared is specified. For example, ld -shared -o util.so util1.o util2.o util3.o ... ld -call_shared -o mainp mainp.o subp.o util.so ... When mainp runs, util1 is the code that is executed. The workaround is to create mainp.so. V2.8-1286 [Tru64 UNIX] ORGANIZATION INDEXED requires a separately licensed 3rd party product (Informix C-ISAM version V5.00). C-ISAM can be ordered from IBM at http://www.ibm.com/software/data/informix . _______________________________________________________ The table above is a summary of many of the restrictions and known problems with using HP COBOL on OpenVMS Alpha, OpenVMS I64, and Tru64 UNIX. For further details on these known problems and restrictions, or for other restrictions in using the product, see o HP COBOL Reference Manual o HP COBOL User Manual 29 __________________________________________________________________ 2 Recent Enhancements This section includes additional details on selected product enhancements since HP COBOL V2.7. These product enhancements are also documented in the V2.8 User Manual and Reference Manual. ___________________________ 2.1 Run-time currency sign handling The compiler now supports currency handling based on the syntax from the ANSI-2002 standard. To use this new support, you must compile [OpenVMS Alpha/I64] COBOL /RESERVED_WORDS=200X [Tru64 UNIX] cobol -rsv 200x The SPECIAL-NAMES Paragraph has the following new syntax on Alpha and I64: CURRENCY SIGN IS { char | literal-7 [WITH PICTURE_SYMBOL literal-8] } literal-7 is an alphanumeric literal. It cannot be a figurative constant. literal-8 is an alphanumeric literal consisting of a single character. It cannot be a figurative constant. No two occurrences of literal-8 can have the same value. ___________________________ 2.2 Extended alphanumerics Previously, the compiler generally had a limit of 65,535 (2**16-1) bytes for the size of alphanumeric items (PIC X). This limit has been raised in most cases to 268,435,455 (2**28-1) bytes. 30 ___________________________ 2.3 Run-time traceback on Tru64 UNIX [Tru64 UNIX] In most cases, if there is a fatal error in the executable, a traceback of routines called is printed to stderr, if the environment variable COBOL_TRACEBACK_FLAG is defined. It is not required to assign a particular value to the variable. Note that this new capability applies to errors detected in the RTL. Some errors are detected by the inline code, and these errors are handled as before (no traceback printed to stderr). For the C-shell one can define the variable with setenv COBOL_TRACEBACK_FLAG For the Bourne or Korn shell do the equivalent of COBOL_TRACEBACK_FLAG= export COBOL_TRACEBACK_FLAG As a result of the addition of this new traceback support, libcob.a now includes references to routines in libmld.a and libcob.so is now built to include libmld.a. ___________________________ 2.4 Reference/User/DML Manuals merged for VAX, Alpha, and I64 The HP COBOL Reference Manual, User Manual, and DML Manual are now available on the web in HTML and PDF formats and have been merged to cover HP COBOL on VAX, Alpha, and I64. This latest update should be available here soon: http://h71000.www7.hp.com/commercial/cobol/ 31 __________________________________________________________________ 3 Run-Time Library Notes The V2.8 HP COBOL Run-Time Library is included with OpenVMS I64 V8.2 and higher. There is no need to do any RTL installation to use HP COBOL on OpenVMS I64. The V2.8 HP COBOL Run-Time Library is included with the COBOL kits on OpenVMS Alpha and Tru64 UNIX. You must use this updated RTL if you use the V2.8 HP COBOL compiler. Note that the V2.8 RTL is bundled with the operating system starting with OpenVMS V7.3-2 and Tru64 UNIX V5.1B-1. You do not need to install the COBOL RTL from the layered product kit if you are running these operating system versions at a minimum. For Tru64 UNIX, you must still install the COBOL RTL from the Associated Product CD-ROM since the COBOL RTL is not automatically installed during a Tru64 UNIX installation. 32 __________________________________________________________________ 4 Debugger_Notes_____________ 4.1 Debugger Notes for OpenVMS Alpha and OpenVMS I64 Please read the following release notes for information about COBOL language support in OpenVMS Alpha/I64 DEBUG. Also see the debugger release notes included with the OpenVMS Alpha/I64 documentation for information on corrections for some of the problems listed below. Also see the appendix on tools in the HP COBOL User Manual. Following are some restrictions with this debugger: o COBOL variables with edit strings are not fully supported in DEBUG. o When debugging, ambiguous paragraph names cannot be disambiguated through qualification by the section name. To set breakpoints on paragraph names, the paragraph names need to be unique. Alternatively, breakpoints can be set using line number notation. o If you use the debugger to deposit data into Edited Picture variables, an error message will be displayed and the deposit operation will not be completed. The debugger session will not be compromised, however, and may be continued after this error. The error message is %DEBUG-F-BUG_CHECK, internal consistency check failure o The debugger divide operators for display numeric and packed decimal data items are not implemented. o The debugger generally does not support numerics with more than 18 digits. o In previous versions of the debugger, lookups of certain COBOL record components resulted in nonunique symbol errors. This has been corrected starting with the debugger which shipped with OpenVMS Alpha V7.3. 33 o Starting with OpenVMS Alpha V7.3-1, attempts to STEP after the program has reached completion can result in the DEBUG diagnostic DYNLNGSET AMACRO. You can then use SET LANGUAGE COBOL if needed. o When using the debugger, you may notice that variable names that contain underscores and hyphens may have been changed, under certain circumstances. These problems have been corrected in the OpenVMS Alpha V7.1 debugger. Specifically, variable names that are "local" to your COBOL program (that is, names that are not visible to other separately compiled program modules) have any underscores changed to hyphens when reported to the debugger. Thus, the data item "A_B" can only be referenced as "A-B" in a debugging session. Names that are visible to other separately compiled program modules (for example, EXTERNAL items, PROGRAM-ID names, etc.), have any hyphens in their names changed to underscores when reported to the debugger. Thus, the PROGRAM-ID name "SUBR-CALL" can only be referenced as "SUBR_CALL" in a debugging session. 34 ___________________________ 4.2 Debugger Notes for Tru64 UNIX The following features are supported by the Ladebug debugger: o Specifying the following items using the COBOL language syntax: - Elementary and group identifiers, including subscripting and qualification - Numeric and nonnumeric literals - Arithmetic expressions o Printing (examining values) of all COBOL datatypes is supported, using the debugger's "print" command. o Assigning new values to all datatypes with the debugger's "assign" command. However, there are some known problems with assigning in the debugger; see below. o Assigning from numeric literals or from other program items. o Array access. o Simple arithmetic operations. However, full COBOL expression evaluation is not supported. For example, the following simple addition is supported: (ladebug) print itema + itemb Following are some restrictions in using Ladebug with HP COBOL programs: o Some Ladebug command usage is affected by COBOL language syntax such as hyphens in COBOL user names. This is true only when execution is stopped within a COBOL procedure, however. One effect is that expressions typed on the debugger command line must include spaces around arithmetic operators like "+" and "-". 35 o Another effect of COBOL language syntax shows up in the debugger "memory-examine" command. For example, to look at the next 10 program instructions, you would normally use this debugger command: (ladebug) ./10i which means "from the current program location" (signified by the dot), examine the next 10 program locations (10 being the count) in instruction mode (signified by the "i"). When debugging COBOL programs, you must issue this command as follows: (ladebug) ./10 i with a space between the count and the mode indicator. o In specifying qualification of variables, only the "OF" qualifier keyword is supported, not the "IN" keyword. o Assignment to program items in the debugger: - Assigning new values to character string items (PIC X or PIC A) is not supported. - The scales of the items involved must match. For example, given these declarations: 01 itema pic 9(9)v99. 01 itemb pic 9999v99. 01 bigitem pic 9(13)v9(5). The debugger will allow assignment of the values 1.23 or 1.20 or 8765.22 to itema, but will not allow assignment of the value 1.2 to itema. The following debugger commands are supported because the quantities on both sides of the assignment operator "=" have the same scale: (ladebug) assign itema = 1.23 (ladebug) assign itema = 1.20 (ladebug) assign itema = 8765.22 (ladebug) assign itema = itemb 36 and the following debugger commands are not supported because the quantities involved are of different scales: (ladebug) assign itema = 1.2 (ladebug) assign bigitem = itema - Items cannot be assigned values of greater precision. Using the above declarations, the following debugger command is not supported, because itema has greater precision than itemb: (ladebug) assign itemb = itema - When assigning to numeric edited items, the precisions of the quantities on both sides of the assignment must be the same. If the righthand value is a literal, leading zeros must be entered. - Variable-occurrence arrays (i.e. containing OCCURS DEPENDING ON) are displayed using the maximum occurrence value. - When assigning to an integer or a float item, the source item cannot be a decimal data item (DISPLAY or PACKED-DECIMAL). This restriction includes using decimal items as subscripts. - A numeric literal on the right side of an assignment to a decimal item must be between -2147483648 and +2147483647. If the receiving item has a scaling factor, this restriction still applies as if the scaling factor of the receiving item were applied to these boundary values. o Qualification involving more than one intervening level will produce a debugger error if the intervening level is an OCCURS item. For example, 01 grp1. 05 array-group occurs 6 times. 10 array- element pic s99. In the above group, "array-element" cannot be qualified (for example, "array-element of array- group (subscript)" will get an error). However, "array-group of grp1 (subscript)" can be specified. 37 Also array-element can be specified without qualification. o Using the above code example, there is a problem where the address of array-element(i) is computed incorrectly when more than one data item is present in the same structure (for example, "array-group"). The address of element(i) should be computed using the stride value, but it is instead computed using the element size. Therefore, the address of array- element(i) will only be correct when the stride and the size have the same value (that is, when there is only one subordinate item in array-group). This problem is fixed with ladebug 4.0-44 or higher. o Subscripting is only supported for tables of one dimension. o Reference Modification is not supported by the debugger. o Stopping program execution at a program label (paragraph or section name) is not supported by the debugger. o The debugger does not correctly evaluate COBOL condition expressions. o The debugger does not support scaled octaword variables. o The debugger does not support scaled quadword variables. o The debugger generally does not support numerics with more than 18 digits. o Debugging support inside COPY files is not supported. Instead, the source-line cursor will point to the line with the COPY statement during the execution of the statements inside the COPY file. (Note that multi-line COPY statements will use the last line of the COPY statement for this display.) 38 o The "whereis" command does not permit qualification or subscripting. o There may be problems accessing external data items. o Ladebug does not currently support Static Parameters. Therefore, LINKAGE SECTION items that are referenced in USE or REPORT WRITER procedures are conveyed to Ladebug as local static variables rather than as parameters. This only affects debugging commands that normally include a program's parameter lists (dump, where, etc.). All other debugging commands (print, assign, etc.) will work as expected. o Printing arrays of PACKED-DECIMAL (COMP-3) data items and PIC X may have problems. However, such items can be printed if they are subordinate to an OCCURS group item. In that case, the structure containing the OCCURS clause can be printed as a workaround. 39 __________________________________________________________________ 5 Documentation_Notes________ 5.1 Documentation Changes and Updates _______________________________________________________ Version_____Description________________________________ V2.8-1380 [OpenVMS I64] All references in the User Manual, Reference Manual, and DML Manual which specify OpenVMS Alpha have been updated to reflect OpenVMS I64. The key I64 differences from Alpha are o The /FLOAT default is /FLOAT=IEEE_FLOAT on OpenVMS I64 o /ARCHITECTURE and /OPT=TUNE options specific to OpenVMS Alpha are ignored on OpenVMS I64 V2.8-1380 [OpenVMS I64] All references in the Installation Guide which specify OpenVMS Alpha have been updated to reflect OpenVMS I64. The key I64 differences from Alpha are o No COBRTL PCSI kit is required on OpenVMS I64 V2.8-1286 The Reference Manual and User Manual have been updated with new and corrected material for V2.8. V2.8-1286 [OpenVMS Alpha/I64] If you run the CD Menu Utility to copy the release notes, the file is named COBOL.PCSI$RELEASE_NOTES. The HP COBOL Installation Guide for OpenVMS Alpha and OpenVMS I64 Systems does not mention this alternate file naming. 40 _______________________________________________________ Version_____Description________________________________ V2.8-1286 The Reference Manual, User Manual, and DML Manual are now available on the web in HTML and PDF formats. V2.8-1286 Figures 10-18 and 10-19 in the User Manual cannot be viewed on the ODL CD-ROM. These figures are correct in the printed User Manual. V2.8-1286 All references to VAX COBOL, DEC COBOL, DIGITAL COBOL, DIGITAL VAX COBOL, and Compaq COBOL in the manuals refer to the products now collectively known as HP COBOL. _______________________________________________________ 41 ___________________________ 5.2 Summary of the HP COBOL Documentation Set Depending on how you order the final product, you may receive printed copies of the following HP COBOL manuals. The order numbers for the manuals are listed in Read Before Installing HP COBOL V2.8. o HP COBOL Reference Manual Describes the source language environment for the HP COBOL programmer. Defines the format and use of statements in the HP COBOL language. This document highlights extensions to the 1985 ANSI COBOL Standard by color. o HP COBOL User Manual Describes the development and run-time environment for the HP COBOL programmer working on OpenVMS or Tru64 UNIX. Describes the commands to compile, link, run, and debug COBOL programs. It also explains HP COBOL I/O, the language interface with the calling standard, error handling and run-time messages, using structures and records, writing a condition handler, native data characteristics, using nonnative numeric formats, compatibility issues with HP COBOL for OpenVMS VAX, and using CDD/Repository, LSE, SCA, FUSE, and the debuggers. o HP COBOL Online Help file The online Help file presents information on the HP COBOL command qualifiers and options. [OpenVMS] Presents the COBOL general formats and describes the data items. Describes a subset of the compiler messages and the complete set of run-time messages. o HP COBOL Installation Guide for OpenVMS Alpha and OpenVMS I64 Systems 42 Explains how to install HP COBOL V2.8 and subsequent point releases on OpenVMS Alpha and OpenVMS I64, including registering a license PAK (product authorization key), disk space, and other prerequisites. This installation guide is provided in PostScript form (.PS file type) and in plain ASCII form (.TXT file type) on the Layered Products Media CD. o Compaq COBOL for Tru64 UNIX Systems Installation Guide Explains how to install HP COBOL V2.8 and subsequent point releases on Tru64 UNIX, including registering a license PAK (product authorization key), disk space, and other prerequisites. This installation guide is provided in PostScript form (.PS file type) and in plain ASCII form (.TXT file type) on the Layered Products Media CD. o HP COBOL DBMS Database Programming Describes how to use language elements specific to Oracle DBMS database programming on OpenVMS. This book is an adjunct to the HP COBOL basic doc set. We have collected the elements specific to Oracle DBMS database programming, and concentrated them in this optional book for the convenience of programmers who write COBOL programs that access Oracle DBMS databases. You can order these documents in printed form from HP as an entire kit or individually. 43 ___________________________ 5.3 Feedback on Our Documentation HP appreciates your comments. If you would like to comment about the HP COBOL documentation, or if you find errors in any part of it, please send the manual title, order number, and your comments to Hewlett-Packard Company OSSG Documentation Group, ZKO3-4/U08 110 Spit Brook Rd. Nashua, NH 03062-2698 44 __________________________________________________________________ 6 Troubleshooting Tips If your program is not working as expected, here are some things to do: o If you have HP COBOL for OpenVMS VAX, for the purpose of comparison try compiling with /STANDARD=OPENVMS_AXP to determine if any diagnostics are issued indicating you are using features on VAX that are not supported in HP COBOL for OpenVMS Alpha and OpenVMS I64. o Try /NOOPT (-O0). /OPT (-O) and /NOOPT (-O0) are intended to produce the same results (probably with different compile-time and run-time performance), but you may be able to bypass a problem by compiling /NOOPT (-O0). Please report any differences you find with any level of optimization. o Try /CHECK (-check). The various /CHECK (-check) options can help you find some coding errors at run-time. o Try /WARNINGS=ALL (-warn all). The various warnings might help identify possible areas of the program to be investigated as potential sources of a problem. HP COBOL includes an informational diagnostic to help identify arithmetic statements that may get different results from other COBOL compilers. The INTERMED diagnostic has the text: Possible truncation due to use of intermediate data item This indicates an expression for which HP COBOL introduces a floating point or COBOL Intermediate Temp intermediate data type. This diagnostic identifies places where binary or decimal floating- point arithmetic is being used instead of fixed- point arithmetic for intermediate computations. This can lead to unexpected final results and possibly results different from HP COBOL for OpenVMS VAX. A 45 statement that triggers this diagnostic should be examined. One option is to compile with [OpenVMS Alpha/I64] COBOL /MATH_INTERMEDIATE=CIT4 [OpenVMS I64] COBOL /MATH_INTERMEDIATE=CIT4 [Tru64 UNIX] cobol -math_intermediate cit4 See section 2.2 for additional details on CIT4. Another option is to rewrite the expression using two or more simpler statements. If you know the intended ranges of values for the input operands, you can specify the precision of intermediates, resulting in expression evaluation that can be accomplished using fixed-point arithmetic. o HP COBOL includes an informational diagnostic when it detects situations when high order numeric truncation is possible. See details on /TRUNCATE (-truncate) for one way to control some of the situations when this diagnostic is issued. o If the program is using a file created on a VAX and you compiled the program on Alpha or I64 using /ALIGNMENT or /ALIGNMENT=PADDING, try /NOALIGNMENT (the default for HP COBOL). o There are two diagnostic tools to help acquire information on how to proceed with correcting alignment mismatches between an HP COBOL program and another program when they are sharing a record structure such as a file record structure: - /NOALIGNMENT/WARNINGS=ALL - /MAP=DECLARED/LIST With /NOALIGNMENT/WARNINGS=ALL, you will receive warnings for all data whose allocation will change if /ALIGNMENT is used. This information can be used with the listing produced with /MAP=DECLARED/LIST to determine which records might need to be differently aligned to be compatible with other programs that will be sharing files based on these records. 46 There are two options for utilizing Alpha Natural Alignment and Padding for record formats: - /ALIGNMENT[=PADDING] - Alignment directives The alignment directives allow you to set different alignment options for different records within the program's source file. o If you are having trouble reading a SEQUENTIAL or RELATIVE file created on OpenVMS, try moving the file to Tru64 UNIX using FTP binary mode or ZIP. In addition, for RELATIVE files, you must specify no compression using the -0 option. If the file on OpenVMS is in VFC format (for example, a file created with EXTERNAL or Report Writer or LINAGE on OpenVMS), you will need to skip over the VFC bytes when you read the file on Tru64 UNIX. Another option with HP COBOL on OpenVMS Alpha and OpenVMS I64 is to suppress the use of VFC with /NOVFC. o For Indexed files on OpenVMS, a key defined in the file but not the program is not considered a mismatch, and /CHECK=DUPLICATE_KEYS only considers this a mismatch if the key is declared both in the file and the program, and differs with respect to whether duplicates are allowed. For HP COBOL on Tru64 UNIX without -relax_key_checking, a missing key is always considered a mismatch, and with - relax_key_checking, it is not considered a mismatch for the keys to differ with respect to duplicates. In other words, to get consistent behavior with respect to duplicate key checking for all four supported platforms, specify all the keys in both the file and the program. 47 o If the program is attempting to read multiple files from a tape, use OPEN WITH NOREWIND to get consistent results between HP COBOL for OpenVMS VAX and HP COBOL for Alpha and I64. o If the program is compiled /STANDARD=V3 (-std v3), make sure that the program does not depend on the HP COBOL for OpenVMS VAX /STANDARD=V3 features that are not supported by HP COBOL on Alpha and I64. These features can result in different behavior in the following situations: - When subscripts are evaluated in STRING, UNSTRING, and INSPECT (Format 3) statements and the REMAINDER phrase of the DIVIDE statement - When reference modification is evaluated in STRING, UNSTRING, and INSPECT (Format 3) statements - When the variable associated with the VARYING phrase is augmented in PERFORM... VARYING... AFTER statements (Format 4) - How PIC P digits are interpreted in some moves - When the size of variable-length tables is determined /WARNINGS=ALL can help you determine the effects of /STANDARD=V3. For full information on the HP COBOL for OpenVMS VAX implementation of /STANDARD=V3, see the appendix on qualifiers in the VAX COBOL User Manual. In addition, FILE STATUS 02 with /STANDARD=V3 is handled differently between HP COBOL for OpenVMS VAX and HP COBOL. With HP COBOL for OpenVMS VAX, if a record with a duplicate alternate key is written, FILE STATUS 02 is set and the DECLARATIVES procedure executes. With HP COBOL, FILE STATUS 02 is set, but the DECLARATIVES procedure does not execute. 48 o If the program is calling or called by another module (whether the other module is written in COBOL or another language), make sure the other module is compiled using compatible alignment and floating point types for any arguments passed in the calls. For example, if a C module is compiled with the C equivalent of /NOALIGNMENT (the HP COBOL default) that is, "#pragma nomember_alignment", then an HP COBOL module that calls or is called by that C module should be compiled /NOALIGNMENT. The HP C default is MEMBER_ALIGNMENT. For compatibility with HP C's "#pragma member_alignment", use /ALIGNMENT=PADDING or *DC SET PADALIGN. o COBOL, like the other GEM based languages, sets the granularity option as specified on the command line and passes that to GEM. GEM generates the code and issues the diagnostics. Byte and word granularity are not supported with DISPLAY or PACKED-DECIMAL numerics. For other data types, you must have a version of LIBOTS on Alpha or I64 which supports byte and word granularity. o If you encounter the NAMCLASS diagnostic on compile on Alpha or I64, check uses of COPY. You can often avoid NAMCLASS diagnostics on Alpha and I64 if you enclose COPY names in quotes. In other cases, you will need to rename to avoid the NAMCLASS diagnostic. o If you are using READ NEXT and READ PREVIOUS / READ PRIOR, make sure you use START when you shift between READ NEXT and READ PREVIOUS / READ PRIOR. The COBOL program results are undefined if you immediately follow a READ NEXT by a READ PREVIOUS / READ PRIOR or vice versa. 49 o If you are using CALL dataname, you must explicitly include in the link of the run unit all modules which might be referenced by CALL dataname. CALL dataname is resolved at run-time, so there is no link-time name resolution for potential values for the user item used in CALL dataname. o [OpenVMS Alpha/I64] If you encounter COBRTL installation problems, make sure you are not using * to select all three PCSI files for installations. The COBRTL PCSI files are setup so that just one COBRTL PCSI file should be installed depending on your OpenVMS Alpha version. o [OpenVMS Alpha/I64] If you encounter the UNALIGNFIX diagnostic on LINK on OpenVMS Alpha or I64, you can usually avoid this LINK diagnostic by compiling /ALIGN or otherwise ensuring that references from the COBOL program to entry points in shareable images are properly aligned. o [OpenVMS Alpha/I64] If you encounter problems compiling /ANALYSIS_DATA/SEPARATE_COMPILATION instead compile /ANALYSIS_DATA/NOSEPARATE_COMPILATION o If you encounter a problem possibly related to reserved words, use /RESERVED_WORDS=NOXOPEN This allows use of the X/Open reserved words as though they were not reserved words. o When you compile a program with debugging also specify /NOOPTIMIZE to expedite your debugging session. Note that DEBUG sets -g2 -O0 with HP COBOL on Tru64 UNIX. Optimization often changes the order of execution of statements in a program, and it may keep values in registers and deallocate user variables. These effects can be confusing when 50 you use the debugger. On OpenVMS Alpha and I64, a diagnostic message warns you if you compile an HP COBOL program /DEBUG without specifying anything about optimization on the command line. o If you are running out of virtual memory during compilation, try compiling /NOOPT and increasing virtual memory using the guidelines in the User Manual. Not all programs can be compiled with all optimization levels for a given virtual memory configuration. Some programs may not even compile /NOOPT. In those cases, you will need to reduce the program size per module by reducing the number of executable statements in each module and/or by reducing the size of data structures in each module. o With extended ACCEPT/DISPLAY, HP COBOL for OpenVMS VAX and HP COBOL for Alpha and I64 may use different escape sequences to update the screen. Also, the screen update behavior is not identical between the products. o If you attempt to use extended ACCEPT/DISPLAY with input redirected from a file and/or output redirected to a file, the operation between HP COBOL for OpenVMS VAX and HP COBOL on Alpha and I64 is not identical. In general, the HP COBOL RTL attempts to use ANSI ACCEPT/DISPLAY to handle all ACCEPT/DISPLAYs in this situation. For example, if you use DISPLAY AT LINE or ACCEPT DEFAULT, the HP COBOL RTL will ignore the extensions (that is, LINE or DEFAULT) if you redirect output to a file and/or input from a file. o There are various things to consider related to floating point (COMP-1, COMP-2) support. HP COBOL supports IEEE floating point on all Alpha and I64 platforms. HP COBOL for OpenVMS Alpha supports F, D, and G floating. HP COBOL for OpenVMS I64 supports F, D, and G floating via conversion to and from IEEE floating, so results with F, D, and G floating on I64 are subject to the limitations and precision 51 of these conversions to and from IEEE floating. HP COBOL for OpenVMS VAX supports VAX F and VAX D floating. VAX D is not equivalent to the D float available on Alpha. Floating point results should not be tested for exact equality or inequality; many decimal values containing fractional digits cannot be represented exactly in binary floating point. Instead of testing that the value exactly equals (or does not equal) the expected result, test that the value is within some small range of the expected result. COBOL's algorithm for converting a floating value to another datatype is not 100% compatible between VAX and Alpha/I64. o Invalid decimal data checking with /CHECK=DECIMAL in HP COBOL (Alpha and I64) is not 100% compatible with HP COBOL for OpenVMS VAX's use of the VAX instructions to do invalid decimal data checking. o [OpenVMS Alpha/I64] If you get the following diagnostic at run-time %LIB-F-INVCLADTY, invalid class data type combination in descriptor it may indicate you are using a LIB$ routine such as LIB$CVT_DX_DX which does not fully support unsigned COMP data types. With CALL USING BY DESCRIPTOR, HP COBOL for OpenVMS VAX uses a signed data type in the descriptor for unsigned COMP data types. HP COBOL for OpenVMS Alpha and I64 uses an unsigned data type in the descriptor for unsigned COMP data types. With routines such a LIB$CVT_DX_DX which do not fully support unsigned COMP data types, you should use signed COMP data types for any calls to these routines. o [OpenVMS Alpha/I64] If you compile /NOVFC, make sure to take into account the initial blank lines in the output files for any post-processing of these output files. 52 o [OpenVMS Alpha/I64] If the LINK of a COBOL program fails with any DCOB$ undefined symbols, it is possible that the RTL has not been properly installed. o [OpenVMS Alpha/I64] If you encounter problems using a comma list during compile, compile each module separately to reduce compilation resources and the chance for a compiler failure. o [OpenVMS Alpha/I64] If the program uses floating point data from a file created on an OpenVMS VAX system with HP COBOL for OpenVMS VAX, try /FLOAT=D_FLOAT. o [OpenVMS Alpha/I64] If a file is accessed that contains G-float data, use /FLOAT=G_FLOAT; if the file contains IEEE-float data, use /FLOAT=IEEE_FLOAT. o [OpenVMS Alpha/I64] If you are using C or C++ on OpenVMS Alpha or I64, make sure to review the defaults for /FLOAT and choose a /FLOAT option to match how you compile COBOL modules which interact with the floating data in the C/C++ modules. The default for C on OpenVMS Alpha is /FLOAT=G_FLOAT, while the default for HP COBOL on OpenVMS Alpha is /FLOAT=D_FLOAT. Other languages such as HP Pascal also have /FLOAT=G_FLOAT as the default on OpenVMS Alpha. On OpenVMS I64, the default is /FLOAT=IEEE_FLOAT. o [OpenVMS Alpha/I64] If you are using /NATIONALITY=JAPAN, and you get the following at run-time %COB-F-BUG_CHECK, internal consistency check failure make sure you have installed the V2.8 RTL. 53 o [OpenVMS Alpha/I64] If your application uses any of the following character attribute clauses with ACCEPT or DISPLAY statements: BOLD or HIGHLIGHT BLINKING or BLINK UNDERLINED or UNDERLINE REVERSED or REVERSE-VIDEO you may find that the screen scrolls unexpectedly when the terminal is in wrap mode and HP COBOL displays data in the lower right corner of the screen. This behavior occurs when the data being displayed fits on the bottom line, but the control sequences which turn off the character attributes (and which HP COBOL appends to the data), extend past the end of the line. The unexpected scrolling is caused by the OpenVMS Alpha/I64 terminal driver because it interprets the control sequences as normal data and performs wrapping when it reaches the end of the line. Screen scrolling may also occur if your application displays escape sequences when the cursor is in the lower right corner of the screen. Setting the terminal to nowrap mode will solve this problem, or you can adjust the cursor's position prior to displaying the escape sequence. One solution is to set the terminal to nowrap mode using $ SET TERMINAL/NOWRAP If this is not an acceptable solution, adjust the placement and/or size of the item being accepted or displayed. 54 [Tru64 UNIX] Do the following: csh> setenv COBOL_TRACEBACK_FLAG when you are trying to determine where your program is terminating. o [Tru64 UNIX] If your program gets the following failure during load: a.out /sbin/loader: Fatal Error: object libcurses.so from liblist in a.out has version "osf.1", which does not match the found object: /usr/shlib/libcurses.so with version "xpg4" the program was built -call_shared (the default) with DIGITAL COBOL V2.5 or earlier and the file /usr/shlib/osf.1/libcurses.so. is not installed on your system. If you rebuild your program with HP COBOL V2.8, you do not need this file. If you wish to run your programs with the HP COBOL RTL V2.8 without rebuilding the program, this file can be installed from the optional subset OSFOBSOLETE supplied with your Tru64 UNIX installation kit. o [Tru64 UNIX] If your program gets the following ld failure: ld: /sbin/loader: Error: unresolvable symbol in /usr/shlib/libcob.so: _cobol_main You must call cob_init from your main C program. See the HP COBOL User Manual p. 12-22, Interprogram Communication for additional details. 55 o [Tru64 UNIX] If your program is not linking correctly on Tru64 UNIX and (for example) you get the following error: ld: Can't locate file for : -lcurses cobol: Severe: Failed while trying to link This is usually an indication of an installation problem. HP COBOL requires that the OSFPGMR subset be installed. To see if the OSFPGMR subset is installed use the following command: /usr/sbin/setld -i | grep OSFPGMR o [Tru64 UNIX] If you get an unexpected "file not found" error at run-time, there are several things to check: - Make sure the file specification in the ASSIGN TO and VALUE OF ID clauses match exactly (no leading/trailing spaces, and so forth) the pathname you are trying to access. For Tru64 UNIX, also make sure the file specification upper/lower case matches. - Make sure VALUE OF ID names are set up as environment variables if you had previously used VALUE OF ID to specify an OpenVMS logical name. - Make sure any file names with ".DAT" are explicitly specified with ".DAT" in the ASSIGN TO and VALUE OF ID clauses (HP COBOL for OpenVMS VAX and HP COBOL on OpenVMS Systems supply ".DAT" if no file extension is specified). - Make sure you are not trying to open an INDEXED file as you would with ORGANIZATION SEQUENTIAL or ORGANIZATION RELATIVE. o [Tru64 UNIX] If you get an unexpected "indexed keys do not match" error at run-time, make sure that you have specified all the keys just as they were specified when the file was created. 56 Consider the use of -rkc (/RELAX_KEY_CHECKING) if you want to specify fewer DISPLAY (PIC X) keys than when the file was created or change the use of DUPLICATES for one of the keys. o [Tru64 UNIX] F, D, and G floating are not supported on Tru64 UNIX. 57 __________________________________________________________________ 7 HP COBOL Compatibility Matrix Legend x = Available today N = Not supported P = Partial support _______________________________________________________ OpenVMS OpenVMS OpenVMS Tru64 VAX Alpha I64 UNIX __________________________V5.7____V2.8____V2.8____V2.8_ ANSI-85/-89 HIGH x x x x ANSI-85 REPORT WRITER x x x x Standard arithmetic N P P P Table sort N x x x Run-time currency N x x x Tape handling x x P x Segmented keys x x x x /CHECK=DUPLICATE_KEYS x x x N RMS special registers x x x N RMS APPLY extensions x x x N /STANDARD=V3 x P P P ANSI-74 FILE STATUS x x x x support Print control files with x x x N VFC Print control files N x x x without VFC ISAM READ PRIOR/START N x x x LESS Extended ACCEPT/DISPLAY x x x x ACCEPT/DISPLAY WITH x x x x CONVERSION 58 _______________________________________________________ OpenVMS OpenVMS OpenVMS Tru64 VAX Alpha I64 UNIX __________________________V5.7____V2.8____V2.8____V2.8_ ACCEPT support for 4- x x x x digit years Y2K intrinsic functions x x x x File sharing / record x x x x locking UCX/NFS support N N N x (nolocking) FUNCTION ARGCOUNT x x x N Little-endian COMP data x x x x 31-digit user items N x x x 18-digit intermediates x x x x 32-digit intermediates N x x x F,D floating x x x N G floating N x x N IEEE S,T floating N x x x Floating exception x x P x handling Floating point "E" x x x x literal Extended alphanumerics N x x x 64-bit pointers N P P x SYS$CURRENCY x x x N Invalid decimal data P P P P checking Exception handling x x P x ON SIZE ERROR x x P x X/Open RETURN-CODE N x x x X/Open COMP-5/COMP-X N x x x 59 _______________________________________________________ OpenVMS OpenVMS OpenVMS Tru64 VAX Alpha I64 UNIX __________________________V5.7____V2.8____V2.8____V2.8_ X/Open LINE SEQUENTIAL N x x x X/Open ASSIGN TO N x x x X/Open SCREEN SECTION N x x x X/Open DISPLAY ON N x x x EXCEPTION X/Open file sharing / N x x x locking X/Open environment N x x x variables X/Open command line N x x x /CHECK=(PERFORM,BOUNDS) x x x x VAX-compatible alignment x x x x Alpha natural alignment N x x x / padding Targetted code x x x x generation / optimization /[NO]SEPARATE_ P x x N COMPILATION I18N (PIC N, etc.) x x x x CALL USING BY DESCRIPTOR x x x N cobfunc, cobcall, and N x x x cobcancel Reformat x x x x Terminal source format x x x x Lowercase, -/_ in source x x x x Oracle CDD/DML support x x x N Transarc Encina (-tps) N N N x support 60 _______________________________________________________ OpenVMS OpenVMS OpenVMS Tru64 VAX Alpha I64 UNIX __________________________V5.7____V2.8____V2.8____V2.8_ DECset PCA/LSE/SCA x x x N support DECset PDF support x N N N FUSE support N N N x Symbolic debugger x x x x support Common command line for x x x N OpenVMS Docs - UM/RM HTML and x x x x PDF____________________________________________________ 61 __________________________________________________________________ 8 Providing Product Feedback If you have comments, suggestions, or questions about HP COBOL on I64, Alpha, or VAX, or if you are interested in signing up to field test a future version of HP COBOL, use the following URL for general information about HP COBOL: http://h71000.www7.hp.com/commercial/cobol/ We are interested in your feedback both on the capabilities of HP COBOL V2.8 and on future capabilities you would like to see in HP COBOL. When reporting a problem to Hewlett-Packard Company, please supply as much of the following information as you can: o Description of the problem o Version of the product o Version of the operating system and other related software o Sample source file which can be used to duplicate the problem o Run-time call stack from the debugger if you are reporting an abnormal run-time termination o Command line used to produce the problem You can report problems via Internet mail, but use your regular HP support channel if you are reporting a problem and you need a response back when the problem is resolved. 62