Given that the decimal position and commas are for you and me and not the computer, I would set a field to all "0" and then start a loop on the right of each field and if the character is >= "0" and <= "9", move it to the next position in the output field. Decrement each pointer based upon whether you processed a digit or not and when the loop is done, pack the result. If you want binary, then convert the packed field to binary.
Chuck Charles (Chuck) Hardee Senior Systems Engineer/Database Administration EAS Information Technology Thermo Fisher Scientific 300 Industry Drive | Pittsburgh, PA 15275 Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 490-9230 chuck.har...@thermofisher.com | www.thermofisher.com WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent of a system responsible for delivering the message to the intended recipient, is prohibited. If you are not the intended recipient, please inform the sender and delete all copies. -----Original Message----- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Greg Gray Sent: Thursday, October 13, 2016 10:22 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: converting character to packed I have character data in a field (ex. $13,501,298.01) and I need to remove the special characters and convert field from char to packed? Can someone give a suggestion on the best and simplest way to do it, thanks?