Microsoft KB Archive/40151

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 19:22, 12 August 2020 by X010 (talk | contribs) (X010 moved page Microsoft KB Archive/Q40151 to Microsoft KB Archive/40151 without leaving a redirect: Text replacement - "Microsoft KB Archive/Q" to "Microsoft KB Archive/")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

MOVE ‘0’ and MOVE ZERO into Field with PIC X(8) Are Different

PSS ID Number: Q40151 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: The results of using the Microsoft COBOL Version 3.0 or 3.0a MOVE statement to move the character ‘0’ into a field are different for alphanumeric fields than for numeric fields. Some examples are shown below. The standard formats for this example are as follows: MOVE 0 TO field-1. MOVE ‘0’ TO field-1. MOVE ZERO TO field-1. The output would be as follows: MOVE Field-1 PICTURE Results 0 or ‘0’ PIC X(3) 0 0 or ‘0’ PIC 9(3) 000 ZERO or ZEROS PIC X(3) or PIC 9(3) 000 Microsoft COBOL Versions 2.0, 2.1, 2.2, 3.0, and 3.0a produce the same results.

Additional reference words: 3.00 3.00a Copyright Microsoft Corporation 1993.