Script functions reference > Script functions in alphabetical order > G > GetSegment

GetSegment
Syntax
GetSegment();
Description
Returns the current segment number. This is the same number that replaces the %{SEGMENT} variable in the output file name. The function can only be used if you have defined an enveloping machine. See the Document sorting and bundling documentation.
Returns
A number specifying the current segment.
Example
$segment = getSegment();
OpenText StreamServe 5.6 Updated: 2013-03-01