Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Removing blank Column spaces
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Removing blank Column spaces
 Login/Join
 
Gold member
posted
Hello There,

I am using the following command:

ON TABLE HOLD AS MATESTHLD FORMAT DFIX DELIMITER .

My out result is:

Column1. .Column3.Column4

What I need as an Output is

Column1..Column3.CoLumn4

I dont wont to pass anything through for any empty columns and having spaces for them throws it all off

Any ideas?

Thanks

This message has been edited. Last edited by: Kerry,



Production & Development: WebFocus 7.6.4
 
Posts: 50 | Registered: August 20, 2008Reply With QuoteReport This Post
<JG>
posted
COMPUTE COLUMN2/A10 MISSING ON= IF COLUMN2 EQ ' ' THEN MISSING ELSE COLUMN2;
 
Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Here's an example using the CAR file.

Look at the defined field N4_TEXT. Is that what you want?

-*-------------------------------------------------------
DEFINE FILE CAR
T_KEY/I3 WITH MODEL = T_KEY + 1;
-*
T_TEXT/A50 = DECODE T_KEY (
1 'Column1Column2Column3Column4'
2 'Column1 Column3Column4'
3 'Column1Column2Column3 '
4 'Column1 Column4'
5 ' Column2Column3Column4'
6 ' Column4'
7 ' '
8 ' Column3Column4'
ELSE '');
-*
T_COL1/A7 = EDIT(T_TEXT,'9999999');
T_COL2/A7 = EDIT(T_TEXT,'$$$$$$$9999999');
T_COL3/A7 = EDIT(T_TEXT,'$$$$$$$$$$$$$$9999999');
T_COL4/A7 = EDIT(T_TEXT,'$$$$$$$$$$$$$$$$$$$$$9999999');
-*
N1_TEXT/A07 = IF T_COL1 EQ ' ' THEN '' ELSE T_COL1;
N2_TEXT/A15 = IF T_COL2 EQ ' ' THEN N1_TEXT ELSE (IF N1_TEXT EQ ' ' THEN T_COL2 ELSE N1_TEXT || '.' || T_COL2);
N3_TEXT/A23 = IF T_COL3 EQ ' ' THEN N2_TEXT ELSE (IF N2_TEXT EQ ' ' THEN T_COL3 ELSE N2_TEXT || '.' || T_COL3);
N4_TEXT/A31 = IF T_COL4 EQ ' ' THEN N3_TEXT ELSE (IF N3_TEXT EQ ' ' THEN T_COL4 ELSE N3_TEXT || '.' || T_COL4);
END
-*
TABLE FILE CAR
PRINT
T_KEY
T_TEXT
-*
T_COL1
T_COL2
T_COL3
T_COL4
-*
N4_TEXT
WHERE RECORDLIMIT EQ 8
END
-*-------------------------------------------------------

Jim


WebFocus 8.201M, Windows, App Studio
 
Posts: 226 | Location: Lincoln Nebraska | Registered: August 12, 2008Reply With QuoteReport This Post
Gold member
posted Hide Post
Looking at what JG and you have posted....I realized I need something as simple as:

SET NODATA='';

Since, I am trying to apply this to a number of columns and DEFINE FILE would be quite tiresome not just for now, but for future debuggin.

However, I can not seem to get the NODATA to work...Can you explain this and provide me a solution (that is NODATA related)?


Thanks,



Production & Development: WebFocus 7.6.4
 
Posts: 50 | Registered: August 20, 2008Reply With QuoteReport This Post
<JG>
posted
quote:
SET NODATA='';

Have you really got nodata.

If you are working with hold files then you have to propogate the missing attributes to
the hold files otherwise it will substitute spaces and 0's.

look at SET HOLDMISS = ON and look at the documentation 'Preserving Missing Data Values in an Output File'
 
Reply With QuoteReport This Post
Gold member
posted Hide Post
Got it to work with the SET HOLDMISS=ON

THANKS!!



Production & Development: WebFocus 7.6.4
 
Posts: 50 | Registered: August 20, 2008Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Removing blank Column spaces

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.