The following picture transfers five characters from the source to the destination:
PICTURE NUM (ZZZZ9)
The first four characters are transferred with leading zero replacement; that is, leading zeros are transferred to the destination as the zero character, which is a blank character by default. The fifth character is not replaced by the zero character. If the source and destination are EBCDIC, digits are transferred as digits, but other characters have their zone field replaced by 4"F", turning them into digits. If the source and destination are hexadecimal, only the numeric field of the zero character is transferred to replace leading zeros. The following table gives some sample results of this picture:
|
Source |
Destination |
|
8"00000" |
8" 0" |
|
8"00500" |
8" 500" |
|
8"00356" |
8" 356" |
|
8"0ABCD" |
8" 1234" |
|
4"00000" |
4"00000" |
|
4"00500" |
4"00500" |
|
4"00356" |
4"00356" |
|
4"0ABCD" |
4"0ABCD" |
The following picture transfers nine characters from the source to the destination and inserts one character into the destination, yielding 10 characters in the destination:
PICTURE USECS (ZZZI999999)
The first three characters from the source are transferred to the destination with leading zero replacement. Then the insert character, which is a period (.) by default, is inserted into the destination. Six characters are then transferred from the source to the destination with no leading zero replacement. The following table gives some sample results of this picture.
|
Source |
Destination |
|
8"000000000" |
8".000000" |
|
8"356000012" |
8"356.000012" |
|
8"005123400" |
8" 5.123400" |
|
8"150000376" |
8"150.000376" |
The following picture transfers six characters from the source:
PICTURE TIMENOW (N: " " 9(2) I 9(2) I 9(2))
The introduction code N causes the insert character to be the colon (:). The string literal " " causes the blank character to be inserted into the destination. The first and second source characters are transferred to the destination without leading zero replacement, the insert character is inserted into the destination, the third and fourth source characters are transferred to the destination, the insert character is inserted, and the fifth and sixth source characters are transferred to the destination. The destination receives a total of nine characters.
The following table gives some sample results of this picture:
|
Source |
Destination |
|
8"000000" |
8" 00:00:00" |
|
8"123456" |
8" 12:34:56" |
|
8"000523" |
8" 00:05:23" |
|
8"150007" |
8" 15:00:07" |
The following picture transfers 11 characters from the source to the destination, formatting the information into a table:
PICTURE TABLE ("1983 = " F(4) X(2) "1984 = ":F(4) X(2)
"CHANGE = ":E(3) "%")First, the string 1983 = is inserted into the destination. Then four characters are transferred from the source to the destination, with leading zero replacement and a dollar sign ($) inserted in front of the first nonzero character. Then the destination pointer is advanced two characters, and the string 1984 = is inserted into the destination. The colon (:) control character causes leading zero replacement to be restored. Four characters are transferred from the source to the destination with leading zero replacement and a dollar sign ($) inserted in front of the first nonzero character. The destination pointer is advanced two characters, and the string CHANGE = is inserted into the destination. Again, the colon is used to restore leading zero replacement. Then three characters are transferred from the source to the destination with leading zero replacement and a plus sign (+) or a minus sign (–) inserted in front of the first nonzero character, depending on the value of EXTF. Finally, the string % is inserted into the destination. A total of 42 destination characters are produced by this picture.
The following table gives some sample results of this picture. In the table, it is assumed that the destination area was filled with blanks before the picture was used, and that EXTF was properly set up to reflect the sign of the change value.
|
Source |
Destination |
|
8"00035000420020" |
8"1983 = $35 1984 = $42 CHANGE = +20%" |
|
8"00110003680235" |
8"1983 = $110 1984 = $368 CHANGE = +235%" |
|
8"02246021060006" |
8"1983 = $2246 1984 = $2106 CHANGE = -6%" |
|
8"00089000350061" |
8"1983 = $89 1984 = $35 CHANGE = -61%" |

