5.3.11.3.2 Numeric Items
Types of numeric items are:
- Binary
- Packed decimal (internal decimal)
- Zoned decimal (external decimal)
The PICTURE character-string can contain only the symbols 9, P, S, and V.
X For numeric date fields, the PICTURE character-string can contain only the
X symbols 9 and S.
The number of digit positions must range from 1 through 18, inclusive.
X For numeric date fields, the number of digit positions must match the
X number of characters specified by the DATE FORMAT clause.
If unsigned, the contents of the item in standard data format must contain
a combination of the Arabic numerals 0-9. If signed, it may also contain
a +, -, or other representation of the operational sign.
Examples of Valid Ranges
PICTURE Valid Range of Values
9999 0 through 9999
S99 -99 through +99
S999V9 -999.9 through +999.9
PPP999 0 through .000999
S999PPP -1000 through -999000 and
+1000 through +999000 or zero
Other Clauses: The USAGE of the item can be DISPLAY, BINARY,
X COMPUTATIONAL, PACKED-DECIMAL, COMPUTATIONAL-3, COMPUTATIONAL-4, or
X COMPUTATIONAL-5.
A VALUE clause can specify a figurative constant ZERO.
A VALUE clause associated with an elementary numeric item must specify a
numeric literal or the figurative constant ZERO. A VALUE clause
associated with a group item consisting of elementary numeric items must
specify a nonnumeric literal or a figurative constant, because the group
is considered alphanumeric. In both cases, the literal is treated exactly
as specified; no editing is performed.
X The NUMPROC, TRUNC, and BINARY compiler options can affect the use of
X numeric data items. For details, see the IBM COBOL Programming Guide for
X your platform. (Note, the BINARY compiler option is only applicable to
X OS/2 and Windows programs.)
© Copyright IBM Corp. 1991, 1998
IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.
Return to library:
z/OS |
z/OS.e |
TPF |
z/VSE |
z/VM |
IBM Hardware |
IBM System z Redbooks
Glossary:
IBM terminology
Publications:
How to order publications
Readers:
Download IBM Library Reader |
Download IBM Softcopy Reader |
Download Adobe® Acrobat® Reader®
Library management:
Download IBM Softcopy Librarian
Contacts:
Contact z/OS
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks
of Adobe Systems incorporated.