Microsoft KB Archive/40043
Signed Numeric Fields DISPLAY with Non-Numeric Characters
PSS ID Number: Q40043 Article last modified on 04-20-1993
3.00 3.00a | 3.00 3.00a MS-DOS | OS/2
|The information in this article applies to:|
|- Microsoft COBOL for MS-DOS and OS/2, versions 3.0 and 3.0a|
Summary: When porting Microsoft COBOL Versions 2.0, 2.1, and 2.2 programs to Versions 3.0 and 3.0a, it is necessary to use the MS(2) dialect directive to read rebuilt ISAM files containing signed numeric fields. If the MS(2) directive is not used, fields with a PICture clause, such as PIC S99v99, will incorrectly be DISPLAYed. The resulting output will DISPLAY the last digit as a non-numeric character.
More Information: It is the SIGN“EBCDIC” directive that is enabled by the MS(2) directive that allows Versions 3.0 and 3.0a to correctly interpret the sign that is stored with the number. Follow the steps below with Version 3.0 or 3.0a REBUILD.EXE to port Microsoft COBOL Versions 2.0, 2.1, and 2.2 programs that use ISAM files to the new format: 1. Rebuild the Version 2.0, 2.1, or 2.2 ISAM data file to create new key and data files that will use the Version 3.0 and 3.0a format. 2. Recompile your programs with Versions 3.0 or 3.0a. Be sure to use the MS(2) dialect directive. If you specified Microsoft Version 2.2 compatibility when installing COBOL and you choose to have the COBOL.DIR file created, the proper directives will be placed in it.
Additional reference words: 3.00 3.00a Copyright Microsoft Corporation 1993.