Compaq COBOL V2.8 - Release Notes December 03, 2002 ________________________ Note ________________________ The text version of this document was created to be displayed or printed with a fixed-spaced font. Make sure to switch to a fixed-spaced font such as Courier 10 for proper display or printing of the tables within the text version of this document. ______________________________________________________ File location: OpenVMS Alpha: SYS$HELP:COBOL028_RELEASE_NOTES.PS OpenVMS Alpha: SYS$HELP:COBOL028.RELEASE_NOTES Tru64 UNIX: /usr/lib/cmplrs/cobol/relnotes i ________________________________________________________________ © 2002 Compaq Information Technologies Group, L.P. COMPAQ, the Compaq logo, AlphaServer, OpenVMS, POLYCENTER, Tru64, VAX, and VMS are trademarks of Compaq Information Technologies Group, L.P. in the U.S. and/or other countries. UNIX and X/Open are trademarks of The Open Group in the U.S. and/or other countries. All other product names mentioned herein may be trademarks of their respective companies. Confidential computer software. Valid license from Compaq 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 vendor's standard commercial license. None of Compaq, Hewlett-Packard Company ("HP") or any other direct or indirect subsidiary of HP 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 Compaq or HP products are set forth in the express limited warranty statements accompanying such products. Nothing herein should be construed as constituting an additional warranty. -3 _________________________________________________________________ Contents 1 Release Summary.................................. 1 1.1 Version Numbers ............................... 3 1.2 Problems Corrected Since Compaq COBOL V2.7 .... 4 1.3 Restrictions and Known Problems ............... 8 2 Recent Enhancements.............................. 21 2.1 Run-time currency sign handling ............... 21 2.2 Extended alphanumerics ........................ 21 2.3 Run-time traceback on Tru64 UNIX .............. 22 2.4 Reference/User Manuals merged for VAX and Alpha.......................................... 27 3 Run-Time Library Notes........................... 28 4 Debugger Notes................................... 28 4.1 Debugger Notes for OpenVMS Alpha .............. 28 4.1.1 Restrictions................................ 28 4.2 Debugger Notes for Tru64 UNIX ................. 30 4.2.1 Features.................................... 30 4.2.2 Restrictions................................ 30 5 Documentation Notes.............................. 35 5.1 Documentation Changes and Updates ............. 35 5.2 Summary of the Compaq COBOL Documentation Set............................................ 36 5.3 Feedback on Our Documentation ................. 37 6 Troubleshooting Tips ............................ 38 7 Compaq COBOL Compatibility Matrix................ 49 8 Providing Product Feedback....................... 52 v 1 Release Summary These release notes contain important information about Compaq 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 a Compaq COBOL compatibility matrix. This release includes an updated compiler, an updated RTL, and updated documentation in PDF format. Both the compiler and RTL are required in order to support the functionality and bug fixes listed within these release notes. You should use the updated Reference Manual and User Manual supplied with this release. These release notes should be made available to all users of Compaq COBOL. The release notes include many details to help facilitate migrations from and coexistence between Compaq COBOL on the three supported platforms. Additional details concerning differences between Compaq COBOL on the three supported platforms appear in the documentation. When a release note is specific to a particular platform, the following tags are used: o [OpenVMS Alpha] o [Tru64 UNIX] Compaq COBOL V2.8 requires one of the following: o OpenVMS Alpha V6.2 or higher o Tru64 UNIX V5.0 or higher Compaq COBOL V2.8 includes the following new functionality, new documentation, and bug fixes beyond Compaq COBOL V2.7: o Reference/User Manuals in HTML and PDF formats on the external web merged to cover Compaq COBOL on VAX and on Alpha o Run-time currency sign handling compatible with the draft standard (ANSI-2002) o Enhanced support for extended alphanumerics (larger than 65,535 bytes) 1 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 o [OpenVMS Alpha] 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.2) See the compatibility matrix at the end of the release notes for a summary of the functionality available across the three platforms supported by Compaq COBOL. 2 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: Compaq COBOL V2.8-1286 then the compiler is Version V2.8, edit number 1286. The compiler version number is also displayed as follows: [OpenVMS Alpha] ANALYZE/IMAGE SYS$SYSTEM:COBOL.EXE [Tru64 UNIX] cobol -v The version number for the V2.8 run-time library is V2.8- 670 for the following: [OpenVMS Alpha] DEC$COBRTL.EXE [Tru64 UNIX] libcob.so [Tru64 UNIX] libcob.a To verify the version of the run-time library: [OpenVMS Alpha] ANALYZE/IMAGE SYS$LIBRARY:DEC$COBRTL.EXE [Tru64 UNIX] what /usr/shlib/libcob.so [Tru64 UNIX] what /usr/lib/libcob.a In addition, the version number for the V2.8 decimal support run-time library is V2.8-49 for the following: [OpenVMS Alpha] LIBOTS2.EXE [Tru64 UNIX] libots2.so [Tru64 UNIX] libots2.a To verify the version of the V2.8 decimal support run-time library: [OpenVMS Alpha] ANALYZE/IMAGE SYS$LIBRARY:LIBOTS2.EXE [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 Compaq COBOL V2.8. 3 1.2 Problems Corrected Since Compaq COBOL V2.7 The list below is broken into two parts. The first part includes release notes for problems corrected since since the V2.7-1262 compiler and V2.7- 641/V2.7-48 RTL for OpenVMS Alpha. The second 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 both Alpha platforms are tagged with o [OpenVMS Alpha] o [Tru64 UNIX] ___________________________________________________________ Version______Description___________________________________ 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. V2.8-1286 [OpenVMS Alpha] The RTL now detects device full on CLOSE. 4 ___________________________________________________________ Version______Description___________________________________ V2.8-1286 [OpenVMS Alpha] The Installation Verification Procedure now runs correctly if the distribution media is a CD-ROM and the default is set to the CD-ROM device prior to running the IVP. 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. 5 ___________________________________________________________ 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. 6 ___________________________________________________________ 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. ___________________________________________________________ 7 1.3 Restrictions and Known Problems ___________________________________________________________ Version______Description___________________________________ 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. The libpthreads team is working to provide a fix for this problem in an ECO kit to V5.1B. V2.8-1286 Compaq COBOL V2.8 requires one of the following: o OpenVMS Alpha V6.2 or higher o Tru64 UNIX V5.0 or higher You should upgrade your operating system to a Y2K-compliant version. Even though Compaq COBOL V2.8 will install on some operating system versions that are not Y2K-compliant, Compaq 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 Compaq COBOL RTL. V2.8-1286 [OpenVMS Alpha] The compiler with /ANALYSIS_ DATA writes a PROGRAM-ID to the .ANA file with hyphen (-) if the PROGRAM-ID contains underscore (_). This restriction applies to all versions of the compiler on OpenVMS Alpha. 8 ___________________________________________________________ Version______Description___________________________________ V2.8-1286 [OpenVMS Alpha] The RTL can acquire multiple record locks with automatic record locking in certain cases with START and WRITE. If you encounter this situation, you can clear the record locks using either UNLOCK ALL RECORDS or CLOSE followed by OPEN. This restriction applies to all versions of the RTL on OpenVMS Alpha. 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, Compaq COBOL on Alpha detects the out of range at run-time, if /CHECK=BOUNDS (-check bounds) is used. Compaq COBOL on VAX in some cases detects the out of range at compile-time. Compaq COBOL on Alpha issues compile-time diagnostics for constant expressions in many cases. V2.8-1286 External names with the following prefixes are reserved for use by Compaq COBOL: COB$, DCOB$, cob_. V2.8-1286 Because of the differences in the way expressions are evaluated in a COMPUTE between Compaq COBOL for OpenVMS VAX and Compaq COBOL on Alpha, the number of divide by 0 and undefined exponentiation diagnostics may vary between Compaq COBOL for OpenVMS VAX and Compaq COBOL on Alpha. 9 ___________________________________________________________ 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 blanks 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 Compaq COBOL. V2.8-1286 SORT/MERGE does not support octaword binary keys on any platform except in the case on OpenVMS Alpha where the file SYS$LIBRARY:SORTSHR.EXE is used. SORTSHR.EXE is the default on OpenVMS Alpha. 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 Compaq COBOL-85 for NSK (Tandem COBOL) differ from Compaq COBOL on 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 Compaq COBOL on Alpha and VAX handles this situation. 10 ___________________________________________________________ Version______Description___________________________________ V2.8-1286 There are several known restrictions with SORT32 and Hypersort on OpenVMS Alpha. The Hypersort restrictions are also present on Tru64 UNIX. The restrictions are documented in the OpenVMS Alpha V7.3 and V7.3-1 Release Notes. Some of the restrictions have been removed with the latest versions of SORT32 (V07-005) and Hypersort (V04-003) which are now shipping with OpenVMS Alpha V7.3-1. The latest version of Hypersort (V4.0-003) is scheduled to ship with the next version of Tru64 UNIX. If you use SORT or MERGE with COBOL, these restrictions may impact your programs. V2.8-1286 [OpenVMS Alpha] In some cases, when you upgrade to a new version of OpenVMS Alpha, that installation will install a new version of the COBOL RTL. After the OpenVMS Alpha upgrade is complete, the safest thing to do is to reinstall both COBRTL and COBOL. The COBRTL installation will determine if the RTL components need to be reinstalled and will issue diagnostics appropriately based on the action that is taken. 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. 11 ___________________________________________________________ Version______Description___________________________________ V2.8-1286 [OpenVMS Alpha] In the Debugger, use SET BREAK %LABEL with numeric paragraph labels. On VAX, you instead use SET BREAK %NAME. 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 Compaq COBOL and you attempt to LINK with /THREADS_ENABLE, then you must have the ALPSYS11_071 ECO installed. Note that Compaq COBOL programs are NOT thread- reentrant. V2.8-1286 [OpenVMS Alpha] If you are using OpenVMS Alpha V7.1 with ANY version of Compaq COBOL, make sure to apply RMS ECO ALPRMS01_071 if you use either of the following clauses: o APPLY EXTENSION o APPLY PREALLOCATION 12 ___________________________________________________________ Version______Description___________________________________ V2.8-1286 [OpenVMS Alpha] The minimum Oracle CDD/Repository version required for Compaq 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 Compaq COBOL is Oracle DBMS V6.1-2. Use of the Compaq COBOL DBMS support requires the separate COBOL-DBMS license/PAK; see the Compaq COBOL SPD for more information. Contact Oracle for the details on the current supported version of Oracle DBMS. V2.8-1286 [OpenVMS Alpha] 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] 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. V2.8-1286 [OpenVMS Alpha] 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] 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. 13 ___________________________________________________________ Version______Description___________________________________ 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. V2.8-1286 [OpenVMS Alpha] 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 Compaq COBOL for OpenVMS VAX compiler as well as the Compaq COBOL compiler. 14 ___________________________________________________________ Version______Description___________________________________ 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. 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. 15 ___________________________________________________________ Version______Description___________________________________ 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 Compaq COBOL V2.8, you do not need to install OSFOBSOLETE. V2.8-1286 [Tru64 UNIX] The following cannot be used in a stripped image: o CANCEL o CALL dataname o cobfunc, cobcall, and cobcancel o Compaq COBOL for OpenVMS VAX compatible extended ACCEPT/DISPLAY o X/Open SCREEN SECTION 16 ___________________________________________________________ Version______Description___________________________________ 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. 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. 17 ___________________________________________________________ Version______Description___________________________________ 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. 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. 18 ___________________________________________________________ Version______Description___________________________________ 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. 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". 19 ___________________________________________________________ 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 Compaq COBOL on OpenVMS Alpha and Tru64 UNIX. For further details on these known problems and restrictions, or for other restrictions in using the product, see o Compaq COBOL Reference Manual o Compaq COBOL User Manual 20 2 Recent Enhancements This section includes additional details on selected product enhancements since Compaq 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 draft standard. To use this new support, you must compile [OpenVMS Alpha] COBOL /RESERVED_WORDS=200X [Tru64 UNIX] cobol -rsv 200x The SPECIAL-NAMES Paragraph has the following new syntax: [ CURRENCY SIGN IS char ] [ CURRENCY SIGN { |char | } IS { | | } { |literal-7 [WITH PICTURE_SYMBOL literal-8] | } { } ] . . . (Alpha) literal-7 (Alpha) is an alphanumeric literal. It cannot be a figurative constant. literal-8 (Alpha) 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. 21 2.3 Run-time traceback on Tru64 UNIX [Tru64 UNIX] In most cases, if there is 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. This is an example using the C-shell which shows the output of a routine with a fatal error. Note that RTL routine names are displayed only if you compile -non_shared. If you compile -call_shared (the default), all RTL routine names are displayed as __FINI_00_remove_gp_range. 22 csh> cat xcal12.cob IDENTIFICATION DIVISION. PROGRAM-ID. XCAL12. ENVIRONMENT DIVISION. PROCEDURE DIVISION. P0. DISPLAY "***XCAL12***". CALL "T2". CALL "T10". CALL "T3". DISPLAY "***END***". STOP RUN. IDENTIFICATION DIVISION. PROGRAM-ID. T10. ENVIRONMENT DIVISION. PROCEDURE DIVISION. P0. DISPLAY "in T10 - CP". EXIT PROGRAM. END PROGRAM T10. END PROGRAM XCAL12. IDENTIFICATION DIVISION. PROGRAM-ID. T9. ENVIRONMENT DIVISION. PROCEDURE DIVISION. P0. DISPLAY "in T9 - SCP". EXIT PROGRAM. END PROGRAM T9. IDENTIFICATION DIVISION. PROGRAM-ID. T2. ENVIRONMENT DIVISION. PROCEDURE DIVISION. P2. DISPLAY "in T2". CALL "T3". CALL "T9". CALL "T5". EXIT PROGRAM. IDENTIFICATION DIVISION. PROGRAM-ID. T3. ENVIRONMENT DIVISION. PROCEDURE DIVISION. 23 P3. DISPLAY "in T3 - CP". CALL "T4". CALL "T9". CALL "T5". EXIT PROGRAM. IDENTIFICATION DIVISION. PROGRAM-ID. T9. ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. 01 MINUS-ONE PIC S9 VALUE -1. PROCEDURE DIVISION. P0. DISPLAY "in T9 - CP in T3". DISPLAY FUNCTION SQRT (MINUS-ONE) WITH CONVERSION. EXIT PROGRAM. END PROGRAM T9. IDENTIFICATION DIVISION. PROGRAM-ID. T5. ENVIRONMENT DIVISION. PROCEDURE DIVISION. P0. DISPLAY "in T5 - CP". CALL "T9". EXIT PROGRAM. END PROGRAM T5. END PROGRAM T3. END PROGRAM T2. IDENTIFICATION DIVISION. PROGRAM-ID. T4. ENVIRONMENT DIVISION. PROCEDURE DIVISION. P0. DISPLAY "in T4". CALL "T9". EXIT PROGRAM. IDENTIFICATION DIVISION. PROGRAM-ID. T9. ENVIRONMENT DIVISION. PROCEDURE DIVISION. P0. DISPLAY "in T9 - CP in T4". 24 EXIT PROGRAM. END PROGRAM T9. END PROGRAM T4. IDENTIFICATION DIVISION. PROGRAM-ID. T3. ENVIRONMENT DIVISION. PROCEDURE DIVISION. P0. DISPLAY "in T3 - SCP". EXIT PROGRAM. END PROGRAM T3. IDENTIFICATION DIVISION. PROGRAM-ID. T5. ENVIRONMENT DIVISION. PROCEDURE DIVISION. P0. DISPLAY "in T5 - SCP". CALL "T8". CALL "T7". EXIT PROGRAM. IDENTIFICATION DIVISION. PROGRAM-ID. T7. ENVIRONMENT DIVISION. PROCEDURE DIVISION. P0. DISPLAY "in T7 - CP". CALL "T8". EXIT PROGRAM. END PROGRAM T7. IDENTIFICATION DIVISION. PROGRAM-ID. T8. ENVIRONMENT DIVISION. PROCEDURE DIVISION. P0. DISPLAY "in T8 - CP". CALL "T7". EXIT PROGRAM. END PROGRAM T8. END PROGRAM T5. IDENTIFICATION DIVISION. PROGRAM-ID. T7. ENVIRONMENT DIVISION. PROCEDURE DIVISION. 25 P0. DISPLAY "in T7 - SCP". EXIT PROGRAM. END PROGRAM T7. IDENTIFICATION DIVISION. PROGRAM-ID. T8. ENVIRONMENT DIVISION. PROCEDURE DIVISION. P0. DISPLAY "in T8 - SCP". EXIT PROGRAM. END PROGRAM T8. * T6 (SCP) is not referenced in this .COB. IDENTIFICATION DIVISION. PROGRAM-ID. T6. ENVIRONMENT DIVISION. PROCEDURE DIVISION. P0. DISPLAY "in T6 - SCP". EXIT PROGRAM. END PROGRAM T6. csh> setenv COBOL_TRACEBACK_FLAG csh> cobol -ansi xcal12.cob -non_shared csh> a.out ***XCAL12*** in T2 in T3 - CP in T4 in T9 - CP in T4 in T9 - CP in T3 cobrtl: severe: invalid argument to COBOL math function traceback initiated 0: cob__issue_diagnostic [0x12002fbcc] 1: cob_error [0x12003060c] 2: T9 [dcb2676c.cob: 58, 0x12002c8a0] 3: T3 [dcb2676c.cob: 46, 0x12002cbd4] 4: t2 [dcb2676c.cob: 35, 0x12002c704] 5: xcal12 [dcb2676c.cob: 7, 0x12002c420] 6: main [0x12002d3f0] 7: __start [0x12002c308] csh> cobol -ansi xcal12.cob -call_shared csh> a.out 26 ***XCAL12*** in T2 in T3 - CP in T4 in T9 - CP in T4 in T9 - CP in T3 cobrtl: severe: invalid argument to COBOL math function traceback initiated 0: __FINI_00_remove_gp_range [0x3ff81b2136c] 1: __FINI_00_remove_gp_range [0x3ff81b21dac] 2: T9 [dcb2676c.cob: 58, 0x120006280] 3: T3 [dcb2676c.cob: 46, 0x1200065b4] 4: t2 [dcb2676c.cob: 35, 0x1200060e4] 5: xcal12 [dcb2676c.cob: 7, 0x120005e00] 6: __FINI_00_remove_gp_range [0x3ff81b397c0] 7: __start [0x120005ce8] 2.4 Reference/User Manuals merged for VAX and Alpha The Compaq COBOL Reference Manual and User Manual are now available on the web in HTML and PDF formats and have been merged to cover VAX and Alpha: http://www.openvms.compaq.com/doc/#cobol 27 3 Run-Time Library Notes The V2.8 Compaq COBOL Run-Time Library included with Compaq COBOL V2.8 provides new functionality and several bug fixes beyond Compaq COBOL V2.7. You must use this updated RTL if you use the V2.8 Compaq COBOL compiler. 4 Debugger Notes 4.1 Debugger Notes for OpenVMS Alpha Please read the following release notes for information about COBOL language support in OpenVMS Alpha DEBUG. Also see the debugger release notes included with the OpenVMS Alpha documentation for information on corrections for some of the problems listed below. Also see the appendix on tools in the Compaq COBOL User Manual. 4.1.1 Restrictions Following are some restrictions with this debugger: 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. 28 o Starting with OpenVMS Alpha V7.3-1 which is scheduled to ship later this year, 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. 29 4.2 Debugger Notes for Tru64 UNIX 4.2.1 Features 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 4.2.2 Restrictions Following are some restrictions in using Ladebug with Compaq 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 "-". 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: 30 (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 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 31 - 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. 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. 32 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.) 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. 33 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. 34 5 Documentation Notes 5.1 Documentation Changes and Updates ___________________________________________________________ Version______Description___________________________________ V2.8-1286 The Reference Manual and User Manual have been updated with new and corrected material for V2.8. V2.8-1286 The Reference Manual and User Manual are now available on the web in HTML and PDF formats covering Alpha and VAX. 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, and DIGITAL VAX COBOL in the manuals refer to the products now collectively known as Compaq COBOL. ___________________________________________________________ 35 5.2 Summary of the Compaq COBOL Documentation Set Depending on how you order the final product, you may receive printed copies of the following Compaq COBOL manuals. The order numbers for the manuals are listed in Read Before Installing Compaq COBOL V2.8. o Compaq COBOL Reference Manual Describes the source language environment for the Compaq COBOL programmer. Defines the format and use of statements in the Compaq COBOL language. This document highlights extensions to the 1985 ANSI COBOL Standard by color. o Compaq COBOL User Manual Describes the development and run-time environment for the Compaq COBOL programmer working on OpenVMS Alpha or Tru64 UNIX. Describes the commands to compile, link, run, and debug COBOL programs. It also explains Compaq 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 Compaq COBOL for OpenVMS VAX, and using CDD/Repository, LSE, SCA, FUSE, and the debuggers. o Compaq COBOL Online Help file The online Help file presents information on the Compaq COBOL command qualifiers and options. [OpenVMS Alpha] 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 Compaq COBOL for OpenVMS Alpha Systems Installation Guide Explains how to install Compaq COBOL V2.7 and subsequent point releases on OpenVMS Alpha, including registering a license PAK (product authorization key), disk space, and other prerequisites. 36 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 Compaq COBOL V2.7 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 Compaq COBOL DBMS Database Programming Describes how to use language elements specific to Oracle DBMS database programming on OpenVMS Alpha. This book is an adjunct to the Compaq 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 Compaq as an entire kit or individually. 5.3 Feedback on Our Documentation Compaq appreciates your comments. If you would like to comment about the Compaq COBOL documentation, or if you find errors in any part of it, please send the manual title, order number, and your comments to Compaq Computer Corporation OSSG Documentation Group, ZKO3-4/U08 110 Spit Brook Rd. Nashua, NH 03062-2698 37 6 Troubleshooting Tips If your program is not working as expected, here are some things to do: o If you have Compaq COBOL for OpenVMS VAX on a VAX system, 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 Compaq COBOL for OpenVMS Alpha. 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. Compaq 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 Compaq 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 Compaq COBOL for OpenVMS VAX. A statement that triggers this diagnostic should be examined. One option is to compile with [OpenVMS Alpha] COBOL /MATH_INTERMEDIATE=CIT4 [Tru64 UNIX] cobol -math_intermediate cit4 See section 2.2 for additional details on CIT4. 38 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 Compaq 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 using /ALIGNMENT or /ALIGNMENT=PADDING, try /NOALIGNMENT (the default for Compaq COBOL). o There are two diagnostic tools to help acquire information on how to proceed with correcting alignment mismatches between a Compaq 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. 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. 39 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 Compaq COBOL on OpenVMS Alpha 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 Compaq 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 three supported platforms, specify all the keys in both the file and the program. o If the program is attempting to read multiple files from a tape, use OPEN WITH NOREWIND to get consistent results between Compaq COBOL for OpenVMS VAX and Compaq COBOL. o If the program is compiled /STANDARD=V3 (-std v3), make sure that the program does not depend on the Compaq COBOL for OpenVMS VAX /STANDARD=V3 features that are not supported by Compaq COBOL on Alpha. 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 40 - 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 Compaq 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 Compaq COBOL for OpenVMS VAX and Compaq COBOL. With Compaq 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 Compaq COBOL, FILE STATUS 02 is set, but the DECLARATIVES procedure does not execute. 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 Compaq COBOL default) that is, "#pragma nomember_alignment", then a Compaq COBOL module that calls or is called by that C module should be compiled /NOALIGNMENT. The Compaq C default is MEMBER_ALIGNMENT. For compatibility with Compaq 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 and an Alpha processor which support byte and word granularity. 41 o If you encounter the NAMCLASS diagnostic on compile on Alpha, check uses of COPY. You can often avoid NAMCLASS diagnostics on Alpha 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. 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 a run-time, so there is no link-time name resolution for potential values for the user item used in CALL dataname. o [OpenVMS Alpha] 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] If you encounter the UNALIGNFIX diagnostic on LINK on OpenVMS Alpha, 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] If you encounter problems compiling /ANALYSIS_DATA/SEPARATE_COMPILATION instead compile /ANALYSIS_DATA/NOSEPARATE_COMPILIATION 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. 42 o When you compile a program with debugging also specify /NOOPTIMIZE to expedite your debugging session. Note that DEBUG sets -g2 -O0 with Compaq 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 you use the debugger. On OpenVMS Alpha, a diagnostic message warns you if you compile a Compaq 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, Compaq COBOL for OpenVMS VAX and Compaq COBOL 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 Compaq COBOL for OpenVMS VAX and Compaq COBOL is not identical. In general, the Compaq 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 Compaq 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. Compaq COBOL supports IEEE floating point on all Alpha platforms. In addition, on OpenVMS Alpha, Compaq COBOL supports F, D, and G floating. Compaq COBOL for OpenVMS VAX supports VAX F and VAX D floating. VAX D is not equivalent to the D float available on Alpha. 43 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. o Invalid decimal data checking with /CHECK=DECIMAL in Compaq COBOL is not 100% compatible with Compaq COBOL for OpenVMS VAX's use of the VAX instructions to do invalid decimal data checking. o [OpenVMS Alpha] 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, Compaq COBOL for OpenVMS VAX uses a signed data type in the descriptor for unsigned COMP data types. Compaq COBOL for OpenVMS Alpha 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] 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. o [OpenVMS Alpha] 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] 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] If the program uses floating point data from a file created on an OpenVMS VAX system with Compaq COBOL for OpenVMS VAX, try /FLOAT=D_FLOAT. 44 o [OpenVMS Alpha] 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] If you are using Compaq C on OpenVMS Alpha, use $ CC/STANDARD=VAXC/FLOAT=D_FLOAT or $ COBOL/FLOAT=G_FLOAT The default for Compaq C on OpenVMS Alpha is /FLOAT=G_ FLOAT, while the default for Compaq COBOL is /FLOAT=D_ FLOAT. Other languages such as Compaq Pascal also have /FLOAT=G_FLOAT as the default. o [OpenVMS Alpha] 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. o [OpenVMS Alpha] On OpenVMS Alpha systems, 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 Compaq 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 Compaq COBOL appends to the data), extend past the end of the line. The unexpected scrolling is caused by the OpenVMS Alpha terminal driver because it interprets the control sequences as normal data and performs wrapping when it reaches the end of the line. 45 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. [Tru64 UNIX] Do the following: csh> setenv COBOL_TRACEBACK_FLAG when you are trying to determine where your program is terminating. [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 Compaq COBOL V2.8, you do not need this file. If you wish to run your programs with the Compaq 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 Compaq COBOL User Manual p. 12-22, Interprogram Communication for additional details. 46 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. Compaq 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 blanks, 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 (Compaq COBOL for OpenVMS VAX and Compaq 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. 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. 47 o [Tru64 UNIX] F, D, and G floating are not supported on Tru64 UNIX. 48 7 Compaq COBOL Compatibility Matrix Legend x = Available today N = Not supported P = Partial support ___________________________________________________________ Formerly Formerly VAX DEC COBOL COBOL _________________ OpenVMS OpenVMS Tru64 VAX Alpha UNIX __________________________________V5.7____V2.8____V2.8_____ ANSI-85/-89 HIGH x x x ANSI-85 REPORT WRITER x x x Standard arithmetic N P P Table sort N x x Run-time currency N x x Tape handling x x x Segmented keys x x x /CHECK=DUPLICATE_KEYS x x N Relaxed key checking N N x RMS special registers x x N RMS APPLY extensions x x N /STANDARD=V3 x P P ANSI-74 FILE STATUS support x x x Print control files with VFC x x N Print control files without VFC N x x ISAM READ PRIOR/START LESS N x x Extended ACCEPT/DISPLAY x x x ACCEPT/DISPLAY WITH CONVERSION x x x ACCEPT/DISPLAY VT52 support x N N ACCEPT/DISPLAY VT{1,2,3,4}xx x x x ACCEPT support for 4-digit years x x x Y2K intrinsic functions x x x 49 ___________________________________________________________ Formerly Formerly VAX DEC COBOL COBOL _________________ OpenVMS OpenVMS Tru64 VAX Alpha UNIX __________________________________V5.7____V2.8____V2.8_____ File sharing / record locking x x P UCX/NFS support (nolocking) N N x FUNCTION ARGCOUNT x x N Little-endian COMP data x x x 31-digit user items N x x 18-digit intermediates x x x 32-digit intermediates N x x F,D floating x x N G floating N x N IEEE S,T floating N x x Floating point "E" literal x x x Extended alphanumerics N x x 64-bit pointers N P x SYS$CURRENCY x x N Invalid decimal data checking P P P X/Open RETURN-CODE N x x X/Open COMP-5/COMP-X N x x X/Open LINE SEQUENTIAL N x x X/Open ASSIGN TO N x x X/Open SCREEN SECTION N x x X/Open SCREEN SECTION color N x x X/Open SCREEN SECTION BLINK N x x X/Open DISPLAY ON EXCEPTION N x x X/Open file sharing / locking N x x X/Open environment variables N x x X/Open command line N x x /CHECK=(PERFORM,BOUNDS) x x x VAX-compatible alignment x x x 50 ___________________________________________________________ Formerly Formerly VAX DEC COBOL COBOL _________________ OpenVMS OpenVMS Tru64 VAX Alpha UNIX __________________________________V5.7____V2.8____V2.8_____ Alpha natural alignment / N x x padding Targetted code generation / x x x optimization /[NO]SEPARATE_COMPILATION P x N I18N (PIC N, etc.) x x x CALL USING BY DESCRIPTOR x x N cobfunc, cobcall, and cobcancel N x x Reformat x x x Terminal source format x x x Lowercase, -/_ in source x x x Oracle CDD/DML support x x N Transarc Encina (-tps) support N N x DECset PCA,LSE/SCA support x x N DECset PDF support x N N FUSE support N N x Symbolic debugger support x x x Common command line for OpenVMS x x N Docs_-_UM/RM_HTML_and_PDF_________x_______x_______x________ 51 8 Providing Product Feedback If you have comments, suggestions, or questions about Compaq COBOL on Alpha or VAX, or if you are interested in signing up to field test a future version of Compaq COBOL, use the following URL for general information about Compaq COBOL: http://www.openvms.compaq.com/commercial/cobol/ We are interested in your feedback both on the capabilities of Compaq COBOL V2.8 and on future capabilities you would like to see in Compaq 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 Compaq support channel if you are reporting a problem and you need a response back when the problem is resolved. 52