Re: [U2] Upper Case Input

2011-09-29 Thread Trevor Fulton
Yes there is, In /HK.CONTROL the field "Subr End SB.INPUT" allows you to run a piece of code after every input into SB. In this you need something like IF PARMS(30)<38> # 1 THEN INPVAL = OCONV(INPVAL,"MCU") VALUE = OCONV(VALUE,"MCU") END The PARMS(30)<3

Re: [U2] Reading Dictionary Items

2011-09-29 Thread Charlie Noah
I guess I sound sort of old school here (well, I /am /old), but has anyone considered record locking in this scenario? Regards, Charlie Noah On 09-29-2011 8:19 PM, Womack, Adrian wrote: I realise you already have an answer - but here's a one liner that would do the same thing, without writing

Re: [U2] Reading Dictionary Items

2011-09-29 Thread Womack, Adrian
I realise you already have an answer - but here's a one liner that would do the same thing, without writing any code: UPDATE.RECORD DICT filename F4,@ID ALL - DISCLAIMER: Disclaimer. This e-mail is private and confidential. If you are not the intended recipient, pl

Re: [U2] Reading Dictionary Items

2011-09-29 Thread Bill Brutzman
Thanks Wol... It looks good and closely resembles Gerry's answer. --Bill -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wols Lists Sent: Thursday, September 29, 2011 6:41 PM To: u2-users@listserver.u2ug.org Subjec

Re: [U2] Upper Case Input

2011-09-29 Thread Bill Brutzman
Yes... it is simple... but it may take some time to implement. Just start to change the input prompts on the U2 side to things like... Input Ans Ans = upcase(Ans) And then recompile. When I started here at this company some time ago... as programs were updated... in introduc

Re: [U2] Reading Dictionary Items

2011-09-29 Thread Wols Lists
On 29/09/11 19:43, Bill Brutzman wrote: > I would like read open a (large) dictionary, read the line items, and write > back the @ID field to Attribute <4> (the column heading) of each. > > Syntax help would be appreciated. I'm guessing SQL might be your best bet - that should be a simple update

[U2] Upper Case Input

2011-09-29 Thread Israel, John R.
I am not sure we even want to do this but... Is there a SIMPLE way in SB to force all input to upper case so that if a person toggles between their E-mail and SB, they do not have to always remember to hit the caps-lock key (and then turn it off when they go back to their E-mail)? John Israel

Re: [U2] The math just doesn't work.

2011-09-29 Thread Mecki Foerthmann
I actually wonder if this "feature" is flavour specific? Pick didn't use floating point arithmetic and IIRC the default precision used to be 4. I'll give it a try tomorrow since we are running UD in Pick flavour at work. On 29/09/2011 19:32, Oaks, Harold wrote: Mecki: Oops, that's right - Mart

Re: [U2] Reading Dictionary Items

2011-09-29 Thread Bill Brutzman
Gerry: Thanks very much indeed. It works... and not a scrap of fat on it. --Bill -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of u2ug Sent: Thursday, September 29, 2011 2:51 PM To: U2 Users List Subject: Re: [U2]

Re: [U2] Reading Dictionary Items

2011-09-29 Thread u2ug
The same as you would with any other file - off the top : open 'DICT','filename' to dfp else abortm 'Cant open dict filename' execute 'SELECT DICT filename WITH TYPE="D"' loop while readnext id writev id on dfp,id,4 repeat Gerry -Original Message- From: u2-users-boun...@lists

Re: [U2] The math just doesn't work.

2011-09-29 Thread Kathleené M Hunter
In UniData the FLOAT.PRECISION which is an ECL command. It works similar to SET.WIDEZERO. Execute the command as FLOAT.PRECISION 3 and then run the program then it works. Then FLOAT.PRECISION 3 is in VOC LOGIN. (A+B) = C? YOU ROCK A = 4096.9, B = 106.19, (A+B) = 4203.09, C = 4203.09 Kathlee

[U2] Reading Dictionary Items

2011-09-29 Thread Bill Brutzman
I would like read open a (large) dictionary, read the line items, and write back the @ID field to Attribute <4> (the column heading) of each. Syntax help would be appreciated. --Bill ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listse

Re: [U2] The math just doesn't work.

2011-09-29 Thread Oaks, Harold
Mecki: Oops, that's right - Martin pointed out it would work in Universe - it did. In our uvconfig file the variable setting is WIDE0 3dc0 which is the default value. In case anyone wishes to change the value, note that the WIDE0 variable has an entire appendix devoted to it in the "Administe

Re: [U2] The math just doesn't work.

2011-09-29 Thread John Hester
I get the same result on UV 10.2.7: (A+B) = C? YOU ROCK A = 4096.9, B = 106.19, (A+B) = 4203.09, C = 4203.09 This is what I have for the uvconfig WIDE0 setting: # WIDE0 - is the mask used internally to # decide when the difference between two # numeric values is close enough to zero

Re: [U2] The math just doesn't work.

2011-09-29 Thread Bill Haskett
I tried this on UD v7.2.7 on Windows 2008 R2. I added the following code at the top of George's code: EXECUTE \SET.WIDEZERO 0.001\ This is what I got... 2 Dev (0)->RUN BP BILL (A+B) = C? YOU ROCK A = 4096.9, B = 106.19, (A+B) = 4203.09, C = 4203.09 2 Dev (0)-> Bill -

Re: [U2] The math just doesn't work.

2011-09-29 Thread Mecki Foerthmann
You didn't read Martin's answer, or did you? So to what value is WIDEZERO set on your UV system? On 29/09/2011 16:40, Oaks, Harold wrote: Running Martin's code on a Universe system, got: (A+B) = C? YOU ROCK A = 4096.9, B = 106.19, (A+B) = 4203.09, C = 4203.09 Interesting - Universe does better

Re: [U2] The math just doesn't work.

2011-09-29 Thread Oaks, Harold
Running Martin's code on a Universe system, got: (A+B) = C? YOU ROCK A = 4096.9, B = 106.19, (A+B) = 4203.09, C = 4203.09 Interesting - Universe does better than Unidata at this particular task. Harold Oaks Clark County -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailt

Re: [U2] The math just doesn't work.

2011-09-29 Thread Brian Leach
And just to add to Martin's excellent answer - the normal workround for any computer system is to use integral values, scaling and descaling as required. In case you think this is a U2 specific limitation, here's the same in C# as a console app - namespace ConsoleApplication1 { class Program

Re: [U2] The math just doesn't work.

2011-09-29 Thread Martin Phillips
Hi George, As a general rule in programming, comparison of floating point values for equality should be avoided. This is because, just as we cannot write the number one third accurately in decimal notation, so the IEEE floating point format used by computer systems cannot store numbers accurat

Re: [U2] The math just doesn't work.

2011-09-29 Thread Martin Braid
ICONV everything MD2 and check that for equality -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Hammerle Sent: 29 September 2011 13:30 To: u2-users@listserver.u2ug.org Subject: [U2] The math just doesn't work.

[U2] The math just doesn't work.

2011-09-29 Thread George Hammerle
Can anybody please help? For some reason A + B does not equal C in the comparison below. Is there any trick to get the comparisons to work properly? Unidata 7.2 on Hp Unix 11+ Top of "TEST.COMP" in "RMH.MAIN", 13 lines, 263 characters. *--: P 001: A = 3176.79 002: B = 106.19 003: C = 3282.98 0