Lexical operator for extracting a range of characters from a
string of characters.
Format
%EXTRACT (integer1,integer2,string)
1 – Arguments
integer1
The first argument, of type integer, is the offset at which to
begin the extraction. The first character is at offset 0.
integer2
The second argument, of type integer, is the number of characters
to extract.
string
The third argument, of type string, is the string from which to
extract the characters.
2 – Description
%EXTRACT is modeled after VAX MACRO's %EXTRACT macro string
operator and the OpenVMS DCL lexical function F$EXTRACT. %EXTRACT
is used to extract a specified range of characters from a string.
3 – Example
.PRINT "%EXTRACT(3,4,ABCDEFGHIJKLMNOP)"
After lexical processing, the statement appears as:
.PRINT "DEFG"