How do you convert a CHAR to Numeric in easytrieve? |
[Edit] |
EZTP char to numeric translation
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.
First answer by ID1199405195. Last edit by Soy power. Contributor trust: 6 [recommend contributor]. Question popularity: 8 [recommend question]
|
Research your answer: |



