> I have a field, ACCOUNT-NO CHAR*12 that may contain a "-" (dash)
> anywhere in the string more than once. I need to create a subfile with
> the contents of
> this string(which is numeric) minus the dash. The data is in an Image
> DB on the HP3000.
>
> Any idea of how to accomplish this with QTP?
Yes, a replace function in Powerhouse would be welcome. Well, there's
always the brute force way:
DEFINE C1 CHAR*1 = ACCOUNT-NO[1:1] IF ACCOUNT-NO[1:1]<>"-" ELSE ""
...
DEFINE C12 CHAR*1 = ACCOUNT-NO[1:1] IF ACCOUNT-NO[1:1]<>"-" ELSE " "
DEFINE NEW-ACCOUNT CHAR*12 = PACK(C1+C2+C3+C4+C5+C6+C7+C8+C9+C10+C11+C12)
Someone more clever maybe able to find a way using system variables and MPE
functions. Wait, I found such a clever person:
http://lists.sowder.com/pipermail/powerh-l/2001-October/005959.html
Mark W.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *