COBOL/400 Language Help


UNSTRING Statement

Description
The UNSTRING statement causes contiguous data in a sending field to be separated and placed into multiple receiving fields. You can use one UNSTRING statement instead of multiple MOVE statements. All subscripting and reference modification is performed only once, at the beginning of the execution of the UNSTRING statement. (Click here for information about reference modification.)
 ->->--UNSTRING identifier-1------------------------------->
 
 ->--*---------------------------------------------------->1
    *-DELIMITED--*----*--*-----*-*-identifier-2-*-------->2
                 *-BY-*  *-ALL-* *-literal-1----*
 
1->---------------------------------*--------------------->
2->--*----------------------------*-*
    +                            +
    + *-------------------------*+
    + V                         ++
    *-OR*-----*-*-identifier-3--**
        *-ALL-* *-literal-2-----*
 
           *--------------------------------------------<-3
           V
 ->--INTO---identifier-4-*------------------------------*->4
                        *-DELIMITER--*--*-identifier-5-*
                                     *IN*
 
3<-------------------------------*
                                +
4->--*---------------------------*------------------------>
    *-COUNT-*----*-identifier-6-*
            *-IN-*
 
 ->--*-------------------------------*-------------------->
    *-*------*-POINTER identifier-7-*
      *-WITH-*
 
 ->--*------------------------------*--------------------->
    *-TALLYING-*----*-identifier-8-*
               *-IN-*
 ->--*-----------------------------------------*---------->
    *--*----*-OVERFLOW imperative-statement-1-*
       *-ON-*
 
 ->--*--------------------------------------------*------->
    *-NOT-*----*-OVERFLOW imperative-statement-2-*
          *-ON-*
 
 ->--*--------------*-------------------------------------><-
    *-END-UNSTRING-*


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