Google is your friend:
http://forums.systeminetwork.com/isnetforums/showthread.php?t=45982

This error ("A domain error in a math function occurred") means that
the input data isn't valid hex characters, and therefore cannot be
converted.

In order to supply valid hex characters to the cvtch() function, the
source ("Src" in your prototype) must consist of:

* Each byte must contain an EBCDIC character containing 0-9 or -A-F.
* A-F must be in uppercase.


Note the last requirement.

HTH,
Charles


On Thu, Apr 15, 2010 at 11:32 PM, Dennis Lovelady <iseries@xxxxxxxxxxxx> wrote:
Folks, I have posted code at http://code.midrange.com/6d4d39e9e7.html that
is intended to exercise the cvtch procedure (to convert hex characters to
the binary data they represent).



I have struggled with this instruction time and again over the years, and
always end up writing my own.  I was inspired and encouraged by Scott's
example here http://archive.midrange.com/rpg400-l/200205/msg00309.html - and
that does work great without changes on this system.  However, my code does
not, and I don't see gaping differences, aside from the length of the
buffers and so on.


(Note, there was much more to this program than what you see... but I have
stripped it down to this minimum-failing module in order to support the
debugging process.



The error experienced when running this on a V5R3 system occurs when
executing the cvtch() function:



Message ID . . . . . . :   C2M3001       Severity . . . . . . . :   30

Message type . . . . . :   Diagnostic

Date sent  . . . . . . :   04/16/10      Time sent  . . . . . . :   05:18:22



Message . . . . :   A domain error in a math function occurred.

Cause . . . . . :   An input argument is outside the domain for which the

 mathematical function is defined.

Recovery  . . . :   Supply input values that are consistent with the

 mathematical definition of the function.



Would someone please enlighten me as to why I struggle so with this one?
Stragely enough, I never have such issues with cvthc.  Go figure.



Dennis E. Lovelady
AIM/Skype: delovelady      MSN: fastcounter@xxxxxxxxxxxx
 <http://www.linkedin.com/in/dennislovelady>
www.linkedin.com/in/dennislovelady --
If you lined up all the cars in the world end to end, someone would be
stupid enough to try to pass them, five or six at a time, on a hill, in the
fog.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.