You need to redefine the char field either in W/S or where it is defined in the input file. If you redefine a char field to numeric you should do a numeric test on the field before using it as numeric, otherwise your may abend with a S0C7. Yea, that's the hard way to do it above... This is one of the most common Easytrieve questions I encounter in the field. There is a macro that is shipped from CA called ALHPACON. You send it an alpha field and it returns a numeric. %ALHPACON ALPHA-FIELD NUMERIC-FIELD Ask your systems programmer to look for the shipped macros if it is not in your maclib.
Chat with our AI personalities
IF WS-AGE NUMERIC DISPLAY "NUMERIC" ELSE DISPLAY "NOT NUMERIC' END-IF
There are a couple of different ways to convert upper case characters to lower case in easytrieve. One is to use the INSPECT/CONVERTING command.
You can't convert the data type of any variable.
your wish
no