Removing Spaces
Knox, Dave (Dallas, CSC)
KnoxDa01@unisourcelink.com
Wed, 16 Mar 2005 17:10:30 -0500
Under some circumstances defines an not evaluated unless required.
Reporting T-BB is probably not causing T-DD to be actioned...
Try adding a condition to the end of each define referencing another to
trigger them...
T-DD......if T-CC = "Y"
T-BB.......if T-DD = "Y"
Report T-BB...
Regards
Dave Knox
-----Original Message-----
From: powerh-l-admin@lists.sowder.com
[mailto:powerh-l-admin@lists.sowder.com] On Behalf Of Ted Johnson
Sent: Wednesday, March 16, 2005 3:43 PM
To: powerh-l@lists.sowder.com
Subject: Removing Spaces
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.