Re: converting character to packed

2017-08-16 Thread Robin Vowels
From: "Paul Gilmartin" <0014e0e4a59b-dmarc-requ...@listserv.uga.edu> Sent: Monday, October 24, 2016 5:49 AM On 2016-10-23, at 06:05, robi...@dodo.com.au wrote: Monetary fields tend to have the finny characters in known positions, commas (or periods)every third position. The decimal

Re: converting character to packed

2016-10-23 Thread Paul Gilmartin
On 2016-10-23, at 06:05, robi...@dodo.com.au wrote: > Monetary fields tend to have the finny characters in known positions, > commas (or periods)every third position. The decimal point (period or > comma) also is in a fixed position.All these are in fixed positions > relative to the least

Re: converting character to packed

2016-10-23 Thread robin51
: "IBM Mainframe Assembler List" To: Cc: Sent:Sat, 22 Oct 2016 14:46:47 -0600 Subject:Re: converting character to packed On 2016-10-18, at 13:19, Tony Harminc wrote: > On 18 October 2016 at 02:34, wrote: >> Using TR in a different way omits the commas and decimal point, sign

Re: SRST Performance (was: converting character to packed

2016-10-22 Thread Paul Gilmartin
On 2016-10-18, at 13:45, Tony Harminc wrote: > > There is also the long-known performance problem with TRT (and TR) > that its definition requires that "Access exceptions are recognized > only for those bytes in the second operand which are actually > required. Access exceptions are not

Re: converting character to packed

2016-10-22 Thread Paul Gilmartin
On 2016-10-18, at 13:19, Tony Harminc wrote: > On 18 October 2016 at 02:34, wrote: >> 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

Rif: Re: converting character to packed

2016-10-19 Thread aldo . crosio
The first question I must ask is: what is the main language? the string to be converted is fixed or variable length? whether before or after the string? the currency above, following the string and, contiguous or separated? there is a need to vary parametrically decimal point or currency? In

Re: SRST Performance (was: converting character to packed

2016-10-18 Thread Tony Harminc
On 18 October 2016 at 12:11, Martin Truebner wrote: > I have no figures - but consider the following: > > TRT does a lockup for each and every char until terminating char is > found or the maximum length is reached- the lockup is done against a > table of 256 char. > > SRST

Re: converting character to packed

2016-10-18 Thread Tony Harminc
On 18 October 2016 at 02:34, wrote: > 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 translated. This was the classic way to reverse a

Re: SRST Performance (was: converting character to packed

2016-10-18 Thread Gary Gregory
. -Original Message- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Paul Gilmartin Sent: Tuesday, October 18, 2016 11:30 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: SRST Performance (was: converting character to packed On 2016-10-18, at 10:11, Martin

Re: SRST Performance (was: converting character to packed

2016-10-18 Thread Paul Gilmartin
On 2016-10-18, at 10:11, Martin Truebner wrote: > > TRT does a lockup for each and every char until terminating char is > found or the maximum length is reached- the lockup is done against a > table of 256 char. > Caching helps a lot. How can the programmer insure that the table occupies the

SRST Performance (was: converting character to packed

2016-10-18 Thread Martin Truebner
I have no figures- but consider the following: TRT does a lockup for each and every char until terminating char is found or the maximum length is reached- the lockup is done against a table of 256 char. SRST does a check of each char against a single char (plus the termination char). I would

Re: converting character to packed

2016-10-18 Thread Martin Truebner
Tony, >> here are inherent problems with using TR. The following are examples of valid input that has to be handled correctly. I am fully aware of all these- and i posted this before I posted my solution with the explicit stated assumption- this is a fields produced/checked/verified by a

Re: converting character to packed

2016-10-18 Thread Gary Gregory
: Tuesday, October 18, 2016 9:14 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: converting character to packed Michael, There are inherent problems with using TR. The following are examples of valid input that has to be handled correctly. I have used the "^" character to indic

Re: converting character to packed

2016-10-18 Thread Michael Stack
2016, you wrote: >> >>>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 translated. >>> >>>- Origi

Re: converting character to packed

2016-10-18 Thread Tony Thigpen
er List" To: Cc: 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

Re: converting character to packed

2016-10-18 Thread Michael Stack
ng >being translated. > >- Original Message - >From: "IBM Mainframe Assembler List" >To: >Cc: >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

Re: converting character to packed

2016-10-18 Thread Richard Kuebbing
That would be interesting code to see -Original Message- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of robi...@dodo.com.au Sent: Tuesday, October 18, 2016 2:34 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: converting character to packed

Re: converting character to packed

2016-10-18 Thread Tony Thigpen
Martin, "the data input was manual into..." means that someone actually typed the data into a field. The data is unedited and may contain mistakes. The data can not be trusted. In this case, he needs a complete edit process either before are during the convert-to-packed process. Tony

Rif: Re: converting character to packed

2016-10-18 Thread aldo . crosio
The first question I must ask is: what is the main language? the string to be converted is fixed or variable length? whether before or after the string? the currency above, following the string and, contiguous or separated? there is a need to vary parametrically decimal point or currency?

Re: converting character to packed

2016-10-18 Thread Martin Truebner
Greg, >> the data input was manual into a 20 byte character field including $ >> signs, commas, and periods (ex. $13,532,908.01) i do not understand the word "manual" in this sentence (english is not my native language) - I assume a meaning of "prepared" "edited", "printed into", "manual

Re: converting character to packed

2016-10-18 Thread robin51
6 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

Re: converting character to packed

2016-10-17 Thread Gary Weinhold
bi...@dodo.com.au<mailto:robi...@dodo.com.au> wrote: Won't a TR followed by a PACK do this? - Original Message - From: "IBM Mainframe Assembler List" To: Cc: Sent:Mon, 17 Oct 2016 15:04:52 -0400 Subject:Re: converting character to packed since it was my original question

Re: converting character to packed

2016-10-17 Thread robin51
Won't a TR followed by a PACK do this? - Original Message - From: "IBM Mainframe Assembler List" To: Cc: 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

Re: converting character to packed

2016-10-17 Thread Greg Gray
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.

Re: converting character to packed

2016-10-17 Thread Gary Weinhold
3-16 9:41 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU<mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU> Subject: Re: converting character to packed ClassicWe sould make a.macro out of it :)ZA Sent from Yahoo Mail on Android On Thu, Oct 13, 2016 at 12:17 PM, Richard Rogers< rcrogers@gmail.com<

Re: converting character to packed

2016-10-14 Thread Steve Smith
MING BYTE >> BCT R9,IP010 >> IP030DS 0H >> BCTR R11,R0ADJUST FOR 'EX' >> EXR11,IPPACK >> *PACK 0(8,R10),IPWORK(*-*) >> *R10 ==> PL16 PACKED DECIMAL >> *TTD - EXIT INCOMING PACK ROUTINE,

Re: converting character to packed

2016-10-14 Thread Tony Thigpen
Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Ze'ev Atlas Sent: October-13-16 9:41 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: converting character to packed ClassicWe sould make a.macro out of it :)ZA Sent from Yahoo Mail on Android On Thu, Oct 13, 2016

Re: converting character to packed

2016-10-14 Thread Martin Truebner
None of the solutions presented here does any considering of commas or points. The input comes from carbon based units and they are known to need all kind of helps to get a number correct. So my solution would be to check for -1) just one decimal point and -2) commas at every forth position

Re: converting character to packed

2016-10-13 Thread Webster, Chris
nframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Ze'ev Atlas Sent: October-13-16 9:41 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: converting character to packed ClassicWe sould make a.macro out of it  :)ZA Sent from Yahoo Mail on Android On Thu, Oct 13, 2016

Re: converting character to packed

2016-10-13 Thread Ze'ev Atlas
*) IPWORK  DS    CL16 -Original Message- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Greg Gray Sent: Thursday, October 13, 2016 08:22 To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: converting character to packed I have character data in a fiel

Re: converting character to packed

2016-10-13 Thread Paul Gilmartin
On 2016-10-13, at 09:25, John P. Hartmann wrote: > You did not say that is what you want, but then I didn't notice which forum > you wrote to, so mea culpa. > > Anyhow, if your computer runs VM, you don't have to write assembler at all > (and if it runs MVS, make your requirement known to

Re: converting character to packed

2016-10-13 Thread Richard Rogers
Greg Gray Sent: Thursday, October 13, 2016 08:22 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 be

Re: converting character to packed

2016-10-13 Thread John P. Hartmann
You did not say that is what you want, but then I didn't notice which forum you wrote to, so mea culpa. Anyhow, if your computer runs VM, you don't have to write assembler at all (and if it runs MVS, make your requirement known to IBM). The instruction you want is PACK, but you must remove

Re: converting character to packed

2016-10-13 Thread John McKown
On Thu, Oct 13, 2016 at 9:42 AM, John P. Hartmann wrote: > Aw, c'm on! > > (Untested:) > > pipe ... | change /$// | change /,// | spec 1-* c2p 1 | ... > > Do you guys still do bubble sorts? ​That's not assembler code.​ -- Heisenberg may have been here. Unicode:

Re: converting character to packed

2016-10-13 Thread John P. Hartmann
Aw, c'm on! (Untested:) pipe ... | change /$// | change /,// | spec 1-* c2p 1 | ... Do you guys still do bubble sorts? On 10/13/2016 04:22 PM, Greg Gray wrote: 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

Re: converting character to packed

2016-10-13 Thread Greg Gray
thanks Chuck, I will give that a try!!!

Re: converting character to packed

2016-10-13 Thread Hardee, Chuck
ssembler 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 con

converting character to packed

2016-10-13 Thread Greg Gray
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?