The STRING statement strings together the partial or complete contents of two or more data items or literals into one single data item.
One STRING statement can be written instead of a series of MOVE statements.
STRING Statement - Format
>>-STRING------------------------------------------------------->
.-----------------------------------------------------------.
| .------------------. |
V V | |
>------+-identifier-1-+-+--DELIMITED--+----+--+-identifier-2-+-+-->
'-literal-1----' '-BY-' +-literal-2----+
'-SIZE---------'
>--INTO--identifier-3--+---------------------------------+------>
'-+------+--POINTER--identifier-4-'
'-WITH-'
>--+------------------------------------------+----------------->
'-+----+--OVERFLOW--imperative-statement-1-'
'-ON-'
>--+-----------------------------------------------+------------>
'-NOT--+----+--OVERFLOW--imperative-statement-2-'
'-ON-'
>--+------------+----------------------------------------------><
'-END-STRING-'
+-------------------------------IBM Extension--------------------------------+
+----------------------------End of IBM Extension----------------------------+
+-------------------------------IBM Extension--------------------------------+
If one of identifier-1, identifier-2, or identifier-3 is a DBCS data item, then all of them must be DBCS data items and all literals must be DBCS literals.
If one of literal-1 or literal-2 is a DBCS literal, then they must both be DBCS literals and identifier-1 through identifier-3 must be DBCS data items.
SPACE is the only figurative constant allowed for DBCS items.
+----------------------------End of IBM Extension----------------------------+
Related Information:
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.