COBOL/400 Language Help


STRING Statement

Description
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 replace a series of MOVE statements. When the STRING statement is executed, data is transferred from the sending field to the receiving field. Any subscripting and reference modification is performed only once, at the beginning of the execution of the STRING statement. (Click here for information about reference modification.)

After the STRING statement has completed, only that part of the receiving field into which data was transferred is changed. The rest of the receiving field contains the data that was present before executing the STRING statement.

             *-------------------------------------------<-1
             *--------------*
             V              +
 ->->--STRING--*-identifier-1-*-DELIMITED--*----*----------->2
             *-literal-1----*            *-BY-*
 
1<--------------------*
                     +
                     +
2->--*-identifier-2-*-*--INTO identifier-3----------------->
    *-literal-2----*
    *-SIZE---------*
 
 
 ->--*--------------------------------*-------------------->
    *-*------*--POINTER identifier-4-*
      *-WITH-*
 
 ->--*-----------------------------------------*----------->
    *--*----*-OVERFLOW imperative-statement-1-*
       *-ON-*
 
 ->--*---------------------------------------------*------->
    *-NOT--*----*-OVERFLOW imperative-statement-2-*
           *-ON-*
 
 ->--*------------*----------------------------------------><-
    *-END-STRING-*
 


[ Top of Page | Previous Page | Next Page | Table of Contents ]