Help with VARCHAR needed

Leonard_Berkowitz@harvardpilgrim.org Leonard_Berkowitz@harvardpilgrim.org
Mon, 24 Mar 2003 16:23:13 -0500


HPe3000; Powerhouse 8.19C.

I have not used VARCHAR previously. I somehow believed that it was not
available in my environment.

To parse a 256-byte field that has variable-length sub-fields within it, I
am using VARCHAR. It seems-- in the DEFINE --  that I have to set VARCHAR *
N or SIZE M to be the maximum expected length of the sub-field. I chose
SIZE 20. When I report the DEFINEd items, they come out fixed width of 20.

So, how do I take advantage of the variable-length?

The 256-byte field has delimiters in it:

      TELE=  (in the first position)
      LOCAL=
      DEPT=
      FNAME=
      LNAME=
      SSN=
      SUPER=
      STELE=

Here is an example of the DEFINE for the first sub-field that starts after
"TELE=" and ends before "LOCAL"

DEFINE TELE-DATA VARCHAR SIZE 20 = &
    USER-DEFINED-FIELDS &
    [ (INDEX (USER-DEFINED-FIELDS,"=") + 1) : &
    (INDEX (USER-DEFINED-FIELDS,"LOCAL") - 1) - &
    (INDEX (USER-DEFINED-FIELDS,"=") + 1) ]

Thanks in advance for any help.
--
Leonard S. Berkowitz
Perot Health Care Systems
(Harvard Pilgrim Health Care account)
voice: 617-509-1212
fax: 617-509-1955
pager: 781-226-2431