Removing Spaces
brian_matthewsbrian matthews
brian_matthews_bmw@hotmail.com
Thu, 17 Mar 2005 00:01:28 +0000
a slight error in the earlier offering, the two setsystemval items should
have been coded as follows,
DEFINE T-CC CHAR*6 = "Y" IF SETSYSTEMVAL("VAR_AA",(T-AA)) &
and record PRIMARY-MST exists
DEFINE T-DD CHAR*6 = "Y" IF SETSYSTEMVAL("VAR_BB","![REPL(VAR_AA,' ','')]")
&
and record PRIMARY-MST exists
regards Bri,
>From: "brian_matthewsbrian matthews" <brian_matthews_bmw@hotmail.com>
>To: johnsont@wfu.edu, powerh-l@lists.sowder.com
>Subject: RE: Removing Spaces
>Date: Wed, 16 Mar 2005 22:34:35 +0000
>
>defines are evaluated only when referenced, try ' report T-AA T-CC T-DD
>T-BB '.
>
>If you want this to execute for many records in the file PRIMARY-MST you
>will probably have to modiffy three of the lines as below,
>
>>DEFINE T-CC CHAR*6 = "Y" IF SETSYSTEMVAL("VAR_AA",(T-AA)) &
>if record PRIMARY-MST exists
>
>>DEFINE T-DD CHAR*6 = "Y" IF SETSYSTEMVAL("VAR_BB","![REPL(VAR_AA,'
>>','')]") &
>if record PRIMARY-MST exists
>
>>DEFINE T-BB CHAR*30 = GETSYSTEMVAL("VAR_BB") &
>if record PRIMARY-MST exists
>
>this is because items which do not reference record items are evaluated
>only once ( I think ), the code above ties the define processing to the
>primary file.
>
>
>regards Bri,
>
>
>>From: Ted Johnson <johnsont@wfu.edu>
>>To: powerh-l@lists.sowder.com
>>Subject: Removing Spaces
>>Date: Wed, 16 Mar 2005 16:42:52 -0500
>>
>>I am trying to remove all the spaces from a field. I found the following
>>code from some previous postings.
>>
>>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
>>
>>Which I changed to:
>>
>>ACCESS PRIMARY-MST
>>
>>SELECT IF BOX-CREATE-WHO = 'SCTSYNCH'
>>
>>DEFINE T-AA CHAR*30 = BOX-SORT-NAME
>>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*30 = GETSYSTEMVAL("VAR_BB")
>>REPORT T-AA T-BB
>>GO
>>EXIT
>>
>>However the output field T-BB is always blank.
>>
>>When I do
>>
>>ACCESS PRIMARY-MST
>>
>>DEFINE T-AA CHAR*30 = "Johnson, Theodore H."
>>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*30 = GETSYSTEMVAL("VAR_BB")
>>REPORT T-AA T-BB
>>GO
>>EXIT
>>
>>I get the following output
>>
>>T-AA T-BB
>>
>>Johnson, Theodore Harold Johnson,TheodoreHarold
>>
>>Why can't I get the output to work correctly when reading from a field?
>>
>>Thanks,
>>
>>Ted Johnson
>>
>>
>>
>>--
>>****************************************************
>>Ted Johnson johnsont@wfu.edu
>>Information Systems
>>Wake Forest University 336-758-4374
>>Winston-Salem, NC 27109 336-758-7127 FAX
>>
>>"Good judgment comes from experience and a lot of
>>that comes from bad judgment".
>> -- Richard Karn
>>
>>
>>
>>= = = = = = = = = = = = = = = = = = = = = = = = = = = =
>>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.
>
>_________________________________________________________________
>Want to block unwanted pop-ups? Download the free MSN Toolbar now!
>http://toolbar.msn.co.uk/
>
>= = = = = = = = = = = = = = = = = = = = = = = = = = = =
>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.
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger