Previous Topic: Define Variable with a SET StatementNext Topic: Position the Cursor


Define Variable for Uppercase Data

You can specify a variable with the UPCHAR attribute and use that variable to convert data to uppercase. For example, the following program converts the lower case data contained in a variable to uppercase:

VDEFINE LOWERVAR,10
VDEFINE UPPERVAR,10,TYPE=UPCHAR
SET LOWERVAR,'lower case'
KEY 'Value = &LOWERVAR'
INPUT
CLEAR
SET UPPERVAR,&LOWERVAR
SET LOWERVAR,&UPPERVAR
KEY 'Value = &LOWERVAR'
INPUT
CLEAR