That would be interesting code to see

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of
Sent: Tuesday, October 18, 2016 2:34 AM
Subject: Re: converting character to packed

Using TR in a different way omits the commas and decimal point, sign, and any 
other funny characters. 
To do this, you swap the roles of the translate table and the string being 

----- Original Message -----
From: "IBM Mainframe Assembler List" 
Sent:Mon, 17 Oct 2016 16:24:18 -0400
Subject:Re: converting character to packed

 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


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

 Won't a TR followed by a PACK do this?
Email sent using Dodo Webmail

----------------------------------------- The information contained in this 
communication (including any attachments hereto) is confidential and is 
intended solely for the personal and confidential use of the individual or 
entity to whom it is addressed. The information may also constitute a legally 
privileged confidential communication. If the reader of this message is not the 
intended recipient or an agent responsible for delivering it to the intended 
recipient, you are hereby notified that you have received this communication in 
error and that any review, dissemination, copying, or unauthorized use of this 
information, or the taking of any action in reliance on the contents of this 
information is strictly prohibited. If you have received this communication in 
error, please notify us immediately by e-mail, and delete the original message. 
Thank you

Reply via email to