Script functions reference > Script functions in alphabetical order > M > MatchPos

MatchPos
Syntax
MatchPos(num_pos, num_length);
num_pos 
num_length 
Description
Returns the content of the data from position num_1 with the length num_2. Only available within scripts in StreamIN description files.
Returns
A string containing the contents of the specified position.
Example
From a FieldIN Description file (*.dsc):
SCRIPTFIELD
{
if(strrblk(matchpos(12,41-12))=""){
if(strrblk(matchpos(42,172-42))="")
return strrblk(matchpos(2,8));
else
return strrblk(matchpos(2,8))+"_"+strrblk(matchpos
(42,172-42));
}
if (strrblk(matchpos(42,172-42))="")
return
strrblk(matchpos(2,8))+"_"+strrblk(matchpos(12,41-12));
else
return strrblk(matchpos(2,8))+"_"+strrblk
(matchpos(12,41-12))+"_"+strrblk(matchpos(42,172-42));
}
OpenText StreamServe 5.6 Updated: 2013-03-01