Testing DATE element for spaces (solution)
Leonard_Berkowitz@harvardpilgrim.org
Leonard_Berkowitz@harvardpilgrim.org
Fri, 23 Jan 1998 10:49:21 -0500
(again apologies for double posting)
A few minutes ago, I posed the following question:
On the HP3000, PowerHouse 7.09:
I have an element defined as a DATE and stored as ZONED*6. Some of the data
is spaces and some is 000000. What test(s) could I apply to determine what
I have.
If I use ASCII (ELEM,6), I get 000000 either way
If I use ASCII (ELEM), I get 0 either way
If I use SIZE ASCII (ELEM), I get 1 (one) either way
SIZE (ELEM) gives an error: The datatype of the item ELEM is incorrect in
this context
INDEX (ELEM) gives the same error
I suspect that MATCHPATTERN (ELEM, " ") will give the same error.
======================================================================
Meanwhile, I kept researching this problem. I discovered that the return of
the CHARACTERS function can be tested for spaces.
If anyone has a different idea or can point to a "gottcha" in my solution,
please let me know.
Thanks,
====================
Leonard S. Berkowitz
(work) Leonard_Berkowitz@hphc.org
(home) lberkowitz@earthlink.net