|
Bill,
You can try this in your CL, I believe it will work.....unless I am not
understanding what you are trying to do.
/* */
/* --------- Define program file(s) and variable(s). --------------- */
/* */
DCL VAR(&CHAR ) TYPE(*CHAR) LEN( 11)
<----------this is your incoming
DCL VAR(&NUM155 ) TYPE(*DEC ) LEN(15 5)
DCL VAR(&NUMBER ) TYPE(*DEC ) LEN( 7 2)
/* */
/* --------- Change character value to a 15,5 and then to 7,2 ------ */
/* */
CHGVAR VAR(&NUM155 ) VALUE(&CHAR )
CHGVAR VAR(&NUMBER ) VALUE(&NUM155)
Jim
-----Original Message-----
From: bill.reger@convergys.com [mailto:bill.reger@convergys.com]
Sent: Monday, February 03, 2003 12:18 PM
To: Midrange-L@midrange.com
Subject: Packed (*CHAR) to Numeric (*DEC) in CLP
Can anyone tell me how (in a CLP) to convert a *CHAR declared variable
containing a packed numeric value into a *DEC declared variable?
Bill
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.