+-------------------------------IBM Extension--------------------------------+
The LIKE clause allows you to define the PICTURE, USAGE, SIGN, and FORMAT characteristics of a data item by copying them from a previously defined data item. It also allows you to make the length of the data item you define different from the length of the original item.
LIKE Clause - Format
(1)
>>-LIKE-------data-name-1--+-----------+-----------------------><
'-(integer)-'
Notes:
It can be signed.
If a blank or a + precedes the integer, the new item is longer. If a - precedes the integer, the new item is shorter.
You cannot use the integer option to:
Note that an item whose attributes include BLANK WHEN ZERO is treated as an edited item.
The LIKE clause causes the new data item to inherit specific characteristics from the existing data item. These characteristics are the PICTURE, USAGE, SIGN, BLANK WHEN ZERO, and FORMAT attributes of the existing item.
The compiler generates comments to identify the characteristics of the new item. These comments appear after the statement containing the LIKE clause.
Note that the default USAGE IS DISPLAY and SIGN IS TRAILING characteristics do not print as comments.
The FORMAT characteristics that can be inherited include:
Related Information:
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.