Compaq COBOL V2.7 Release Notes - October 1, 2000 ________________________ 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:COBOL027_RELEASE_NOTES.PS OpenVMS Alpha: SYS$HELP:COBOL027.RELEASE_NOTES Compaq Tru64 UNIX: /usr/lib/cmplrs/cobol/relnotes Windows NT Alpha: .\DEC\COBOL\V27\docs\Release_Notes.txt,.ps,.pdf i ________________________________________________________________ © 2000 Compaq Computer Corporation COMPAQ, VAX, VMS, the Compaq logo, and the DIGITAL logo Registered in U.S. Patent and Trademark Office. OpenVMS and Tru64 are trademarks of Compaq Information Technologies Group, L.P. Microsoft, MS-DOS, Win32, Windows, and Windows NT are trademarks of Microsoft Corporation. Motif, OSF/1, UNIX, and X/Open are trademarks of The Open Group. 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. Compaq shall not be liable for technical or editorial errors or omissions contained herein. The information in this document is subject to change without notice. THE INFORMATION IN THIS PUBLICATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK ARISING OUT OF THE USE OF THIS INFORMATION REMAINS WITH RECIPIENT. IN NO EVENT SHALL COMPAQ BE LIABLE FOR ANY DIRECT, CONSEQUENTIAL, INCIDENTAL, SPECIAL, PUNITIVE, OR OTHER DAMAGES WHATSOEVER (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION OR LOSS OF BUSINESS INFORMATION), EVEN IF COMPAQ HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND WHETHER IN AN ACTION OF CONTRACT OR TORT, INCLUDING NEGLIGENCE. The limited warranties for Compaq products are exclusively set forth in the documentation accompanying such products. Nothing herein should be construed as constituting a further or additional warranty. ________________________________________________________________ Contents 1 Release Summary.................................. 1 1.1 Windows NT Alpha Additional Information ....... 3 1.2 Version Numbers ............................... 4 1.3 Problems Corrected Since Compaq COBOL V2.6 .... 5 1.4 Restrictions and Known Problems ............... 11 2 Recent Enhancements.............................. 27 2.1 CIT3 18-Digit Intermediates ................... 27 2.2 31-Digit User Items ........................... 29 2.3 CIT4 32-Digit Intermediates ................... 32 2.4 Standard Arithmetic ........................... 33 2.5 Table Sort .................................... 34 2.5.1 Table Sort Example 1........................ 34 2.5.2 Table Sort Example 2........................ 35 2.5.3 Table Sort Example 3........................ 36 2.5.4 Table Sort Example 4........................ 37 2.6 X/Open DISPLAY [NOT] ON EXCEPTION and END-DISPLAY.................................... 38 2.7 /ARCHITECTURE and /OPTIMIZE=TUNE - Targetted Code Generation and Optimization............... 39 2.8 Unified command language definition across Alpha and VAX.................................. 42 2.9 /CHECK=DECIMAL MOVE option .................... 42 2.10 [OpenVMS] RMS Journaling option for SEQUENTIAL VARYING........................................ 43 2.11 [OpenVMS] PCSI-based installation ............. 43 2.12 Reference/User Manuals in HTML format ......... 44 2.13 Additional COPY Directories (/INCLUDE) ........ 44 2.14 Y2K (Year 2000) Summary of Support ............ 45 2.15 Y2K Intrinsic Functions ....................... 47 2.16 Stop with Status .............................. 48 2.17 Automatic DISPLAY WITH CONVERSION ............. 49 2.18 [OpenVMS] Initialization Using Literals from CDD............................................ 49 iii 2.19 [OpenVMS] USAGE IS POINTER-64 ................. 50 2.20 [OpenVMS] SYS$CURRENCY Support ................ 50 2.21 [Windows NT] Debugging Improvements ........... 51 2.22 [Windows NT] Visual Basic Examples Calling COBOL DLL...................................... 52 2.23 [Windows NT] ORGANIZATION INDEXED ............. 53 2.24 [Windows NT] ACCEPT/DISPLAY Screen Handling ... 54 2.25 [Windows NT] Interactive Compiler Driver (ICD).......................................... 55 3 Run-Time Library Notes........................... 56 4 Debugger Notes................................... 56 4.1 Debugger Notes for OpenVMS Alpha .............. 56 4.1.1 Restrictions................................ 56 4.2 Debugger Notes for Tru64 UNIX ................. 58 4.2.1 Features.................................... 58 4.2.2 Restrictions................................ 58 4.3 Debugger Notes for Windows NT Alpha ........... 63 5 Documentation Notes.............................. 64 5.1 Documentation Changes and Updates ............. 64 5.2 [Windows NT] Adobe Acrobat Reader ............. 66 5.3 Summary of the Compaq COBOL Documentation Set............................................ 68 5.4 Feedback on Our Documentation ................. 70 6 Troubleshooting Tips ............................ 71 7 Compaq COBOL Compatibility Matrix................ 82 8 Providing Product Feedback....................... 86 iv 1 Release Summary These release notes contain important information about Compaq COBOL V2.7 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 HTML 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 four supported platforms. Additional details concerning differences between Compaq COBOL on the Alpha platforms appear in the documentation. When a release note is specific to a particular platform, the following tags are used: o [OpenVMS] o [UNIX] o [Windows NT] Compaq COBOL V2.7 requires one of the following: o OpenVMS Alpha V6.2 or higher o Tru64 UNIX V4.0F or higher o Windows NT Alpha 4.0 SP4 or SP5 Compaq COBOL V2.7 includes the following new functionality, new documentation, and bug fixes beyond Compaq COBOL V2.6: o Updated Reference/User Manuals in HTML format 1 o Selected items compatible with the draft standard (ANSI- 9x/200x): - Standard arithmetic including ARITHMETIC clause with some restrictions - New numeric USAGE clauses - Exponentiation - SQRT - Table sort o X/Open DISPLAY [NOT] ON EXCEPTION and END-DISPLAY o CIT3/CIT4 improvements: - Elimination of several restrictions - Improved code generation - RTL conversion to higher-performance 64-bit operations o Other run-time performance improvements: - Value initialization with figurative constants - DISPLAY to a file o /DISPLAY_FORMATTED - automatic DISPLAY WITH CONVERSION o /ARCHITECTURE/OPTIMIZE=TUNE - targetted code generation /optimization support o Unified command language definition across Alpha and VAX o Option for suppressing /CHECK=DECIMAL for MOVE operations o [OpenVMS] Option for enabling support for RMS Journaling with RECORD IS VARYING for SEQUENTIAL files o [OpenVMS,UNIX] GEM BL44 upgrade o [OpenVMS] PCSI-based kit installation o [Windows NT] Integration of ICD installation into the mainline kit o Several bug fixes (see details that follow) [Windows NT] Compaq COBOL V2.7 is the last planned release on Windows NT Alpha. 2 1.1 Windows NT Alpha Additional Information The Compaq COBOL kit for Windows NT Alpha includes some components under license from Microsoft including: o Linker o Librarian o WINDBG o C++ run-time support These tools are compatible with Microsoft Visual C++ 5.0 for Windows NT Alpha. Generally, Compaq COBOL for Windows NT Alpha can be used with any language or debugger compatible with Microsoft Visual C++ 5.0 for Windows NT Alpha. Compaq COBOL V2.7 for Windows NT Alpha includes most of the functionality from Compaq COBOL for OpenVMS Alpha and Tru64 UNIX. The key pieces of functionality not available with Compaq COBOL on Windows NT Alpha and not planned for Compaq COBOL on Windows NT Alpha include: o Tape handling o Extended ACCEPT/DISPLAY support for BLINK See the compatibility matrix at the end of the release notes for a complete summary of the functionality available across the four platforms supported by Compaq COBOL. 3 1.2 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.7-1209 then the compiler is Version V2.7, edit number 1209. The compiler version number is also displayed as follows: [OpenVMS] ANALYZE/IMAGE SYS$SYSTEM:COBOL.EXE [UNIX] cobol -v [Windows NT] COBOL /WHAT The version number for the V2.7 run-time library is V2.7- 603 for the following: [OpenVMS] DEC$COBRTL.EXE [UNIX] libcob.so [UNIX] libcob.a [Windows NT] dcob.dll To verify the version of the run-time library: [OpenVMS] ANALYZE/IMAGE SYS$LIBRARY:DEC$COBRTL.EXE [UNIX] what /usr/shlib/libcob.so [UNIX] what /usr/shlib/libcob.a [Windows NT] link /dump /headers %dec_cobol_dir%\bin\axp\dcob.dll | find "image version" In addition, the version number for the V2.6 decimal support run-time library is V2.6-46 (unchanged for V2.7) for the following: [OpenVMS] LIBOTS2.EXE [UNIX] libots2.so [UNIX] libots2.a The run-time library is included with Compaq COBOL V2.7. [Windows NT] On Windows NT Alpha, libots2 is integrated into dcob.dll. Also, you must purchase a separate license for the run-time library to use it on a system not licensed for Compaq COBOL V2.7. 4 1.3 Problems Corrected Since Compaq COBOL V2.6 The list below is broken into two parts. The first part includes release notes for problems corrected since since the V2.6-1138 compiler and V2.6-496 RTL for OpenVMS Alpha. The V2.6-1138 compiler was released as a TIMA kit for OpenVMS Alpha. The V2.6-496 RTL was released as Compaq COBOL V2.6A for OpenVMS Alpha. The second part includes release notes for problems corrected since V2.6 ASM (V2.6- 1060 compiler and V2.6-467 RTL) up through V2.6-1138 and V2.6-496. Problems corrected that do not apply to all 3 Alpha platforms are tagged with o [OpenVMS] o [UNIX] o [Windows NT] ___________________________________________________________ Version______Description___________________________________ V2.7-1209 The compiler now correctly diagnoses invalid attempts to use DISPLAY or FUNCTION to reference user-defined items larger than 65,535 bytes. V2.7-1209 The compiler now flags X/Open extensions with /WARNINGS=ALL/FLAGGER=HIGH. V2.7-1209 The compiler now correctly handles COPY REPLACING with an ALIGNMENT directive. V2.7-1209 0 ** 0 now correctly raises the size error condition for floating operands. V2.7-1209 The compiler now correctly diagnoses MOVE of a signed literal to an unsigned destination. 5 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 The compiler now correctly issues the NOSCALE diagnostic for invalid uses of COMP-5. V2.7-1209 The BADEXCEPT diagnostic is now correctly issued for invalid uses of DISPLAY [NOT] ON EXCEPTION. V2.7-1209 The compiler now correctly handles SEARCH with a WHEN clause comparing a signed numeric field with a text field. V2.7-1209 The compiler now correctly issues a diagnostic for RETURN for a sort file with no record description. V2.7-1209 IDENTIFICATION DIVISION can now be spaced across multiple lines. V2.7-1209 VOLATILE is now correctly set on all items subordinate to a group item which is marked VOLATILE. V2.7-1209 [OpenVMS] Now that the Compaq COBOL RTL installation is PCSI-based, you no longer need to reinstall the RTL after an upgrade to OpenVMS Alpha V7.2 or higher. Previously, if you got the following at run-time %IMGACT-F-SYMVECMIS, shareable image's symbol vector table mismatch -IMGACT-F-FIXUPERR, error when PR_JP referenced DEC$COBRTL after an operating system version upgrade, you needed to reinstall the RTL for Compaq COBOL. V2.7-1209 [OpenVMS] The new PCSI-based installation procedure now prompts the user to terminate the installation if the IVP fails. 6 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [OpenVMS] The new PCSI-based RTL installation procedure for OpenVMS Alpha Versions 6.2 through 7.1-1 now correctly handles the update of STARLET.OLB. V2.7-1209 [OpenVMS] The installation verification procedure (IVP) now recommends that the installation be terminated if the V2.7 or higher RTL is not installed. V2.7-1209 [OpenVMS] Exponentiation results are now consistent between OpenVMS Alpha V6.2 and later versions of OpenVMS. V2.7-1209 [OpenVMS] The compiler no longer fails for certain cases where the qualifier combination /ANALYSIS_DATA with /SEPARATE_COMPILATION is used. V2.7-1209 [OpenVMS] /DEBUG now works properly with MOVE edited. V2.7-1209 [UNIX] The compiler driver now properly handles -align at the end of the command line. V2.7-1209 [UNIX] The compiler now correctly issues a diagnostic when VALUE EXTERNAL is used with a variable smaller than 8 bytes. V2.6-1138 The compiler now correctly diagnoses invalid attempts to reference user-defined items larger than 65,535 bytes. 7 ___________________________________________________________ Version______Description___________________________________ V2.6-1138 The RTL now correctly handles UNSTRING with /NATIONALITY=JAPAN and PIC N source strings. Previously, the RTL would incorrectly match a delimiter which started on an even byte offset within a source string. V2.6-1138 RTL handling of ON SIZE ERROR is now more compatible with Compaq COBOL for OpenVMS VAX. V2.6-1138 The compiler no longer fails with a GEM assertion diagnostic when processing the qualifier /GRANULARITY for certain cases of EVALUATE. Diagnostics for /GRANULARITY with EVALUATE now correctly point to the EVALUATE statement. Also debug step for EVALUATE now has an additional step before the first WHEN clause. V2.6-1138 The compiler no longer aborts when processing /CHECK=PERFORM/DEBUG/NOOPT for certain cases involving programs with many PERFORM statements with the integration of GEM BL44. V2.6-1138 The compiler now generates code to avoid a run-time abort in certain cases of compiling /NOOPTIMIZE/DEBUG/CHECK. V2.6-1138 Several compiler failures with various /OPT levels have been corrected with the integration of GEM BL44. V2.6-1138 The compiler now correctly issues diagnostics for incorrect uses of ACCEPT DATE YYYYDDD and ACCEPT DAY YYYYMMDD. V2.6-1138 GIVING and RETURN-CODE can now be used in the same routine as IS INITIAL. 8 ___________________________________________________________ Version______Description___________________________________ V2.6-1138 /OPTIMIZE=LEVEL=0 is now correctly handled in the listing. V2.6-1138 The compiler no longer fails in certain cases when a listing is requested for a program with multiple program units. V2.6-1138 Diagnostic processing with COPY REPLACING and /ANALYSIS_DATA now works correctly. V2.6-1138 The compiler now correctly handles DIVIDE WITH REMAINDER for cases when the operands overlap. V2.6-1138 [OpenVMS] The RTL now correctly handles READ PRIOR with RFAs exceeding a signed longword. V2.6-1138 [OpenVMS] RTL compatibility with programs linked against the V2.4 TIMA RTL and V2.5 RTL has been restored in these areas: o ACCEPT FROM DATE YYYYMMDD o ACCEPT FROM DAY YYYYDDD o /MATH=CIT3 (/SWITCH=DC_USE_CIT3 with V2.4 TIMA) Any program which uses any of these features and has been linked against the older V2.6 RTLs (DEC$COBRTL V2.6-467 or V2.6-470) must be relinked against DEC$COBRTL V2.6-496 or higher. If you do not relink, the programs may fail at run-time possibly with wrong results. If you have not previously installed COBOLRTL026 and linked any programs with V2.6, you have no programs to relink. Also programs which do not use the features listed above do not need to be relinked. 9 ___________________________________________________________ Version______Description___________________________________ V2.6-1138 [OpenVMS] The compiler now correctly handles /LIST with comma lists. V2.6-1138 [OpenVMS] The compiler now correctly handles RMS special registers in the REPORT SECTION. V2.6-1138 [OpenVMS] The compiler now correctly formats diagnostic summaries in the listing for compilations with more than one separately compiled program unit. V2.6-1138 [OpenVMS] The installation verification procedure no longer fails if the SYS$CURRENCY logical is set to something other than "$". ___________________________________________________________ 10 1.4 Restrictions and Known Problems ___________________________________________________________ Version______Description___________________________________ V2.7-1209 Compaq COBOL V2.7 requires one of the following: o OpenVMS Alpha V6.2 or higher o Tru64 UNIX V4.0F or higher o Windows NT Alpha 4.0 SP4 or SP5 You should upgrade your operating system to a Y2K-compliant version. Even though Compaq COBOL V2.7 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.7-1209 To obtain all relevant V2.7 bug fixes and to use all V2.7 functionality, you must use the latest Compaq COBOL RTL. V2.7-1209 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. See additional details in the /ARITHMETIC section. V2.7-1209 When the starting position or length of reference modification is specified by an expression, and that expression is out of range, Compaq COBOL on Alpha detects the out of range at run-time (if /CHECK=BOUNDS) is used, whereas Compaq COBOL on VAX in some cases detects the out of range at compile- time. In addition, Compaq COBOL on Alpha issues compile-time diagnostics for constant expressions in many cases. 11 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 External names with the following prefixes are reserved for use by Compaq COBOL: COB$, DCOB$, cob_. V2.7-1209 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. V2.7-1209 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.7-1209 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.7-1209 See the section "Debugger Notes" for problems and restrictions specific to debugging with Compaq COBOL. V2.7-1209 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. 12 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [OpenVMS] 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.7-1209 [OpenVMS] Use SET BREAK %LABEL with numeric paragraph labels. On VAX, you instead use SET BREAK %NAME. V2.7-1209 [OpenVMS] 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. 13 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [OpenVMS] 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.7-1209 [OpenVMS] 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 V2.7-1209 [OpenVMS] 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.7-1209 [OpenVMS] The minimum Oracle DBMS version required for Compaq COBOL is Oracle DBMS V5.1A. 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.7-1209 [OpenVMS] RECORD IS VARYING for SEQUENTIAL files is now supported in a limited fashion with RMS Journaling. You must define the logical $ DEFINE COB$USE_RECORD_IO TRUE and your run unit can contain no module which uses LINE SEQUENTIAL or is compiled with /NOVFC. 14 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [OpenVMS] 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.7-1209 [OpenVMS] 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.7-1209 [OpenVMS] Stream_LF files (ORGANIZATION LINE SEQUENTIAL or ORGANIZATION SEQUENTIAL with /NOVFC) are not supported if the file is assigned to a network device. V2.7-1209 [OpenVMS] 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.7-1209 [OpenVMS] 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. 15 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [OpenVMS] 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. V2.7-1209 [UNIX] -om -call_shared (-call_shared is the default) is not supported with COBOL on Tru64 UNIX V5.1. V2.7-1209 [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. 16 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [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.7, you do not need to install OSFOBSOLETE. V2.7-1209 [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 17 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [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.7-1209 [UNIX] You must use ltf (logical tape facility) to initialize ANSI labeled magtapes. V2.7-1209 [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.7-1209 [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.7-1209 [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. 18 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [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.7-1209 [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.7-1209 [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. 19 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [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.7-1209 [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". 20 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [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. 21 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [UNIX, Windows NT] ORGANIZATION INDEXED requires a separately licensed 3rd party product. On Tru64 UNIX, Informix C-ISAM version V5.00 is required. C-ISAM can be ordered from Informix: Product: Informix C-ISAM Available From: Informix USA: 1-800-331-1763 UK: 44-1784-42-2000 Singapore: 0718-65-298-1716 Japan: 81-3-5562-4599 WWW: http://www.informix.com On Windows NT Alpha, Sector 7 ISAM 19-Dec- 1997 vxisam.dll is required. vxisam.dll can be ordered from Sector 7: Part Number: VXISAM-NTIA Available From: Sector 7 Group USA: 1-800-867-8649 UK: +44 (0)1536-408588 Internet: sales@sector7.com WWW: http://www.sector7.com V2.7-1209 [Windows NT] /NOOPTIMIZE/DEBUG (/OPTIMIZE:0 /DEBUG) is not supported in certain cases. The compiler will automatically switch to /OPTIMIZE:1/DEBUG to handle these cases. 22 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [Windows NT] The Compaq COBOL run-time library is available as a DLL only (dcob.dll). Therefore, an application built on a particular system requires that the Compaq COBOL run-time library DLL be installed on any other system on which the application is to be run. A separate run-time kit is available, and you must purchase a separate license for the run-time library to use it on a system not licensed for Compaq COBOL V2.7. V2.7-1209 [Windows NT] The debugger call stack does not accurately reflect the calling sequence if DECLARATIVES are used. V2.7-1209 [Windows NT] DISPLAY of the null character is not supported. V2.7-1209 [Windows NT] EXTERNAL in a run unit built as a DLL is not supported. V2.7-1209 [Windows NT] Because of a Visual Basic restriction, COBOL cannot CALL a routine in a Visual Basic DLL. V2.7-1209 [Windows NT] The PROCEDURE DIVISION of a COBOL program called by cobcall or cobfunc can contain a GIVING phrase specifying a function result. The GIVING identifier must be a longword integer COMP data item. The identifier cannot be subscripted, but it can be qualified. 23 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [Windows NT] If a data item is declared as EXTERNAL and its name is 1 character in length (for example E) and the program is compiled for debugging, during the link phase, you will see the following warning: CVPACK : warning CK4002: duplicate public symbol E in module The warning can be ignored. Symbol E in this example is valid in the executable image for debugging. V2.7-1209 [Windows NT] The Windows NT Alpha utility which converts DLLs and EXEs so that lookup of external routine names is done by ordinal position rather than by name cannot be used with Compaq COBOL. Compaq COBOL does not support references to DCOB.DLL from other DLLs and EXEs on which this utility has been run. V2.7-1209 [Windows NT] The installation procedure and the Interactive Compiler Driver require a screen resolution of 800x600 or higher. V2.7-1209 [Windows NT] Tape handling is not supported. V2.7-1209 [Windows NT] ACCEPT/DISPLAY screen handling does not support BLINK. V2.7-1209 [Windows NT] The keypad containing the numerics, and the function keys at the top of the keyboard, are not detected by the Compaq COBOL run-time system. 24 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [Windows NT] File sharing and record locking are generally supported, but some restrictions exist: File sharing: o A unique access stream is created whenever an OPEN statement is executed for a physical file that has a separate FD. This may occur in a single run unit or across different run units. o For INDEXED files, OPEN ALLOWING READERS is minimally supported and is not recommended. Record locking: o For all file types, the ALLOWING READERS option of READ and START is not supported. o For all file types, the REGARDLESS option of READ and START is not supported. For SEQUENTIAL files, this means that no subsequent READs can be done when a FILE STATUS 92 occurs until the record is free. For INDEXED and RELATIVE files, a START can be used to position beyond the locked record. o For INDEXED files, the ALLOWING UPDATERS option on a READ prevents the READ statement from detecting a locked record. o For INDEXED files, START does not detect a locked record. o For SEQUENTIAL and RELATIVE files, there is a limit of 200 record locks per access stream. This may affect programs with manual locking that neglect to perform UNLOCK statements on a regular basis. 25 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [Windows NT] ORGANIZATION INDEXED is limited to 254 keys. V2.7-1209 [Windows NT] Compaq COBOL run units require that a Compaq COBOL routine be the first routine built into the run unit. No routines included in the run unit can have the name 'main'. This restriction is to ensure that Compaq COBOL exception handling operates correctly. ___________________________________________________________ The table above is a summary of many of the restrictions and known problems. For further details on these known problems and restrictions, or for other restrictions in using the product, see o Compaq COBOL Reference Manual or Online Reference o Compaq COBOL User Manual o Compaq COBOL User Manual for Windows NT Alpha 26 2 Recent Enhancements This section includes additional details on selected product enhancements since DIGITAL COBOL V2.5. These product enhancements are also documented for V2.7 in the User Manual and Reference Manual. 2.1 CIT3 18-Digit Intermediates The COBOL language allows users to declare data up to 18 decimal digits. Both Compaq COBOL and Compaq COBOL for OpenVMS VAX provide extended arithmetic precision for intermediate computations generally up to 31 decimal digits. When the compiler issues the INTERMED diagnostic with /WARNINGS=ALL (-warn all), Compaq COBOL for OpenVMS VAX switches to CIT/CIT2 (COBOL Intermediate Temp) as the intermediate data type and Compaq COBOL switches to double precision floating. CIT3 provides increased arithmetic compatibility with Compaq COBOL for OpenVMS VAX. When this option is chosen, Compaq COBOL switches to CIT3 as the intermediate data type instead of double precision floating. CIT3 arithmetic maintains a base containing the most significant 18 decimal digits of an arithmetic operation and an exponent in the range -99...+99 representing a power of 10. To use CIT3, use the following new qualifier in your compilations: [OpenVMS] COBOL /MATH_INTERMEDIATE=CIT3 [UNIX] cobol -math_intermediate cit3 [Windows NT] COBOL /MATH_INTERMEDIATE=CIT3 CIT3 is disabled by default, so the default arithmetic behavior with Compaq COBOL generally matches earlier versions of DIGITAL COBOL and DEC COBOL (with the exception of bug fixes). Following is a brief summary of differences between Compaq COBOL and VAX COBOL arithmetic with CIT3 enabled in Compaq COBOL: o Invalid decimal data 27 In Compaq COBOL, invalid decimal data detection takes place before any possible conversion to CIT3. CIT3 operations on data items containing invalid decimal data will get results compatible with Compaq COBOL rather than Compaq COBOL for OpenVMS VAX. o Floating-point data items In Compaq COBOL, expressions involving COMP-1 or COMP-2 data items will be converted to G_floating (on OpenVMS Alpha) or T_floating before conversion to CIT3. CIT3 operations involving D_floating (on OpenVMS Alpha) data items, in particular, will get results compatible with Compaq COBOL rather than Compaq COBOL for OpenVMS VAX. o Undefined results If an abnormal condition arises during a CIT3 operation, for example, INTEXPOVE (intermediate exponent overflow), and the program manages to continue, and it is not an arithmetic statement with an ON SIZE ERROR clause, then the values that get stored in destination items will be undefined. Compaq COBOL and Compaq COBOL for OpenVMS VAX are highly likely to get different undefined results in such cases. o STANDARD dependency The Compaq COBOL for OpenVMS VAX /STANDARD qualifier has an effect on when arithmetic expression analysis switches to one of the CIT forms. When you specify /STANDARD=V3 (-std v3), CIT is used when more than 18 digit intermediate results are needed. With /STANDARD=85 (-std 85), CIT is used when more than 31 digit intermediate results are needed. The Compaq COBOL implementation on Alpha is compatible with Compaq COBOL for OpenVMS VAX /STANDARD=85. o Special contexts The CIT3 implementation concentrated on the arithmetic statements ADD, SUBTRACT, MULTIPLY, DIVIDE, compare, and COMPUTE. The compiler does not provide CIT3 support equivalent to Compaq COBOL for OpenVMS VAX's CIT/CIT2 support in the following contexts: - Expressions in reference-modification components (restriction removed with V2.6-1138) 28 - Expressions in INSPECT, STRING, and UNSTRING statements (restriction removed with V2.6-1138) - Intrinsic functions MEDIAN, NUMVAL, and NUMVAL-C 2.2 31-Digit User Items Summary of functionality contrasted with 18-digit support: o The maximum number of digits in a picture character string describing fixed-point numeric and numeric-edited data items is raised from 18 to 31. o The maximum number of digits in numeric literals is raised from 18 to 31. o The maximum number of characters in a picture character string is raised from 30 to 50. o The maximum number of digits now supported in most intrinsic functions is raised from 18 to 31. o The maximum number of digits now supported for numeric SORT/MERGE keys is raised from 18 to 31. o The maximum number of digits now supported for PACKED- DECIMAL (COMP-3) numeric and unsigned DISPLAY numeric ISAM keys is raised from 18 to 31. o The compiler no longer issues a diagnostic for PICTURE clauses with digits in the range 19-31. o The compiler diagnostic text for OPDGIVING has been modified to reflect that PROCEDURE DIVISION USING and CALL GIVING do not support octaword binary integers and to clarify the rules for scaled operands. o [OpenVMS] The compiler now provides improved CDD support for numeric items with digits in the range 19-31. The following table shows primitive COBOL data types, organized by USAGE, and whether they are impacted by the 31-digit requirements. ___________________________________________________________ USAGE____________Impacted____Notes_________________________ COMPUTATIONAL Y Integer family 29 ___________________________________________________________ USAGE____________Impacted____Notes_________________________ COMPUTATIONAL-1 N Single precision floating- point COMPUTATIONAL-2 N Double precision floating- point COMPUTATIONAL-3 Y Packed-decimal DISPLAY Y Display numeric INDEX N Longword integer POINTER N Longword or quadword integer ___________________________________________________________ "Y" in the Impacted column means the data type is affected by the 31-digit requirements; "N" means the data type is not affected. 31-digit user items are not supported for COMP-1 and COMP- 2. The following table shows some examples of COBOL constructs that are now valid. ___________________________________________________________ Code_fragment__________________________________Notes_______ 01 A PIC S9(31). Display numeric item 01 A PIC S9(16)P(15). Display numeric item 01 A PIC $(29).99. Numeric- edited item 01 A PIC S9(31) COMP. COMP item with 31 digits VALUE 1234567890123456789012345678901. Numeric literal ___________________________________________________________ As is the case with all expressions in Compaq COBOL, intermediate temporaries are controlled with /MATH_ INTERMEDIATE. 30 As was the case with 18-digit maximum sizes, programs should not arbitrarily specify sizes significantly larger than the values actually anticipated for the application's lifetime. Although the new limits are useful for many applications, specifying 31 digits when 12 will suffice, for example, may add extra processing cycles and complexity that is wasteful. 31 2.3 CIT4 32-Digit Intermediates The Compaq COBOL extension allowing numeric items with up to 31 decimal digits makes it quite easy to construct arithmetic expressions that may produce more than 31 digits. When such a situation occurs, the compiler previously could choose between using double-precision floating-point (/MATH_INTERMEDIATE=FLOAT, the default) or CIT3 (/MATH_INTERMEDIATE=CIT3). The new option allows the compiler to choose CIT4 (/MATH_INTERMEDIATE=CIT4) instead. CIT3 data items maintain a base containing the most significant 18 decimal digits of an arithmetic operation and an exponent in the range -99...+99 representing a power of 10. CIT4 data items maintain a base containing the most significant 32 decimal digits and an exponent with the same range. We strongly recommend that you choose this option with programs that make use of numeric items with more than 18 digits or when computations have several levels of nested expressions that generate large intermediate requirements. To use CIT4, use the following new qualifier option in your compilations: [OpenVMS] COBOL /MATH_INTERMEDIATE=CIT4 [UNIX] cobol -math_intermediate cit4 [Windows NT] COBOL /MATH_INTERMEDIATE=CIT4 CIT4 is disabled by default, so the default arithmetic behavior with Compaq COBOL generally matches earlier versions of DIGITAL COBOL and DEC COBOL (with the exception of bug fixes). In addition to the precision difference, CIT4 arithmetic has the same differences and restrictions as shown in section 2.1, CIT3 18-digit Intermediates. Consider the following example. 32 IDENTIFICATION DIVISION. PROGRAM-ID. MUL31. DATA DIVISION. WORKING-STORAGE SECTION. 01 XD PIC S9(31) VALUE 3. 01 YD PIC S9(31) VALUE 258718314234781388692555698765. 01 ZD PIC S9(31). PROCEDURE DIVISION. 0. MULTIPLY XD BY YD GIVING ZD ON SIZE ERROR DISPLAY "Size error raised" NOT ON SIZE ERROR DISPLAY ZD WITH CONVERSION. The compiler relies on the number of digits implied by the pictures of decimal and integer operands. Here it assumes that XD has 31 digits and YD has 31 digits. The product could require 62 digits, which is larger than the largest fixed-point arithmetic type available to the compiler. Depending on the intermediate data type chosen, this program gets several different results. Intermediate maintains MATH ZD the most significant ----- ------------------------------ ---------------------- FLOAT 776154942704344283789821739008 53 bits CIT3 776154942704344164000000000000 18 digits CIT4 776154942704344166077667096295 32 digits 2.4 Standard Arithmetic The new qualifier is: [OpenVMS] /ARITHMETIC=option [UNIX] -arithmetic option [Windows NT] /ARITHMETIC=OPTION /ARITHMETIC specifies whether native arithmetic or standard arithmetic is used to evaluate arithmetic operations and statements. The options are: o NATIVE Selects native arithmetic. Arithmetic operations will produce results that are reasonably compatible with releases of Compaq Cobol for Alpha prior to V2.7 and also with Compaq Cobol for OpenVMS VAX. 33 o STANDARD Selects standard arithmetic. Most common arithmetic operations will produce results that are predictable, reasonable, and portable. In this context, portable means that the results will be identical from implementation to implementation. Choosing the STANDARD option forces /MATH_INTERMEDIATE=CIT4. The default is /ARITHMETIC=NATIVE. 2.5 Table Sort SORT can now be used to order the elements in a table. This is especially useful for table used with SEARCH ALL. The table elements are sorted based on the keys as specified in the OCCURS for the table. The table keys as specified in the OCCURS can be overridden with keys as specified in the SORT statement. If no key is specified, the table elements are the SORT keys. The new syntax is SORT table-name [ ON { ASCENDING } KEY { sortkey } ... ] ... [ { DESCENDING } ] [ WITH DUPLICATES IN ORDER ] [ COLLATING SEQUENCE IS alpha ]. 2.5.1 Table Sort Example 1 This example is a simple sort in which the table is sorted in order using the key definitions in the OCCURS clause of data item tabl to specify the sequence, that is elem- item2 is the major key (ascending) and elem-item1 is the secondary key (descending). It is then possible to use a SEARCH ALL statement knowing that all the elements are in the required order. 34 identification division. program-id. EXAMPLE1. data division. working-storage section. 01 group-item. 05 tabl occurs 10 times ascending elem-item2 descending elem-item1 indexed by ind. 10 elem-item1 pic x. 10 elem-item2 pic x. procedure division. 1. display "Example 1". move "13n3m3p3o3x1x1x1x1x1" to group-item. sort tabl. search all tabl at end display "not found" when elem-item1 (ind) = "m" if (elem-item1 (ind - 1) = "n") and (elem-item1 (ind + 1) = "1") display "elem-item1 is descending order - 2nd key" else display "sort failed" end-if end-search. exit program. end program EXAMPLE1. 2.5.2 Table Sort Example 2 This example is a simple sort in which the table is sorted in order using the key definitions in the OCCURS clause of data item tabl to specify the sequence, that is elem- item2 is the major key (ascending) and elem-item1 is the secondary key (descending). It is then possible to use a SEARCH ALL statement knowing that all the elements are in the required order. 35 identification division. program-id. EXAMPLE2. data division. working-storage section. 01 group-item. 05 tabl occurs 10 times. 10 elem-item1 pic x. 10 elem-item2 pic x. procedure division. 2. display "Example 2". move "13n3m3p3o3x1x1x1x1x1" to group-item. sort tabl ascending. if tabl (1) = "13" and tabl (2) = "m3" display "tabl is ascending order" else display "sort failed" end-if. exit program. end program EXAMPLE2. 2.5.3 Table Sort Example 3 This example is a simple sort in which the table is sorted in ascending order using each entire element of the table (data item tabl) to determine the sequence. 36 identification division. program-id. EXAMPLE3. data division. working-storage section. 01 group-item. 05 tabl occurs 10 times ascending elem-item3 descending elem-item1. 10 elem-item1 pic x. 10 elem-item2 pic x. 10 elem-item3 pic x. procedure division. 3. display "Example 3". move "13bn3cm3ap3do3fx1ex1ix1hx1gx1a" to group-item. sort tabl descending elem-item2 elem-item3. if tabl (1) = "o3f" and tabl (2) = "p3d" display "tabl is descending order" else display "sort failed" end-if. exit program. end program EXAMPLE3. 2.5.4 Table Sort Example 4 This example sorts only the third instance of tabl2, that is tabl1(3). It uses the qualified data item, elem-item1 of group2 as its key. In normal PROCEDURE DIVISION reference, elem-item1 or group2 requires two level of subscripting /indexing while in this reference it has none. (Similarly, tabl2 normally requires one level of subscripting, but can not be subscripted as data-name2 in the SORT statement. Instead it uses the value of t1-ind for determining which instance is sorted. 37 identification division. program-id. EXAMPLE4. data division. working-storage section. 01 group-item. 05 tabl1 occurs 3 times indexed by t1-ind t2-ind. 10 tabl2 occurs 5 times. 15 group1. 20 elem-item1 pic x. 15 group2. 20 elem-item1 pic 9. procedure division. 4. display "Example 4". move "x5z4y6z6x4a3b2b1a2c1j7j8k8l7j9" to group-item. set t1-ind to 3. sort tabl2 descending elem-item1 of group2. if group1 (3 1) = "j" and group2 (3 1) = "9" and tabl1 (1) = "x5z4y6z6x4" and tabl1 (2) = "a3b2b1a2c1" display "tabl1 (3) is descending order" else display "sort failed" end-if. exit program. end program EXAMPLE4. 2.6 X/Open DISPLAY [NOT] ON EXCEPTION and END-DISPLAY DISPLAY format 6 now includes support for [NOT] ON EXCEPTION similar to ACCEPT. One impact of this change is that a DISPLAY in an ON EXCEPTION for an ACCEPT must now be terminated (with, for example, the new END-DISPLAY which is now supported for all DISPLAY formats). Note that Compaq COBOL for OpenVMS VAX does not have END- DISPLAY. If you convert code with ACCEPT ON EXCEPTION to handle DISPLAY on both VAX and Alpha, you will need to PERFORM a paragraph with the DISPLAY from the ON EXCEPTION processing in the ACCEPT. 38 The new syntax supported by DISPLAY includes: DISPLAY envlog-value UPON environment-value [ ON EXCEPTION stment ] [ NOT ON EXCEPTION stment2 ] [ END-DISPLAY ] 2.7 /ARCHITECTURE and /OPTIMIZE=TUNE - Targetted Code Generation and Optimization The new qualifiers are as follows: [OpenVMS] /ARCHITECTURE=option [UNIX] -arch option [Windows NT] /ARCH=OPTION [OpenVMS] /OPTIMIZE=TUNE=option [UNIX] -tune option [Windows NT] /TUNE=OPTION /ARCHITECTURE determines the type of Alpha chip code that will be generated for a particular program. The /ARCHITECTURE qualifier uses the same options (keywords) as the /OPTIMIZE=TUNE qualifier. Whereas the /OPTIMIZE=TUNE qualifier is primarily used by certain higher-level optimizations for instruction scheduling purposes, the /ARCHITECTURE qualifier determines the type of code instructions generated for the program unit being compiled. [OpenVMS] OpenVMS Version 7.1 and subsequent releases provide an operating system kernel that includes an instruction emulator. This emulator allows new instructions, not implemented on the host processor chip, to execute and produce correct results. [UNIX] Tru64 UNIX includes an instruction emulator. This emulator allows new instructions, not implemented on the host processor chip, to execute and produce correct results. Applications using emulated instructions will run correctly, but may incur significant software emulation overhead at run-time. 39 All Alpha processors implement a core set of instructions. Certain Alpha processor versions include additional instruction extensions. The following /ARCHITECTURE options are supported: o GENERIC - Generates code that is appropriate for all Alpha processor generations. This is the default. Programs compiled with the GENERIC option run all implementations of the Alpha architecture without any instruction emulation overhead. o HOST - Generates code for the processor generation in use on the system being used for compilation. Programs compiled with this option on other implementations of the Alpha architecture may encounter instruction emulation overhead. o EV4 - Generates code for the 21064, 21064A, 21066, and 21068 implementations of the Alpha architecture. Programs compiled with the EV4 option run without instruction emulation overhead on all Alpha processors. o EV5 - Generates code for some 21164 chip implementations of the Alpha architecture that use only the base set of Alpha instructions (no extensions). Programs compiled with the EV5 option run without instruction emulation overhead on all Alpha processors. o EV56 - Generates code for some 21164 chip implementations that use the byte and word manipulation instruction extensions of the Alpha architecture. Programs compiled with the EV56 option may incur emulation overhead on EV4 and EV5 processors but will run correctly if run on a system with the appropriate emulator. o EV6 - Generates code for the 21264 chip implementation that uses the following extensions to the base Alpha instruction set: BWX (Byte/Word manipulation) and MAX (Multimedia) instructions, square root and floating- point convert instructions, and count instructions. 40 Programs compiled with the EV6 option may incur emulation overhead on EV4, EV5, EV56, and PCA56 processors but will run correctly if run on a system with the appropriate emulator. o PCA56 - Generates code for the 21164PC chip implementation that uses the byte and word manipulation instruction extensions and multimedia instruction extensions of the Alpha architecture. Programs compiled with the PCA56 option may incur emulation overhead on EV4, EV5, and EV56 processors, but will run correctly if run on a system with the appropriate emulator. /OPTIMIZE=TUNE controls how the compiler produces optimized code. The default is /OPTIMIZE=TUNE=GENERIC. /OPTIMIZE=TUNE=keyword specifies the kind of optimized code to be generated. The keyword can be any of the following: o GENERIC - Generates and schedules code that will execute well for both generations of Alpha processors. This provides generally efficient code for those cases where both processor generations are likely to be used. o HOST - Generates and schedules code optimized for the processor generation in use on the system being used for compilation. o EV4 - Generates and schedules code optimized for the 21064, 21064A, 21066, and 21068 implementations of the Alpha chip. o EV5 - Generates and schedules code optimized for the 21164 implementation of the Alpha chip. This processor generation is faster than EV4. o EV56 - Generates code for some 21164 chip implementations that use the byte and word manipulation instruction extensions of the Alpha architecture. Running programs compiled with the EV56 keyword may incur emulation overhead on EV4 and EV5 processors, but will run correctly if run on a system with the appropriate emulator. 41 o EV6 - Generates and schedules code for the 21264 chip implementation that uses the following extensions to the base Alpha instruction set: BWX (Byte/Word manipulation) and MAX (Multimedia) instructions, square root and floating-point convert instructions, and count instructions. o PCA56 - Generates code for the 21164PC chip implementation that uses the byte and word manipulation instruction extensions and multimedia instruction extensions of the Alpha architecture. Running programs compiled with the PCA56 keyword may incur emulation overhead on EV4, EV5, and EV56 processors, but will run correctly if run on a system with the appropriate emulator. 2.8 Unified command language definition across Alpha and VAX The Compaq COBOL compilers on OpenVMS Alpha and OpenVMS VAX now share a common command language definition to make it easier to design command procedures which can be used across the platforms. 2.9 /CHECK=DECIMAL MOVE option Invalid decimal data checking on Alpha with /CHECK=DECIMAL is not 100% compatible with invalid decimal data checking provided on VAX through the VAX hardware. A new option is available on Alpha for suppressing /CHECK=DECIMAL for MOVE operations. The interface to activate this option will probably change in a future version of Compaq COBOL. To suppress invalid decimal data checking on MOVE operations, but enable other invalid decimal data checking, compile with $ COBOL /CHECK=DECIMAL/SWITCH=DC_NO_MOVE_DECIMAL_CHECK 42 2.10 [OpenVMS] RMS Journaling option for SEQUENTIAL VARYING A new option is available for enabling support for RMS Journaling with RECORD IS VARYING for SEQUENTIAL files. The interface to activate this option will probably change in a future version of Compaq COBOL. You must define the logical $ DEFINE COB$USE_RECORD_IO TRUE and your run unit can contain no module which uses LINE SEQUENTIAL or is compiled with /NOVFC. 2.11 [OpenVMS] PCSI-based installation Compaq COBOL for OpenVMS Alpha is now installed with PCSI instead of VMSINSTAL so that its components will be registered in the PCSI Registry on the installer's system. When the PCSI PRODUCT command is doing later installations of kits such as for OpenVMS Alpha, which contains components of the Compaq COBOL product, i.e. the COBRTL, the PRODUCT command will check in the PCSI Registry whether the registered version is of a higher version number than the one about to be installed. If so, the PRODUCT command will bypass the installation of that component. Compaq COBOL for OpenVMS Alpha is packaged as two PCSI kits, one for the RTL and one for the compiler. The RTL kit is contained in the following files: o DEC-AXPVMS-COBRTL-V0207-603A-1.PCSI - For OpenVMS Alpha V6.2 through V7.1-1 o DEC-AXPVMS-COBRTL-V0207-603B-1.PCSI - For OpenVMS Alpha V7.1-2 and higher The compiler kit is contained in the following file: o DEC-AXPVMS-COBOL-V0207-1209-1.PCSI Both the RTL kit and the compiler kit must be installed. The RTL kit must be installed first. See Compaq COBOL for OpenVMS Alpha Systems Installation Guide for additional details. 43 2.12 Reference/User Manuals in HTML format The latest version of the Compaq COBOL Reference Manual and User Manual are now available online in HTML format. These manuals have been updated to include the latest product functionality through V2.7. For OpenVMS Alpha and Tru64 UNIX, the V2.7 manuals in HTML format are included with the consolidated Online Documentation Library CD-ROMs. [Windows NT] To use the V2.7 Online Reference in HTML format on Windows NT Alpha, go to the Compaq COBOL program menu and select the Online Reference in HTML format. The User Manual for Windows NT Alpha is available online in .PDF format only. 2.13 Additional COPY Directories (/INCLUDE) Compaq COBOL provides a command line qualifier to control where the compiler searches for COPY files for simple COPY statements. A "simple COPY statement" is defined as one where the COPY statement is Format 1 (without the OF/IN clause on Tru64 UNIX and Windows NT Alpha) and text-name is a file name without a directory specification. The new qualifier is as follows: [OpenVMS] /INCLUDE=(dir1[,dir2...]) [UNIX] -include dir ... [Windows NT] /INCLUDE=(dir1[,dir2...]) [OpenVMS] Note that for V2.6, this could be abbreviated /IN, but for V2.7, /INC is required. "dir" can be a relative or absolute directory specification. On OpenVMS Alpha it may be a logical. On Windows NT Alpha or Tru64 UNIX it may be an environment variable. The compiler searches for the text file in the following order: 1. The current working directory when the compiler was invoked. 2. The directory specified after /INCLUDE (-include). 44 If more than one directory is specified with the include qualifier, then the directories are searched in left to right order. The first file encountered that satisfies the COPY statement terminates the search. [OpenVMS] If the OF/IN phrase is specified and library-name does not include a directory specification, the /INCLUDE qualifier will be used to search for a .TLB file. 2.14 Y2K (Year 2000) Summary of Support Current supported Compaq COBOL compilers and run-time libraries are Y2K compliant, but it is not possible for the products to identify many potential application- specific trouble spots in your programs, or to correct your applications. This is not what Y2K compliance is. Any needed changes must be searched out and implemented by you, the application programmers. COBOL is not a strongly typed language, which means that programmers are not forced to specify the exact use of fields they are defining. Thus data stored in a field may or may not be a date. The compiler cannot tell. It helps when identifiers for fields are meaningful names (like PAYROLL-DATE or DATE-HIRED-YYYY-MMM-DD), but this is not a language requirement. After all, the "convenient" short names PD and DH could just as easily have been specified for those two identifiers. Two-digit year formats used in controlling fields or as keys in indexed files (just two examples of pitfalls) can cause fatal program logic problems. Programmers are strongly urged to use four-digit years instead of two-digit years wherever sequential operations are driven by these values. COBOL programmers have access to two-digit year information through the Format 2 ACCEPT FROM (DAY/DATE) statement. The two-digit formats continue to be provided for necessary conformance to the ANSI Standard and for compatibility. The four-character formats are preferable; and Compaq COBOL provides them for ACCEPT (also in Format 2) as an extension. You can continue to use two-digit formats for 45 external displays of year information if you wish. It is in the internal program logic that they are dangerous. Compaq COBOL provides many four-digit year capabilities to assist programmers doing Y2K upgrades of COBOL applications while preserving, where needed, two-digit year support as specified in the ANSI-85 standard. Diagnostic support is available for detecting use of two-digit years in ACCEPT. Compaq COBOL also provides the four-digit year capabilities specified in the ANSI-89 standard addendum. Beyond the ANSI-89 four-digit year functions, Compaq COBOL provides additional ACCEPT support for four-digit years as specified in the ANSI-9x/200x draft standard. Support is also provided for five new Y2K functions as specified in the ANSI-9x/200x draft standard. Three of these five new functions implement a sliding window algorithm. ________________________ Note ________________________ Use of a Y2K-compliant version of Compaq COBOL does NOT guarantee a Y2K-compliant application. The final responsibility for insuring Y2K-compliance of a COBOL application rests with the COBOL application programmer who must appropriately use the four-digit year features provided in the language. ______________________________________________________ The table below summarizes the two-digit year and four- digit year support now available with Compaq COBOL. ANSI-85 standard - ACCEPT two-digit ACCEPT FROM DATE two-digit ACCEPT FROM DAY ANSI-89 standard addendum - functions four-digit FUNCTION CURRENT-DATE four-digit FUNCTION DATE-OF-INTEGER four-digit FUNCTION DAY-OF-INTEGER four-digit FUNCTION INTEGER-OF-DATE four-digit FUNCTION INTEGER-OF-DAY four-digit FUNCTION WHEN-COMPILED 46 ANSI-9x/200x draft standard - ACCEPT four-digit ACCEPT FROM DATE YYYYMMDD four-digit ACCEPT FROM DAY YYYYDDD two-digit ACCEPT FROM DATE - diagnostic two-digit ACCEPT FROM DAY - diagnostic ANSI-9x/200x draft standard - functions four-digit FUNCTION YEAR-TO-YYYY four-digit FUNCTION DATE-TO-YYYYMMDD four-digit FUNCTION DAY-TO-YYYYDDD four-digit FUNCTION TEST-DATE-YYYYMMDD four-digit FUNCTION TEST-DAY-YYYYDDD 2.15 Y2K Intrinsic Functions Compaq COBOL includes five intrinsic functions designed to assist you in coding Y2K programming solutions. They are: Date Conversion functions: FUNCTION YEAR-TO-YYYY FUNCTION DATE-TO-YYYYMMDD FUNCTION DAY-TO-YYYYDDD Date Testing functions: FUNCTION TEST-DATE-YYYYMMDD FUNCTION TEST-DAY-YYYYMMDD The date conversion functions are used for converting dates with two-digit year fields to dates with four-digit year fields. These functions use a sliding window or a fixed window algorithm to determine the century. Any windowing approach is recommended only for applications whose dates span less than 100 years. Windowing may be appropriate when a full conversion (including database, files, and so forth) to four-digit years is not possible or necessary. As always, your particular application requirements control what date manipulation approaches are best suited for your needs for Y2K and beyond. The date testing functions can be used to verify that date fields contain valid dates (with four-digit years) before you use them in further date processing (for example, as an argument to the INTEGER-OF-DATE function). 47 2.16 Stop with Status Compaq COBOL supports passing status back to the operating system for o RETURN-CODE o PROCEDURE DIVISION GIVING with o EXIT PROGRAM o STOP RUN Four of the data types supported by PROCEDURE DIVISION GIVING can be used in this new way. Here is a summary of what is now supported: RETURN-CODE (Alpha-only) EXIT PROGRAM /STA=V3 yes EXIT PROGRAM /STA=85 yes (except for Windows NT Alpha) STOP RUN yes PROCEDURE DIVISION GIVING EXIT PROGRAM /STA=V3 yes EXIT PROGRAM /STA=85 yes (except for Windows NT Alpha) STOP RUN yes (except for OpenVMS VAX) data types COMP-1,COMP-2 no PIC 9(04) COMP no PIC S9(04) COMP no PIC 9(09) COMP yes PIC S9(09) COMP yes PIC 9(18) COMP yes PIC S9(18) COMP yes PIC 9(31) COMP no PIC S9(31) COMP no In summary, some, but not all, of the PROCEDURE DIVISION GIVING data types can be used to communicate status to the operating system. This new support is still subject to the limitations on status handling imposed by the operating system. If PIC S9(18) COMP or PIC 9(18) COMP is used, the high-order 32 bits are truncated before the status is passed on to the operating system. 48 To display the operating system status information, do the following: [UNIX] echo $status [OpenVMS] show symbol $status [Windows NT Alpha] echo %errorlevel% Note that this support replaces the temporary /SWITCH=DC_ STOP_STATUS which is now obsolete. To get the supported behavior, uses of the temporary /SWITCH=DC_STOP_STATUS should be eliminated. 2.17 Automatic DISPLAY WITH CONVERSION DISPLAY of numeric data items no longer requires the WITH CONVERSION phrase if you compile with [OpenVMS] /DISPLAY_FORMATTED [UNIX] -display_formatted [Windows NT] /DISPLAY_FORMATTED Note that this replaces the previous qualifier /SWITCH=DC_ENABLE_AUTODWC /DISPLAY_FORMATTED supports the WITH CONVERSION syntax implicitly in COBOL DISPLAY statements for numeric data fields which contain non-printing values. The default, /NODISPLAY_FORMATTED, retains the behavior of not converting non-printing numeric values when they are displayed. 2.18 [OpenVMS] Initialization Using Literals from CDD The run-time performance of initialization of most values using figurative constants has been improved. This includes the initialization of fields from the CDD. Previously, with the V2.6 compiler, the compilation required /SWITCH=DC_CDD_INIT_LITERAL to obtain the improved performance. This qualifier is no longer required and no longer supported. 49 2.19 [OpenVMS] USAGE IS POINTER-64 OpenVMS Alpha V7.0 introduces the ability to dynamically allocate data in 64-bit address space. Compaq COBOL does not support data in 64-bit address space, but some limited use of it may be made. Compaq COBOL for OpenVMS Alpha allows a data item to be described as USAGE IS POINTER-64. This may be useful if you are interfacing with an application in another language that requires a 64-bit pointer. You can use the SET statement or a VALUE clause to assign the address of a static COBOL variable to the pointer variable. The pointer variable can then be passed to any routine whose interface definition requires a 64-bit pointer. You can also use an appropriate system service or the Run- Time Library routine LIB$GET_VM_64 to allocate data and store the address in the pointer variable. Because COBOL does not support dynamic allocation, there is no way to dereference the pointer and access the allocated data. However, you can pass the pointer to other languages that may require a 64-bit pointer in 64-bit address space. 2.20 [OpenVMS] SYS$CURRENCY Support For programs that do not specify the CURRENCY SIGN clause, an alternative to the default CURRENCY SIGN ($), may now be established without modifying the source program. The compiler will call LIB$CURRENCY which will retrieve the system or process currency sign. The process currency sign can be specified by defining the logical SYS$CURRENCY. If the CURRENCY SIGN clause does not appear in the SPECIAL- NAMES paragraph of the ENVIRONMENT DIVISION of the user's COBOL program, the user can either continue to accept the system default currency sign, or utilize the DCL logical name SYS$CURRENCY to specify a currency symbol for the COBOL program. Only the first character of the logical SYS$CURRENCY will be utilized as the program's currency sign. 50 At OpenVMS DCL command level, the user can either accept the value of the logical name SYS$CURRENCY (if defined) or define the SYS$CURRENCY logical as a quoted literal string containing up to 255 characters (of which only the first character is used by the Compaq COBOL compiler). Prior to compiling the COBOL program the user issues the OpenVMS DCL command: $ DEFINE SYS$CURRENCY "quoted-character-string" The COBOL compiler will utilize only the first character of this string as the currency symbol for the user's program. Subsequently, the system default value of the SYS$CURRENCY logical name can be restored for the process with the following DCL command: $ DEASSIGN SYS$CURRENCY Note: This enhancement is not utilized when /NATIONALITY=JAPAN is present on the compiler command line. 2.21 [Windows NT] Debugging Improvements Compaq COBOL includes debugging improvements related to handling of user names with upper/lower case and hyphens and underscores. Because both WINDBG and Visual Studio debuggers are based on C language constructs, variable evaluation is case sensitive with these debuggers. To assist in debugging Compaq COBOL programs that are case insensitive, COBOL has added a new compiler option that can help. This option does not create case sensitive variable names, but it may help users who consistently use one case or the other. /DEBUGCASE[:keyword] keyword(s): LOWERCASE,UPPERCASE default: /DEBUGCASE:UPPERCASE This option specifies mapping local variable names to uppercase or lowercase for debugger handling. For debugging in a C language environment, this option may help you if you consistently type your source code and debugger commands using one case or the other. WINDBG provides an "ignore case" option that is very useful for debugging COBOL programs. 51 If your source code variable names are entered in lowercase and you do not specify /DEBUGCASE:LOWERCASE, then the compiler upcases them when writing to the debugger symbol table. Attempts to evaluate those variables in the source window with highlighting will not be successful because those are always in lowercase. Variables entered in the watch window can be evaluated if the case used matches the case used in the debugger symbol table. Because both WINDBG and Visual Studio debuggers are based on C language constructs where a hyphen is not a valid character in a variable name, Compaq COBOL now converts hyphens to underscores for debugging purposes. This does not affect evaluation when highlighting a source code variable with a hyphen, but it will help when using a watch window or a command window evaluation. Simply substitute an underscore for every hyphen in the name to be evaluated. 2.22 [Windows NT] Visual Basic Examples Calling COBOL DLL The Compaq COBOL kit for Windows NT Alpha includes two examples showing how to call a COBOL DLL from Visual Basic. The files are located in: DISK1\Examples\VisualBasic and four subdirectories example1 example1_src example2 example2_src To install example1 run "setup.exe" in the example1 subdirectory and follow the instructions. The installed example, "call01", is run by clicking start -> programs -> call01 then following the instructions in the example. To uninstall example1, click start -> settings -> control panel -> Add/Remove Programs, and select "call01". See the README.TXT in the example1 subdirectory for more information. Example2 highlights argument passing between COBOL and Visual Basic. To install example2 run "setup.exe" in the example2 subdirectory and follow the instructions. The installed example, "call02", is run by clicking start -> 52 programs -> call02 then following the instructions in the example. To uninstall example2, click start -> settings -> control panel -> Add/Remove Programs, and select "call02". See the README.TXT in the example2 subdirectory for more information. 2.23 [Windows NT] ORGANIZATION INDEXED ISAM on Windows NT Alpha requires Sector 7 vxisam.dll. This file must be in your path to run Compaq COBOL programs with ORGANIZATION INDEXED. If you try to run a program with ISAM and vxisam.dll is not in your path, an error occurs when the RTL attempts to call one of the routines in vxisam.dll. You must order vxisam.dll from Sector 7. See the ordering information earlier in these release notes. ISAM support on Windows NT Alpha is similar to support on Tru64 UNIX. The following are known problems based on our testing with the 19-Dec-1997 vxisam.dll from Sector 7: o Creating a file with 255 keys causes an error. (254 keys work fine.) o Attempting to create a file with a file name containing too many characters (such that the full specification exceeds the maximum pathname allowed) causes an access violation instead of a proper diagnostic. o Opening a file with an empty .idx file causes a "file not found" error instead of a "corrupted file" error. o In a multi-user environment, when the first user has opened the file ALLOWING READERS, the file is not locked correctly. A subsequent user can WRITE to the file when an error should have been returned. Note that the compiler issues a diagnostic for the OPEN ALLOWING READERS limited support. o In an AUTOMATIC locking environment, a REWRITE does not release the current lock. An UNLOCK statement should be inserted. 53 2.24 [Windows NT] ACCEPT/DISPLAY Screen Handling ACCEPT/DISPLAY screen handling is supported on Windows NT Alpha with one exception: o BLINK (not planned for Windows NT Alpha) The following keyboards are recommended: o LK46W-A2 o PCXAL-AA o RT4958TW o RT6856T A separate window is created if your program includes any extended ACCEPT or extended DISPLAY statements. The separate window is used exclusively for all extended DISPLAY output and all extended ACCEPT input including X/Open SCREEN SECTION input and output. If your program in addition includes any non-extended ACCEPT or DISPLAY statements, that input and output is NOT done through the separate window. If you run a program with extended DISPLAY and redirect output to a file, the program will create (but not use) the extended ACCEPT/DISPLAY window unless you also redirect input from a file. Note that you need to redirect input from a file even if the program has no ACCEPT to avoid the creation of the extended ACCEPT/DISPLAY window. The dimensions and font size of the separate window can be controlled with the following three environment variables: o COBOL_SCREEN_LINES (defaults to 24) o COBOL_SCREEN_COLS (defaults to 80) o COBOL_SCREEN_FONTSIZE (defaults to 7) When typing in an editable field, in addition to using the control (CTRL) and arrow keys, you can use the following keys: o insert - toggles between insert and overstrike mode o home - moves the cursor to the beginning of the field o backspace - same as the "home" key 54 o end - moves the cursor to the end of the field o delete - deletes the previous character, and moves back one (this differs from the behavior in command-line editing, where it deletes the current character) In addition, you can use the following keys: o alphanumeric o non-alphanumeric o control (CTRL) o alternate (ALT) The characters whose ASCII values range from 65 to 90, and 97 to 122 are called alpha characters. The characters whose ASCII values range from 32 to 127, excluding the alpha characters, are called non-alpha characters. The following keys are not supported: o numeric keypad o function keys along the top of the keyboard 2.25 [Windows NT] Interactive Compiler Driver (ICD) The ICD installation has been integrated with the compiler /RTL installation. 55 3 Run-Time Library Notes The V2.7 Compaq COBOL Run-Time Library included with Compaq COBOL V2.7 provides new functionality, new documentation, and several bug fixes beyond Compaq COBOL V2.6. You must use this updated RTL if you use the V2.7 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 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. 56 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. 57 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: 58 (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 59 - 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. 60 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. 61 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. 62 4.3 Debugger Notes for Windows NT Alpha Compaq COBOL includes some support for two debuggers - WINDBG and Developer Studio. WINDBG is included with the Compaq COBOL kit. Following are some restrictions with debugging: o Certain uses of EXTERNAL result in a CVPACK warning during link (see more details in the Restrictions section). o COMP-3 and DISPLAY numerics are not supported. (COMP, COMP-1 and COMP-2 numeric items are generally supported). o Scaled binary (COMP) items are not supported. They do not display the decimal point. (for example, PIC 99V99 USAGE IS COMP VALUE 84.23 evaluates as 8423) o Unscaled binary (COMP) numerics with more than 18 digits are not supported. o Array evaluation is not supported. o User identifiers that include a hyphen are not fully supported. They are displayed with an underscore in the Local Variable window. To enter the name in a watch window, use an underscore instead of a hyphen. o In the watch window, all variables must be entered to match the /debugcase value (uppercase or lowercase). Uppercase is the default. o In the watch window, qualification must be done using "." (for example, GRP3.FLD1). o In the source window, evaluation by highlighting (if available in the debugger) is only supported for variables that are in the source code in the same case as the case specified with /DEBUGCASE (the default is /DEBUGCASE:UPPERCASE). o In general, you should utilize the WINDBG ignore case sensitivity option. o COB$USE is displayed as the name of the main program in the call stack when declaratives are present. 63 5 Documentation Notes 5.1 Documentation Changes and Updates ___________________________________________________________ Version______Description___________________________________ V2.7-1209 The Reference Manual and User Manual have been updated with new and corrected material through V2.7. V2.7-1209 The Reference Manual and User Manual are now available in HTML format. [Windows NT] The User Manual for Windows NT Alpha is available online in .PDF format only. V2.7-1209 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. 64 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 The DIGITAL COBOL Multiplatform Overview & Compatibility Guide covers Compaq COBOL on all four platforms. This manual in Adobe Acrobat- readable .PDF format is available on the COBOL web site for free download: http://www.openvms.compaq.com/commercial /cobol The manual is intended for COBOL programmers using any of the following platforms: o OpenVMS VAX o OpenVMS Alpha o Tru64 UNIX o Windows NT Alpha This manual (also referred to as the MPG) provides application developers, engineering and system managers, and COBOL users with information on: o Maintaining existing applications on their current platform(s) o Migrating chosen applications to a new platform The MPG includes an easy-to-reference summary of Compaq COBOL's capabilities for: o Developing, debugging, and maintaining COBOL programs o Compiling, linking, and running COBOL programs o Modifying the COBOL command The MPG is an immediate source for valuable programming information such as: o The ASCII and EBCDIC tables o A comparative table of COBOL command modifiers for all four platforms 65 ___________________________________________________________ Version______Description___________________________________ V2.7-1209 [Windows NT] The .PDF files of the Compaq COBOL Online Reference, the online Compaq COBOL User Manual for Windows NT Alpha and the online DIGITAL COBOL Multiplatform Overview & Compatibility Guide require Adobe Acrobat Reader. Adobe Acrobat Reader on Windows NT Alpha requires FX!32. Both Adobe Acrobat Reader and FX!32 V1.3A are included in the Compaq COBOL kit, but are not automatically installed. See Chapter 1 in Compaq COBOL User Manual for Windows NT Alpha for installation information. This manual is also included in hardcopy form with the development kit. Two versions of the online DIGITAL COBOL Multiplatform Overview & Compatibility Guide are included. One version has lower-resolution diagrams which load faster. V2.7-1209 [Windows NT] The documentation covers two features not available on Windows NT Alpha including: o ACCEPT/DISPLAY support for BLINK o Tape handling ___________________________________________________________ 5.2 [Windows NT] Adobe Acrobat Reader Information required to use Compaq COBOL on Windows NT Alpha is located in the hardcopy user manual. In addition to this book, we have provided the user manual in an Adobe Acrobat Portable Document Format (PDF) file. Technical reference material about Compaq COBOL is provided in a separate PDF file, the DIGITAL COBOL Online Reference. The Acrobat Reader provides you with the ability to read all Compaq COBOL documentation online while you are programming. With this reader you can: 66 o View pages in a variety of ways to find the most comfortable reading size and format o Cut and paste o Print a selected range, a page, a selected range of pages, or the entire manual o Easily access information in a related publication through direct links o Perform online searches as well as navigate easily with the table of contents bookmarks When you use the Acrobat Reader, most of the time your mouse cursor resembles a hand. Whenever the hand turns into a pointing finger, a mouse click takes you directly to the referenced information, whether it is in the manual file you have open or in another file. When you click on a Bookmark, the Reader jumps to the appropriate page. Arrowheads in the list of Bookmarks show where there is an additional level of detail available. Click on a right-pointing arrowhead to expand the pointer to show an additional level of detail. If you do not have a version of Adobe Acrobat Reader available, the Compaq COBOL kit includes one that you may install. If you choose to install it, you will also need to have FX!32 V1.3A or higher on your system. If you do not have FX!32 V1.3A or higher on your system, the Compaq COBOL kit includes V1.3A so you can to install it. See the Installation chapter in the Compaq COBOL User Manual for Windows NT Alpha for more information. 67 5.3 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.7. o DIGITAL COBOL Multiplatform Overview & Compatibility Guide (Unchanged for Version 2.7) Describes the compatibility features of the Compaq COBOL products across the four supported platforms. 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 User Manual for Windows NT Alpha Gives installation instructions and describes the development and run-time environment for the Compaq COBOL programmer working on Windows NT Alpha. o Compaq COBOL Online Help file The online Help file presents information on the Compaq COBOL command qualifiers and options. 68 [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 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. 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 DIGITAL COBOL DBMS Database Programming (Unchanged for Version 2.7) 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. 69 5.4 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 by one of the following methods: o Internet mail: LanguageDocs@compaq.com o FAX: 603-884-0120 Attn: Languages Documentation, ZKO2-3/K35 o A letter sent to the following address: Compaq Computer Corporation Languages Documentation, ZKO2-3/K35 110 Spit Brook Road Nashua, NH 03062-2698 USA 70 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 because of 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] COBOL /MATH_INTERMEDIATE=CIT4 [UNIX] cobol -math_intermediate cit4 [Windows NT] COBOL /MATH_INTERMEDIATE=CIT4 See section 2.2 for additional details on CIT4. 71 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 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. o If you are having trouble reading a SEQUENTIAL or RELATIVE file created on OpenVMS, try moving the file to Windows NT Alpha or Tru64 UNIX using FTP binary mode or ZIP. In addition, for RELATIVE files, you must specify no compression using the -0 option. 72 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 Windows NT Alpha or 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 or Windows NT Alpha 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 - 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 73 - 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 Appendix B in the Compaq COBOL User Manual for Windows NT Alpha and 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 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. 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. 74 o [OpenVMS] 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] 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. 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 and Windows NT Alpha. 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. 75 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 [Windows NT] VT100-compatible control sequences are not supported. 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. See the Compaq COBOL User Manual for Windows NT Alpha for additional details on floating point support. 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] If you get the following diagnostic at run- time %LIB-F-INVCLADTY, invalid class data type combination in descriptor 76 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] 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] 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] 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] 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. o [OpenVMS] 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] 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] If you are using /NATIONALITY=JAPAN, and you get the following at run-time %COB-F-BUG_CHECK, internal consistency check failure 77 make sure you have installed the V2.7 RTL. o [OpenVMS] 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. 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. [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") 78 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.7, you do not need this file. If you wish to run your programs with the Compaq COBOL RTL V2.7 without rebuilding the program, this file can be installed from the optional subset OSFOBSOLETE supplied with your Tru64 UNIX installation kit. o [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. o [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 [UNIX, Windows NT] 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. 79 - 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 [UNIX, Windows NT] 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. o [UNIX, Windows NT] F, D, and G floating are not supported on Tru64 UNIX and Windows NT. o [Windows NT] Sources lines after a non-printing character are ignored. o [Windows NT] If you are trying to run a program from OpenVMS and the file specifications in the ASSIGN clause and/or VALUE OF ID clause contain an OpenVMS logical, the Compaq COBOL RTL will attempt to translate it to a Windows NT environment variable, so no source changes will be required. For example, if you use the following statement: SELECT PAYROLL-FILE ASSIGN TO "PAYDIR2:PAYFILE.DAT" on Windows NT Alpha you can define an environment variable to indicate the device and directory where PAYFILE.DAT resides as follows: set PAYDIR2=c:\proj\pay\data2\ 80 When the program is run, the resultant file specification for which the OPEN will be attempted is c:\proj\pay\data2\PAYFILE.DAT. If PAYDIR2 is not defined as an environment variable, the results of the OPEN are undefined. o [Windows NT] If you get cobrtl: severe: access violation and you are using COBOL /LINK, make sure that all files which include COBOL modules are specified before /LINK. o [Windows NT] If you are unable to cut and paste the Interactive Compiler Driver command line to/from a DOS command window, do the following: 1. Right mouse click on the title bar of the DOS command window 2. Select Properties 3. Select Quick Edit Mode 81 7 Compaq COBOL Compatibility Matrix Legend x = Available today N = Not supported P = Partial support ___________________________________________________________ Formerly VAX Formerly DEC COBOL COBOL ______________________ Windows OpenVMS OpenVMS Tru64 NT VAX Alpha UNIX Alpha __________________________________V5.7____V2.7____V2.7____V2.7 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 Tape handling x x x N Segmented keys x x x x /CHECK=DUPLICATE_KEYS x x N N Relaxed key checking N N x x RMS special registers x x N N RMS APPLY extensions x x N N /STANDARD=V3 x P P P ANSI-74 FILE STATUS support x x x x VFU x N N N Print control files with VFC x x N N Print control files without VFC N x x x ISAM READ PRIOR/START LESS N x x x Extended ACCEPT/DISPLAY x x x x ACCEPT/DISPLAY BLINK x x x N ACCEPT/DISPLAY WITH CONVERSION x x x x ACCEPT/DISPLAY VT52 support x N N N 82 ___________________________________________________________ Formerly VAX Formerly DEC COBOL COBOL ______________________ Windows OpenVMS OpenVMS Tru64 NT VAX Alpha UNIX Alpha __________________________________V5.7____V2.7____V2.7____V2.7 ACCEPT/DISPLAY VT{1,2,3,4}xx x x x N support ACCEPT support for four-digit x x x x years New Y2K intrinsic functions x x x x File sharing / record locking x x P P UCX/NFS support (nolocking) N N x x FUNCTION ARGCOUNT x x N 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 N N G floating N x N N IEEE S,T floating N x x x Floating point "E" literal x x x x 64-bit pointers N P x N SYS$CURRENCY x x N N Invalid decimal data checking P P P P X/Open RETURN-CODE N x x x X/Open COMP-5/COMP-X N x x x 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 SCREEN SECTION color N x x x X/Open SCREEN SECTION BLINK N x x N X/Open DISPLAY ON EXCEPTION N x x x 83 ___________________________________________________________ Formerly VAX Formerly DEC COBOL COBOL ______________________ Windows OpenVMS OpenVMS Tru64 NT VAX Alpha UNIX Alpha __________________________________V5.7____V2.7____V2.7____V2.7 X/Open file sharing / rec N x x x locking X/Open environment variables N x x x 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 generation / x x x x optimization /[NO]SEPARATE_COMPILATION P x N N I18N (PIC N, etc.) x x x x CALL USING BY DESCRIPTOR x x N N cobfunc, cobcall, and cobcancel N x x x Reformat x x x x Terminal source format x x x x Lowercase, -/_ in source x x x x Sample Application - Client N N N x /Server Sample Applications - Visual N N N x Basic calling COBOL Oracle CDD/DML support x x N N Transarc Encina (-tps) support N N x N DECset PCA,LSE/SCA support x x N N DECset PDF support x N N N FUSE support N N x N Interactive compiler driver N N N x Symbolic debugger support x x x x 84 ___________________________________________________________ Formerly VAX Formerly DEC COBOL COBOL ______________________ Windows OpenVMS OpenVMS Tru64 NT VAX Alpha UNIX Alpha __________________________________V5.7____V2.7____V2.7____V2.7 Common command line for OpenVMS x x N N ___________________________________________________________ 85 8 Providing Product Feedback If you have comments, suggestions, or questions about Compaq COBOL on Alpha or Compaq COBOL for OpenVMS VAX, or if you are interested in signing up to field test a future version of Compaq COBOL on Alpha or Compaq COBOL for OpenVMS VAX, use the following URL to determine the current addresses for Internet mail access: http://www.openvms.compaq.com/commercial/cobol Also use this URL for general information about Compaq COBOL. We are interested in your feedback both on the capabilities of Compaq COBOL V2.7 and on future capabilities you would like to see in Compaq COBOL. When reporting a problem to Compaq, 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. 86