How do you convert a CHAR to Numeric in easytrieve?

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.

Improve Answer Discuss the question "How do you convert a CHAR to Numeric in easytrieve?" Watch Question

First answer by ID1199405195. Last edit by Soy power. Contributor trust: 6 [recommend contributor]. Question popularity: 8 [recommend question]

Research your answer:

Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Programming > How do you convert a CHAR to Numeric in easytrieve?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
Numeric function in mainframe?