Notes:
Numeric variables are created by the CALC command. To increment a numeric variable, use the CALC command, for example: CALC %x = %x + 1
String variables are created by all of the other commands that create variables, such as SET, FETCH, PROMPT, etc. String variables that have numeric value in the low-order positions can be incremented with the INC command, for example:
INC %xx
increments the value in the string variable %XX by one.
At least the last position of the string variable must be numeric. For instance
SET %xxx = 'AAA3'
INC %xxx
The SET establishes the value in %xxx as AAA3. The INC increments it, so the new value is AAA4.
If you expect the increment to carry over to the adjacent column, then at least the last two characters in the string variable must be numeric, and so on.
AAAA9 does not increment to 10
AAAA09 does increment to 10
You can initialize a string variable with all numeric characters, such as: