Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

6.2.37.6 Data Flow



When the STRING statement is executed, data is transferred from the sending fields to the receiving field. The order in which sending fields are processed is the order in which they are specified. The following rules apply:

Note: Subscript, reference modification, variable-length or variable location calculations, and function evaluations are performed only once, at the beginning of the execution of the STRING statement. Therefore, if identifier-3 or identifier-4 is used as a subscript, reference-modifier, or function argument in the STRING statement, or affects the length or location of any of the identifiers in the STRING statement, these values are determined at the beginning of the STRING statement, and are not affected by any results of the STRING statement.

After STRING statement execution is 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 this execution of the STRING statement.

When the following STRING statement is executed, the results obtained will be like those illustrated in Figure 18.


     STRING ID-1 ID-2 DELIMITED BY ID-3
            ID-4 ID-5 DELIMITED BY SIZE
       INTO ID-7 WITH POINTER ID-8
     END-STRING



ID_1 at execution ID_2 at execution ID_4 at execution ID_5 at execution __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ | 1| 2| 3| *| 4| 5| | A| *| B| C| | 6| 7| 8| 9| *| 0| | D| E| *| F| G| |__|__|__|__|__|__| |__|__|__|__| |__|__|__|__|__|__| |__|__|__|__|__| |___ ____| |_ | |________ ________| |_______ ______| First group of Second group of Third group of Fourth group of characters moved characters moved characters moved characters moved | | | |_____________ | ________________| | | | | __________________| ID_3 | | | | (delimiter)     at execution ________ __ _________________ ______________ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ | *| | 1| 2| 3| A| 6| 7| 8| 9| *| 0| D| E| *| F| G| Z| Z| Z| Z| Z| Z| |__| |__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__| ID_7 after execution (initialized to ALL Z before execution)

ID_8 (pointer) after execution __ __ | 1| 6| |__|__| (initialized to 01 before execution)


Figure 18. STRING Statement Execution Results



Previous Topic Next Topic © Copyright IBM Corp. 1991, 1998

IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.





Return to library:   z/OS | z/OS.e | TPF | z/VSE | z/VM | IBM Hardware | IBM System z Redbooks
Glossary:   IBM terminology
Publications:   How to order publications
Readers:   Download IBM Library Reader | Download IBM Softcopy Reader | Download Adobe® Acrobat® Reader®
Library management:   Download IBM Softcopy Librarian
Contacts:   Contact z/OS


Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.