Setting a key field on a view
-
02-07-2019 - |
Question
I am creating an SQL view for a file that strips out the spaces in a particular field. My question is if there is a why to set a key on that new view so a person can still CHAIN the file. We are on V5R3.
Solution
Okay found the answer at http://archive.midrange.com/midrange-l/200809/msg01062.html.
It is not possible at V5R3. Supposedly at V6R1 this is possible.
OTHER TIPS
Could you accomplish the same thing using a logical file or with an OPNQRYF
statement? Both of those allow you to set key fields and may be able to strip out the spaces in a file.
Could you make a copy of the field with the spaces stripped out? You can update the stripped out copy using a file trigger. Then create an index/logical file over the stripped out copy of the field.