Réf. : RE: removal of spaces inbetween chars.
nicolas.au@bnpparibas.com
nicolas.au@bnpparibas.com
Wed, 25 Aug 2004 18:42:43 +0200
John,
I am really puzzled about the statement of yours
"Neither Qtp nor Quiz evaluates defined items until they are needed"
This is totally new to me. I hope our friend Bob can clarify on this to us
all.
I am very surprised also to hear this.
"On MPE this code causes Quiz to fail miserably and most inelegantly."
By the way, have you tried to run the little program that I listed ?
Just simply cut and paste the lines of codes to see whether they work.
It did work on our HP3000 with PH 8.29.D
The example merely tried to demonstrate the principle of using the
functions
of SETSYSTEMVAL, GETSYSTEMVAL. and REPL
to replace any character in a string by a new character.
Hope someone else have tried the codes and let us know whether it worked on
his / her computer.
I am sure, no doubt there are better solution than this, but I am very
surprised to hear that the solution
that I provided was not working at all when I actually saw it myself that
it worked on our HP3000.
Unless, I am getting old and there is something wrong with my eye sight.
Nicholas.
Internet
John.Pickering@norbord.com@lists.sowder.com - 25/08/2004 18:15
Envoyé par : powerh-l-admin@lists.sowder.com
Pour : Nicolas AU
cc : powerh-l
Objet : RE: removal of spaces inbetween chars.
One of the reasons I said Qtp would make the task easier is that this is
possible in Qtp but doesn't work in Quiz. Neither Qtp nor Quiz evaluates
defined items until they are needed -- actually pretty clever of them but
in
this case it means that your t-cc and t-dd will never get evaluated since
they are never used and the system variables they are meant to create won't
exist when t-bb tries to retrieve the value of var_bb. On MPE this code
causes Quiz to fail miserably and most inelegantly.
Sigh ... if only Quiz had temporary items :-)
Regards,
JWP
-----Original Message-----
From: nicolas.au@bnpparibas.com [mailto:nicolas.au@bnpparibas.com]
Sent: Wednesday, August 25, 2004 11:49 AM
To: John.Pickering@norbord.com
Cc: powerh-l@lists.sowder.com
Subject: Réf. : RE: Réf. : removal of spaces inbetween chars.
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.
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.