D3 OCONV that strips SPACES but preserves DECIMAL POINTS

238 views
Skip to first unread message

frosty

unread,
Jan 31, 2023, 1:03:04 PM1/31/23
to Pick and MultiValue Databases
Is there an output conversion in D3 that will strip out non-numeric characters but not strip out a decimal point?

I want spaces to go away. But I don't want decimal points to go away.

For example, if the data is " 123.45" (not the leading space) I want "123.45".

MCN strips the space but also strips the decimal point, yielding "12345" which is, from what the bean counters tell me, a different number than "123.45" -- go figure.

Maybe I'm just having a Senior Moment©? And the conversion I'm looking for is a thing?

geneb

unread,
Jan 31, 2023, 1:18:58 PM1/31/23
to Pick and MultiValue Databases
On Tue, 31 Jan 2023, frosty wrote:

> Is there an output conversion in D3 that will strip out non-numeric
> characters but not strip out a decimal point?
>
> I want spaces to go away. But I don't want decimal points to go away.
>
> For example, if the data is " 123.45" (not the leading space) I want
> "123.45".
>

Try trim().

g.

--
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
http://www.diy-cockpits.org/coll - Go Collimated or Go Home.
Some people collect things for a hobby. Geeks collect hobbies.

ScarletDME - The red hot Data Management Environment
A Multi-Value database for the masses, not the classes.
http://scarlet.deltasoft.com - Get it _today_!

frosty

unread,
Jan 31, 2023, 1:24:00 PM1/31/23
to Pick and MultiValue Databases

If I was writing a BASIC program and not a Dictionary definition, I would most certainly do that.

I may wind writing some BASIC to CALL from the DICT. But there's a lot of DICTs to refactor if I go that route.

A mask character conversion that strips spaces but retains decimal points would be a very quick implementation.

geneb

unread,
Jan 31, 2023, 1:35:00 PM1/31/23
to Pick and MultiValue Databases
On Tue, 31 Jan 2023, frosty wrote:

>
> If I was writing a BASIC program and not a Dictionary definition, I would
> most certainly do that.
>
I didn't see you were doing this in a dict. Sorry. :)

> I may wind writing some BASIC to CALL from the DICT. But there's a lot of
> DICTs to refactor if I go that route.
>
> A mask character conversion that strips spaces but retains decimal points
> would be a very quick implementation.
>
>
Have you checked to see if something like that is lurking in EPick?

Brian Speirs

unread,
Jan 31, 2023, 1:50:11 PM1/31/23
to Pick and MultiValue Databases
UniVerse and OpenQM both allow you to write your own user-defined conversions (user exits in PICK parlance). I am sure that D3 will let you do something similar. Essentially, this will be a BASIC subroutine that is called to do the conversion - and may be both an input and output conversion, or just one of those.

Cheers,

Brian

Kevin Powick

unread,
Jan 31, 2023, 1:59:24 PM1/31/23
to Pick and MultiValue Databases
Two ideas:

1) Clean up the data so you don't have to deal with spaces in numbers.

2) If you know all the data is MD2 (eg. 888.99), then do a "double" conversion; First the MCN, followed by MD2.

--
K. Powick

Kevin Powick

unread,
Jan 31, 2023, 2:09:25 PM1/31/23
to Pick and MultiValue Databases
For that double conversion in a dict item, separate your conversions with a value mark.

01 A
02
03
04
05
06
07
08 MCN]MD2
09 R
10 7

--
K. Powick

frosty

unread,
Jan 31, 2023, 2:12:04 PM1/31/23
to Pick and MultiValue Databases
Both the decimals and the spaces are rare. Most of the data values are integers, as expected.

Path of least resistance is your option 1): find the data with spaces and remove the spaces.

Thanks for the advises.

Gerd Förthmann

unread,
Jan 31, 2023, 2:54:00 PM1/31/23
to mvd...@googlegroups.com

Multiply by 10 before you do the MCN and it should work

--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
---
You received this message because you are subscribed to the Google Groups "Pick and MultiValue Databases" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mvdbms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/f1344051-5c29-4500-9896-891bfd1de5a5n%40googlegroups.com.

Wol

unread,
Jan 31, 2023, 3:02:20 PM1/31/23
to mvd...@googlegroups.com
On 31/01/2023 18:50, Brian Speirs wrote:
> UniVerse and OpenQM both allow you to write your own user-defined
> conversions (user exits in PICK parlance). I am sure that D3 will let
> you do something similar. Essentially, this will be a BASIC subroutine
> that is called to do the conversion - and may be both an input and
> output conversion, or just one of those.

If you write an exit (or an i-desc), I can't remember the syntax for the
function, but do something like

convert (convert "1234567890." to "" in value) to "" in value

So basically, you're stripping out all the numbers, and then stripping
out what's left. That way, you don't have to worry about what weird and
wonderful characters might be in your data, this gets the lot.

The only way this might get you is if you've got more than one decimal
(but yes, I'd chime in with the others and say why isn't the data
validated on input?)

Cheers,
Wol

Gerd Förthmann

unread,
Jan 31, 2023, 3:04:03 PM1/31/23
to mvd...@googlegroups.com

I mean 100 of course

Jim Idle

unread,
Feb 1, 2023, 11:45:50 PM2/1/23
to mvd...@googlegroups.com
It may well be too late to do anything about this, but:

  • The data should have leading/trailing spaces removed when it is generated (INPUT, READ or whatever)
  • The data should never be stored as a written decimal, but as a scaled integer: if you want two digit precision then 123.45 should store as 12345 and 456 as 45600


I can think of MCB, but that might include the space and just give you back the same thing.
Maybe try MR20 ?

Jim

--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
---
You received this message because you are subscribed to the Google Groups "Pick and MultiValue Databases" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mvdbms+un...@googlegroups.com.

euobeto

unread,
Feb 2, 2023, 7:29:04 AM2/2/23
to mvd...@googlegroups.com
Hello... 
why not use trim ?
var = TRIM("1565. 45","A")   ;* (using "A" remove all spaces in the variable)
PRINT VAR 
result 
1565.45



--
Alberto  Leal
T.I  Campo Grande
LPI ID: LPI000191272
E-mail: alb...@tecwebcg.com
Gmail:  ees....@gmail.com
          

Jim Idle

unread,
Feb 2, 2023, 8:01:17 AM2/2/23
to mvd...@googlegroups.com

He is asking about dictionary items. 


Joe G

unread,
Feb 2, 2023, 10:25:59 AM2/2/23
to mvd...@googlegroups.com
The ICONV function (on Universe anyway) does a good job of stripping out non numeric characters like spaces, commas and dollar signs. You could just try this:
 
  MY.VALUE = OCONV(ICONV(VARIABLE.WITH.SPACES,'MR8'),'MR8')+0

i used 'MR8' in the sample to preserve up to 8 decimal numbers. If you only need two then use 'MR2'. I added the "+0" at the end becuase the number gets padded with 8 decimals. Adding zero two it strips those off. For example it "1.00" to "1".


John Lorentz

unread,
Feb 2, 2023, 10:20:53 PM2/2/23
to mvd...@googlegroups.com
Does anyone know if it's possible to just purchase a standalone AREV/64/AREV32  package?

I've been using AREV for my personal use for some decades now (currently running in Windows XP mode on my WIn7Pro machine).

But it's becoming pretty obvious that I won't be able to run Win7 much longer, since it's no longer supported by anyone.  (Even the TurboTax package I just bought will have to be installed on our Win10 laptop instead of my desktop.)

I have no need of the full OpenInsight package (and as a mostly-retired person, I'd rather not pay the full OpenInsight price).  I just want to keep using the databases I have for our books, our records & LPs and the playlists of the nearly 3,000 Doctor Demento shows I have on disk.

Does anyone have any suggestions?

John Lorentz

geneb

unread,
Feb 2, 2023, 10:24:11 PM2/2/23
to mvd...@googlegroups.com
On Thu, 2 Feb 2023, John Lorentz wrote:

> Does anyone have any suggestions?
>

John, I'd look into see if AREV will run under DOSBox. You can also build
yourself a good emulated machine using 86Box. You can custom configure a
virtual PC with it - you can find MS-DOS boot disks on winworldpc.com.

If you need help, yell. I'd be happy to help.

John Lorentz

unread,
Feb 2, 2023, 10:36:10 PM2/2/23
to mvd...@googlegroups.com
AREV will run under DOSBox--just very, very slowly.

(In Windows Virtual PC/XP Mode, it only runs slowly).

I'll take a look at 86Box.  (I have a pretty fast system with a good bit of memory.  But I intentionally bought it with Win7 Pro, even though Win10 was already out, so that I keep running AREV.)

Thanks.

John

--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
---
You received this message because you are subscribed to the Google Groups "Pick and MultiValue Databases" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mvdbms+un...@googlegroups.com.

Martyn

unread,
Feb 3, 2023, 3:25:47 AM2/3/23
to Pick and MultiValue Databases
Hi John,

I work for Revelation Software in the UK and unfortunately it is not possible to purchase a standalone ARev32/64 package because it is integral to OpenInsight and it relies on numerous parts of OpenInsight to run.  That is the nature of trying to run the ARev DOS character screens on a Windows platform.

Where in the world are you based?  If this is a single user developer instance, there are options that might be suitable to your needs but all of them would involve OpenInsight and an application conversion, so some work.

You could look at keeping an old machine just for ARev, or trying DOSBox, etc. but I am afraid that these old ARev systems that were written decades ago and which have provided huge value for money, they are now firmly coming to the end of their life.  It is a shame and I feel your pain, but nothing is forever in IT and I remain amazed that people are still managing to run ARev systems decades after they were originally written.

I am sorry that this is not better news for you, but maybe it is now time to bite the bullet and move to a more modern platform that is supported on modern operating systems.

Sorry,
Martyn.

geneb

unread,
Feb 3, 2023, 9:43:30 AM2/3/23
to mvd...@googlegroups.com
On Thu, 2 Feb 2023, John Lorentz wrote:

> AREV will run under DOSBox--just very, very slowly.
>
> (In Windows Virtual PC/XP Mode, it only runs slowly).
>
> I'll take a look at 86Box. (I have a pretty fast system with a good bit of
> memory. But I intentionally bought it with Win7 Pro, even though Win10 was
> already out, so that I keep running AREV.)
>

NTVDM64 might be a potential solution for you as well:
http://www.columbia.edu/~em36/ntvdmx64.html

John Lorentz

unread,
Feb 3, 2023, 11:57:06 AM2/3/23
to mvd...@googlegroups.com
Thanks, that sounds encouraging!

(My home system is 64bit, which leaves out run some of the options for running old software.)

John

--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
---
You received this message because you are subscribed to the Google Groups "Pick and MultiValue Databases" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mvdbms+un...@googlegroups.com.

Wols Lists

unread,
Feb 4, 2023, 3:46:52 AM2/4/23
to mvd...@googlegroups.com
On 03/02/2023 14:43, geneb wrote:
> On Thu, 2 Feb 2023, John Lorentz wrote:
>
>> AREV will run under DOSBox--just very, very slowly.
>>
>> (In Windows Virtual PC/XP Mode, it only runs slowly).
>>
>> I'll take a look at 86Box.  (I have a pretty fast system with a good
>> bit of
>> memory.  But I intentionally bought it with Win7 Pro, even though
>> Win10 was
>> already out, so that I keep running AREV.)
>>
>
> NTVDM64 might be a potential solution for you as well:
> http://www.columbia.edu/~em36/ntvdmx64.html
>
The other option (which I'm surprised you didn't mention) is if his code
is all home-brew, would ScarletDME in virtualbox be an option?

Okay, it'll require porting, but that shouldn't be a problem, and
there's code on Pickwiki that dumps and loads files as CSV for data
transfer.

Cheers,
Wol

geneb

unread,
Feb 4, 2023, 10:08:45 AM2/4/23
to mvd...@googlegroups.com
It never occurred to me. Advanced Revelation triggers a completely
different memory set in my head. ;) (which reminds me, I've got tons of
manuals & media for arev that I need to get scanned...)

SigSolutions, Inc.

unread,
Feb 5, 2023, 8:44:28 PM2/5/23
to mvd...@googlegroups.com
you could just use the windows OpenInsight rev64.  depending on the currentversion this could be very compatible ... no need to rewrite

DSig

--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
---
You received this message because you are subscribed to the Google Groups "Pick and MultiValue Databases" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mvdbms+un...@googlegroups.com.


--
DSig
David Tod Sigafoos
SigsSolutions, Inc

John Lorentz

unread,
Feb 5, 2023, 8:56:34 PM2/5/23
to mvd...@googlegroups.com
Since it's for my personal use, I haven't wanted to spend all the money for a full OpenInsight package.  (I don't think I've used AREV for anything work-related for more than 30 years.  It's mainly been Universe, Unidata or PI/Open.)

John

Message has been deleted

Lozen Yaateh

unread,
May 18, 2023, 9:17:50 PM5/18/23
to Pick and MultiValue Databases
Hey John, this is Stacy, drop me an email, I have what you can use.  FYI.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages