ww wrote:
Thanks Jim.

I now understand the importance of not storing decimals. This is data
I inherited so I need a way to strip the decimals either via a DICT
correlative or other means. I want to read the item from PROC via a
primary buffer reference such as &1.10 etc. Any ideas?

  
Do you HAVE to use PROC? It would be much better to do this in jBC and use the FIELD functions. However, for maintainability, write a  B (for BASIC) correlative or two and extract the fields that way. If you do not already know F correlatives, then it will take you more time than it is worth to work out what to do. You could also just write a small jBC program that took the arguments via PROCREAD and wrote back the field via PROCWRITE. PQ procs don't have a lot of functionality, but PQN procs can read the records and so on.

The systems are so fast these days that other than algorithms, your effort should be spent on producing something that is maintainable.

Jim

On Aug 7, 7:28 pm, Jim Idle <[email protected]> wrote:
  
ww wrote:
    
I have data stored with bothdecimaland hyphens in the field for
example 123.234-123. I want to create a DICT item that will strip the
decimals and hyphens. I tried most of the obvious convertions with the
following providing the desired result however, it strips the hyphens
but truncates the data when it finds adecimal. I tried returning only
numerics etc. Any help would be appreciated. The '39' on line 8
references attr 39 of the data file.
      
Seems others have answered your question again, but perhaps you are
better reviewing the data storage! Data fields in jBASE should NOT be
stored with embedded '.' in them unless you have some kind of arbitrary
precision floating point going on (which I doubt you do). Numerics
should be stored as scaled integers. Also, the delimiter @AM is what you
use for different fields, not '.' or '-'; if you are having problems
with conversions it is usually because you are trying to put square pegs
in round holes.

Jim
    


  


--~--~---------~--~----~------------~-------~--~----~
Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to