removal of spaces inbetween chars.
Pickering, John (NORBORD)
John.Pickering@norbord.com
Wed, 25 Aug 2004 15:40:54 -0400
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C48ADB.6F727720
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Oops -- I think Michael might be correct. I seem to remember an ancient
Interex conference talk by the (in)famous Matt Ohmes talking about the =
Quiz
record complex -- although he called it the "sticking together place" =
--
which would support Michael's claim.
=20
And the code sample sent by Nicholas actually does work with PH 8.49.C =
and
MPEiX 7.5. I think my quickie cut and paste test didn't account for the =
line
wrap :-(
=20
Good catch Michael.
=20
Regards,
JWP
=20
=20
-----Original Message-----
From: Michael Lee [mailto:mcl_systems@telus.net]
Sent: Wednesday, August 25, 2004 12:22 PM
To: Pickering, John (NORBORD)
Subject: Re: removal of spaces inbetween chars.
Hmmmm John, I beg to differ with you. QUIZ adds the DEFINEd items to =
the
record complex just like any other item. QTP and QUICK are the ones =
that
don't calculate a DEFINE until it's referenced.
Regards,
Michael Lee
MCL Systems Inc.
Pickering, John (NORBORD) wrote:
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> [
mailto:nicolas.au@bnpparibas.com <mailto:nicolas.au@bnpparibas.com> ]
Sent: Wednesday, August 25, 2004 11:49 AM
To: John.Pickering@norbord.com <mailto:John.Pickering@norbord.com>=20
Cc: powerh-l@lists.sowder.com <mailto:powerh-l@lists.sowder.com>=20
Subject: R=E9f. : RE: R=E9f. : 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 =3D "12 456 789 A B C"
DEFINE T-CC CHAR*6 =3D "Y" IF SETSYSTEMVAL("VAR_AA",(T-AA))
DEFINE T-DD CHAR*6 =3D "Y" IF SETSYSTEMVAL("VAR_BB","![REPL(VAR_AA,' =
','')]")
DEFINE T-BB CHAR*20 =3D 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 <mailto:John.Pickering@norbord.com> - =
25/08/2004
17:31
Pour : Nicolas AU
cc :
Objet : RE: R=E9f. : 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> [
mailto:nicolas.au@bnpparibas.com <mailto:nicolas.au@bnpparibas.com> ]
Sent: Wednesday, August 25, 2004 4:24 AM
To: ggjos@hotmail.com <mailto:ggjos@hotmail.com>=20
Cc: powerh-l@lists.sowder.com <mailto:powerh-l@lists.sowder.com>=20
Subject: R=E9f. : 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 =3D "Column 1, 6789.12, Column 2, 456.78" ; any string =
you
want to test
ITEM T-CC =3D "Y" &
IF SETSYSTEMVAL("VAR_AA",(T-AA))
ITEM T-CC =3D "Y" &
IF SETSYSTEMVAL("VAR_BB","![REPL(VAR_AA,' ','')]")
ITEM T-BB =3D GETSYSTEMVAL("VAR_BB")
SUBFILE XYXYSF INCLUDE &
T-AA, &
T-BB
GO
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
Now you can use QUIZ to see the content in subfile XYXYSF.
=20
acc *xyxysf
rep all
go
=20
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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
Internet
ggjos@hotmail.com@lists.sowder.com
<mailto:ggjos@hotmail.com@lists.sowder.com> - 24/08/2004 23:56
Envoy=E9 par : powerh-l-admin@lists.sowder.com
<mailto:powerh-l-admin@lists.sowder.com>=20
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.
_________________________________________________________________
------_=_NextPart_001_01C48ADB.6F727720
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<TITLE></TITLE>
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR></HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><SPAN class=3D328584019-25082004><FONT face=3DArial =
color=3D#0000ff size=3D2>Oops=20
-- I think Michael might be correct. I seem to remember an ancient =
Interex=20
conference talk by the (in)famous Matt Ohmes talking about the Quiz =
record=20
complex -- although he called it the "sticking together place" -- which =
would=20
support Michael's claim.</FONT></SPAN></DIV>
<DIV><SPAN class=3D328584019-25082004><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D328584019-25082004><FONT face=3DArial =
color=3D#0000ff size=3D2>And=20
the code sample sent by Nicholas actually does work with PH 8.49.C and =
MPEiX=20
7.5. I think my quickie cut and paste test didn't account for the line =
wrap=20
:-(</FONT></SPAN></DIV>
<DIV><SPAN class=3D328584019-25082004><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D328584019-25082004><FONT face=3DArial =
color=3D#0000ff size=3D2>Good=20
catch Michael.</FONT></SPAN></DIV>
<DIV><SPAN class=3D328584019-25082004><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D328584019-25082004><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=3D328584019-25082004><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>JWP</FONT></SPAN></DIV>
<DIV><SPAN class=3D328584019-25082004><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D328584019-25082004><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> Michael Lee=20
[mailto:mcl_systems@telus.net]<BR><B>Sent:</B> Wednesday, August 25, =
2004 12:22=20
PM<BR><B>To:</B> Pickering, John (NORBORD)<BR><B>Subject:</B> Re: =
removal of=20
spaces inbetween chars.<BR><BR></FONT></DIV>Hmmmm John, I beg to differ =
with=20
you. QUIZ adds the DEFINEd items to the record complex just like any =
other item.=20
QTP and QUICK are the ones that don't calculate a DEFINE until it's=20
referenced.<BR><BR>Regards,<BR><BR><BR>Michael Lee<BR>MCL Systems=20
Inc.<BR><BR>Pickering, John (NORBORD) wrote:<BR>
<BLOCKQUOTE =
cite=3D"mid611340310619D711AA4000306E1CC5120279794F@TORHEXCH"=20
type=3D"cite"><PRE wrap=3D"">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: <A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:nicolas.au@bnpparibas.com">nicolas.au@bnpparibas.com</A> =
[<A class=3Dmoz-txt-link-freetext =
href=3D"mailto:nicolas.au@bnpparibas.com">mailto:nicolas.au@bnpparibas.c=
om</A>]
Sent: Wednesday, August 25, 2004 11:49 AM
To: <A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:John.Pickering@norbord.com">John.Pickering@norbord.com</A=
>
Cc: <A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:powerh-l@lists.sowder.com">powerh-l@lists.sowder.com</A>
Subject: R=E9f. : RE: R=E9f. : 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 =3D "12 456 789 A B C"
DEFINE T-CC CHAR*6 =3D "Y" IF SETSYSTEMVAL("VAR_AA",(T-AA))
DEFINE T-DD CHAR*6 =3D "Y" IF SETSYSTEMVAL("VAR_BB","![REPL(VAR_AA,' =
','')]")
DEFINE T-BB CHAR*20 =3D 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
<A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:John.Pickering@norbord.com">John.Pickering@norbord.com</A=
> - 25/08/2004 17:31
Pour : Nicolas AU
cc :
Objet : RE: R=E9f. : removal of spaces in between chars.
Didn't the original question ask how to do this in Quiz not Qtp?
-----Original Message-----
From: <A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:nicolas.au@bnpparibas.com">nicolas.au@bnpparibas.com</A> =
[<A class=3Dmoz-txt-link-freetext =
href=3D"mailto:nicolas.au@bnpparibas.com">mailto:nicolas.au@bnpparibas.c=
om</A>]
Sent: Wednesday, August 25, 2004 4:24 AM
To: <A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:ggjos@hotmail.com">ggjos@hotmail.com</A>
Cc: <A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:powerh-l@lists.sowder.com">powerh-l@lists.sowder.com</A>
Subject: R=E9f. : 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 =3D "Column 1, 6789.12, Column 2, 456.78" ; any string =
you
want to test
ITEM T-CC =3D "Y" &
IF SETSYSTEMVAL("VAR_AA",(T-AA))
ITEM T-CC =3D "Y" &
IF SETSYSTEMVAL("VAR_BB","![REPL(VAR_AA,' ','')]")
ITEM T-BB =3D GETSYSTEMVAL("VAR_BB")
SUBFILE XYXYSF INCLUDE &
T-AA, &
T-BB
GO
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
Now you can use QUIZ to see the content in subfile XYXYSF.
</PRE>
<BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">acc *xyxysf
rep all
go
</PRE></BLOCKQUOTE><PRE wrap=3D""><!---->
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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
Internet
<A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:ggjos@hotmail.com@lists.sowder.com">ggjos@hotmail.com@lis=
ts.sowder.com</A> - 24/08/2004 23:56
Envoy=E9 par : <A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:powerh-l-admin@lists.sowder.com">powerh-l-admin@lists.sow=
der.com</A>
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.
_________________________________________________________________
</PRE></BLOCKQUOTE></BODY></HTML>
------_=_NextPart_001_01C48ADB.6F727720--