Previous Topic

Next Topic

Book Contents

Book Index

%%$SUBSTR

The %%$SUBSTR function extracts a substring from the input string. The valid format is

%%$SUBSTR strng startpos len

In this format

A string is returned composed of the specified number of characters from the input string beginning with the character in the specified starting position.

startpos and len must be numbers (or numeric AutoEdit expressions) and greater than zero.

Example

DO SET=%%A = %%$CALCDATE %%$RDATE -1

DO SET=%%AMON = %%$SUBSTR %%A 3 2

On December 1, 2000:

DO SET=%%A = 001130

DO SET=%%AMON = 11

Parent Topic

Functions