The ISO COBOL specification FAQ / DCD "Pictures"

Rohit Khare (
Tue, 06 Oct 1998 00:02:44 -0700

[The Document Content Description effort swipes enough of XML-Data to
confuse everything by mixing in yet newer constructs. Or older ones: they
added "picture" constraints to strings. From COBOL.

Yes, you too can now attempt to restrict XML text to string matching like
NNN.NNN for fixed and so on.]

[the entire FAQ follows]

Q: What is COBOL?
A: COBOL is a programming language. The ISO standard number is ISO 1989.

[Now, it's funny, but it's understandable. SC22 isn't too experienced at
this sharing information thing, much less over the Web. Check out the
template for the PROTO language: ]

[herewith, the DCD usage: ]

"Pictures", similar to those in [COBOL] picture clauses, can be used to
constrain the format of strings and in some cases control their conversion
to numbers. A picture is an alphanumeric string consisting of character
symbols. Each symbol, which is usually one character but may be two
characters, is a placeholder that stands for a set of characters. For
example, the picture "A" stands for a single alphabetic character.
The following is a list of picture symbols and their meanings. A
A single alphabetic character.
A single blank character.
The character E, used to indicate floating point numbers.
The leftmost character of a picture indicating a signed number. The
characters "+" or "-" may appear in the S position.
An implied decimal sign. The input 1234 validated by a picture 99V99 is
converted into 12.34.
Any character.
The leftmost leading numeric character that can be replaced by a space
character when the content of that content position is a zero.
Any numeric character.
Any boolean character (0 or 1).
0,/,-,., and ,
represent themselves.
The currency symbol.

Here are some examples of picture constraints