Réf. : RE: Réf. : removal of spaces in
between chars.
nicolas.au@bnpparibas.com
nicolas.au@bnpparibas.com
Wed, 25 Aug 2004 17:49:19 +0200
John,
John, I did not know that the original question was about how to tackle the
prioblem in QUIZ and not QTP.
In fact using QUIZ is much simpler.
Below is an example in QUIZ to demonstrate the same principle that I used :
DEFINE T-AA CHAR*20 = "12 456 789 A B C"
DEFINE T-CC CHAR*6 = "Y" IF SETSYSTEMVAL("VAR_AA",(T-AA))
DEFINE T-DD CHAR*6 = "Y" IF SETSYSTEMVAL("VAR_BB","![REPL(VAR_AA,' ','')]")
DEFINE T-BB CHAR*20 = GETSYSTEMVAL("VAR_BB")
REPORT T-AA T-BB
go
25 AUG 2004 ABS Dictionary (Y2K) as at 25/5/1998 PAGE 1
T-AA T-BB
12 456 789 A B C 12456789ABC
Hope this will help.
Nicholas.
Internet
John.Pickering@norbord.com - 25/08/2004 17:31
Pour : Nicolas AU
cc :
Objet : RE: Réf. : removal of spaces in between chars.
Didn't the original question ask how to do this in Quiz not Qtp?
-----Original Message-----
From: nicolas.au@bnpparibas.com [mailto:nicolas.au@bnpparibas.com]
Sent: Wednesday, August 25, 2004 4:24 AM
To: ggjos@hotmail.com
Cc: powerh-l@lists.sowder.com
Subject: Réf. : removal of spaces in between chars.
Hi,
Below was the solution I posted to the list in 2001 on the similar request
of replacing ',' with ';'.
It was confirmed at that time that the codes also worked fine with DEC/VAX
(?Compaq/VAX) VMS PH as well....
I have modified the codes to replace ' ' (space) with '' ( ie removing
space)
Hope this will help.
Nicholas.
**********************************
The following QTP's codes worked fine on HP3000 (MPE/iX 6.5) and PH8.29.
It uses the MPE function 'REPL' to do the job.
The Powerhouse functions GETSYSTEMVAL and SETSYSTEMVAL are
available in MPE and Unix versions.
The demo QTP source :
RUN XXYY
; This demo program will replace any occurrence of " " (space) in T-AA
with "" ( ie removing space) in T-BB
; using the HP3000 system function REPL.
ACCESS any-dataset ; or any file
CHOOSE key-item parm prompt 1 times ; or use select if you want
TEMP T-AA CHAR*40
TEMP T-BB CHAR*40
TEMP T-CC CHAR*1 ; this is a dummy variable
ITEM T-AA = "Column 1, 6789.12, Column 2, 456.78" ; any string you
want to test
ITEM T-CC = "Y" &
IF SETSYSTEMVAL("VAR_AA",(T-AA))
ITEM T-CC = "Y" &
IF SETSYSTEMVAL("VAR_BB","![REPL(VAR_AA,' ','')]")
ITEM T-BB = GETSYSTEMVAL("VAR_BB")
SUBFILE XYXYSF INCLUDE &
T-AA, &
T-BB
GO
============================
Now you can use QUIZ to see the content in subfile XYXYSF.
> acc *xyxysf
> rep all
> go
T-AA
T-BB
Column 1, 6789.12, Column 2, 456.78
Column1,6789.12,Column2,456.78
Column 1, 6789.12, Column 2, 456.78
Column1,6789.12,Column2,456.78
============================
Internet
ggjos@hotmail.com@lists.sowder.com - 24/08/2004 23:56
Envoyé par : powerh-l-admin@lists.sowder.com
Pour : powerh-l
cc :
Objet : removal of spaces in between chars.
Hi,
can anyone tell me how to remove spaces in between a string.The spaces
are not in the same
locations. eg; "23 25346 6754" "a/p2 322 233 7645" "6 765 984 2345".
The field is about 12 charaters long. Thanks in advance.
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request@lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.
---------------------------------------------
Ce message et toutes les pieces jointes (ci-apres le
"message") sont etablis a l'intention exclusive de ses
destinataires et sont confidentiels. Si vous recevez ce
message par erreur, merci de le detruire et d'en avertir
immediatement l'expediteur. Toute utilisation de ce
message non conforme a sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf
autorisation expresse. L'internet ne permettant pas
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce
message, dans l'hypothese ou il aurait ete modifie.
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request@lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.
---------------------------------------------
Ce message et toutes les pieces jointes (ci-apres le
"message") sont etablis a l'intention exclusive de ses
destinataires et sont confidentiels. Si vous recevez ce
message par erreur, merci de le detruire et d'en avertir
immediatement l'expediteur. Toute utilisation de ce
message non conforme a sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf
autorisation expresse. L'internet ne permettant pas
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce
message, dans l'hypothese ou il aurait ete modifie.