The PICTURE declaration declares pictures that are used in REPLACE statements to perform general editing of characters.
<picture declaration>
┌◄──────────────── , ───────────────┐ ── PICTURE ─┴─<identifier>── ( ──<picture>── ) ─┴──────────────────────┤
<picture identifier>
An identifier that is associated with a picture in a PICTURE declaration.
<picture>
┌◄─────────────────┐ ──┴─<picture symbol>─┴─────────────────────────────────────────────────┤
<picture symbol>
──┬─<string literal>──────────────────────────┬────────────────────────┤
├─<introduction>────────────────────────────┤
├─<picture skip>─┬──────────────────────────┤
│ └─<repeat part value>──────┤
├─<control character>───────────────────────┤
├─<single picture character>────────────────┤
└─<picture character>─┬─────────────────────┤
└─<repeat part value>─┘
A picture is used in a REPLACE statement to perform generalized editing functions as characters are transferred from a source location to a destination. The following editing operations can be performed:
-
Unconditional character moves
-
Moves of characters with leading 0 (zero) editing
-
Moves of characters with leading 0 (zero) editing and floating character insertion
-
Moves of characters with conditional character insertion
-
Moves of characters with unconditional character insertion
-
Moves of only the numeric parts of characters
-
Forward and reverse skips of source characters
-
Forward skips of destination characters
-
Insertion of a zone field on the previous character
A picture consists of a named string of picture symbols enclosed in parentheses. The picture symbols specify the editing to be performed and can be combined in any order to perform a wide range of editing functions.
One value array, also called an edit table, is generated for each PICTURE declaration; therefore, for run-time efficiency, all pictures should be collected under a single PICTURE declaration.

