HP3000-L Archives

December 2004, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Wonsil <[log in to unmask]>
Reply To:
Mark Wonsil <[log in to unmask]>
Date:
Wed, 1 Dec 2004 08:16:30 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
> 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 *

ATOM RSS1 RSS2