The TR command would leave all the non-numeric characters in the data, 
translated as you specified, so you'd have to have a technique to pass through 
the result to remove them.  A TRT instruction would help you find the 
non-numeric characters, but in this case it would be considerably slower in 
execution than the character by character loop approaches suggested.

If the original manually-entered data is not edited as it's entered, there could be many other characters 
besides "$",",","." and EBCDIC numeric characters in it.  That's something TRT 
could check for.

Gary Weinhold
Senior Application Architect

DATAKINETICS | Data Performance & Optimization

Phone:  +1.613.523.5500 x216<tel:+1.613.523.5500%20x216>


Visit us online at<>


E-mail Notification: The information contained in this email and any 
attachments is confidential and may be subject to copyright or other 
intellectual property protection. If you are not the intended recipient, you 
are not authorized to use or disclose this information, and we request that you 
notify us by reply mail or telephone and delete the original message from your 
mail system.


On 2016-10-17 15:11,<> wrote:

Won't a TR followed by a PACK do this?

----- Original Message -----
From: "IBM Mainframe Assembler List"
Sent:Mon, 17 Oct 2016 15:04:52 -0400
Subject:Re: converting character to packed

since it was my original question and thanks for all of the
suggestions, the data input was manual into a 20 byte character field
including $ signs, commas, and periods (ex. $13,532,908.01) and I am
trying to convert to pack decimal for additional reporting on a zOS
MVS machine
Email sent using Dodo Webmail

Reply via email to