REPOSITION

How to:

Reference:

For a specified segment and each of its descendants, the REPOSITION command resets the current position to the beginning of that segment's chain. That is, each segment is reset to just prior to the first instance.

Most data source commands change the current segment position to the instance that they most recently accessed. When you wish to search an entire data source or path for records, starting at the beginning of the data source or path by first issuing the REPOSITION command is recommended.


Top of page

x
Syntax: How to Use the REPOSITION Command

The syntax of the REPOSITION command is

REPOSITION segment_spec [;]

where:

segment_spec

Is the name of a segment or the name of a field in a segment. The specified segment and all of its descendants are repositioned to the beginning of the segment chain.

;

Terminates the command. Although the semicolon is optional, you should include it to allow for flexible syntax and better processing. For more information about the benefits of including the semicolon, see Terminating a Command's Syntax.



Example: Using REPOSITION

The following example repositions the root segment and all of the descendant segments of the Employee data source:

REPOSITION Emp_ID;

The next example repositions both the SalInfo and Deduct segments in the Employee data source:

REPOSITION Pay_Date;

Top of page

x
Reference: Commands Related to REPOSITION

Information Builders