Main Board > Language

** DISEGARD ** -> Mixed Case in Keys

(1/2) > >>

Jeffrey Ferreira:
Hi List,
i was about to embark on a project for a client and i figured i better confirm the following before i begin.

we have an index -> The Customer's PO Number
sometimes it comes in Mixed Case .......

my question is -> are Keys always case sensitive...
i'm pretty sure the answer is yes but i dont want to start this workaround unless i'm 100% sure....i just want to make sure there is no cool feature in pxplus that i'm unaware of

thanks

jeff

Jeffrey Ferreira:
Never mind. I just realized something. Even if there was a feature that forced the key to uppercase (while data remained mixed), I would still have to change all my code to force what i'm reading with to uppercase. Please disregard...sorry

Loren Doornek:
You could probably use I/O logic on the data file to read using uppercase.  Then, you wouldn't need to change all of the reads in various programs.

Jane Raymond:
When you define keys for a file, you can define options for individual segments, such as case sensitivity. So if you define a key segment as uppercase, the key value will be uppercase but the field within the data would still be mixed when you read the data in the record. You could get the uppercase value using KEC(chan,kno), or by using UCS() on the field.

Jane Raymond:
I forgot to mention, if a key segment is defined as uppercase, for example, you can use a mixed case key value when reading by key and it will still find it,

Navigation

[0] Message Index

[#] Next page

Go to full version