Focal Point
[CLOSED] Remove spaces from all data in a DFIX file

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6517058196

October 21, 2019, 12:19 PM
vaayu
[CLOSED] Remove spaces from all data in a DFIX file
Hello,
I have a customer who's creating a DFIX file to be used as an input to another system. Somehow this procedure used to not have any extra spaces in WF8009 but some fields show up as spaces instead for blank or empty in WF8201. He didn't want to change the procedure to add MISSING ON for the fields in question.
The file is a comma separated data values and has some defines to insert blanks to skip to next field as below
BLANK/A1 ='';
The above field when held as PCHOLD FORMAT DFIX shows up as a SPACE.
Any ideas on how to get rid of these extra spaces in the entire output file?

Thanks in advance!!

This message has been edited. Last edited by: FP Mod Chuck,


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
October 23, 2019, 11:04 AM
FP Mod Chuck
Vaayu

Can you please post the code and some sample data.

This message has been edited. Last edited by: FP Mod Chuck,


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 23, 2019, 11:12 AM
vaayu
Very simple example to show the problem.
DEFINE FILE CAR
BLANK/A1 = '';
END
TABLE FILE CAR
PRINT CAR BLANK COUNTRY BLANK SALES
ON TABLE PCHOLD FORMAT DFIX DELIMITER ,
END


We tried to suggest to use MISSING ON but, they're not looking to change lot of defines, they claim that this was working with no spaces/blanks in the output file from 8009 release but not in 8201. Is there a setting to squeeze or replace all spaces in the file?

Thanks in advance!


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
October 23, 2019, 12:10 PM
FP Mod Chuck
I have an 8009 vmware and 8206 vmware I get the same results when running the sample code in both releases.


JAGUAR, ,ENGLAND, ,0
JAGUAR, ,ENGLAND, ,12000
JENSEN, ,ENGLAND, ,0
TRIUMPH, ,ENGLAND, ,0
DATSUN, ,JAPAN, ,43000
TOYOTA, ,JAPAN, ,35030
ALFA ROMEO, ,ITALY, ,4800
ALFA ROMEO, ,ITALY, ,12400
ALFA ROMEO, ,ITALY, ,13000
MASERATI, ,ITALY, ,0
AUDI, ,W GERMANY, ,7800
BMW, ,W GERMANY, ,8950
BMW, ,W GERMANY, ,8900
BMW, ,W GERMANY, ,14000
BMW, ,W GERMANY, ,18940
BMW, ,W GERMANY, ,14000
BMW, ,W GERMANY, ,15600
PEUGEOT, ,FRANCE, ,0


When I change the code to


TABLE FILE CAR
PRINT CAR COUNTRY SALES
ON TABLE PCHOLD FORMAT DFIX DELIMITER ,
END


I get the same results in both releases as well.


JAGUAR,ENGLAND,0
JAGUAR,ENGLAND,12000
JENSEN,ENGLAND,0
TRIUMPH,ENGLAND,0
DATSUN,JAPAN,43000
TOYOTA,JAPAN,35030
ALFA ROMEO,ITALY,4800
ALFA ROMEO,ITALY,12400
ALFA ROMEO,ITALY,13000
MASERATI,ITALY,0
AUDI,W GERMANY,7800
BMW,W GERMANY,8950
BMW,W GERMANY,8900
BMW,W GERMANY,14000
BMW,W GERMANY,18940
BMW,W GERMANY,14000
BMW,W GERMANY,15600
PEUGEOT,FRANCE,0


I'm not sure which results they are wanting but I am not having any issues with either release I am testing. I don't have 8201 anymore...


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 23, 2019, 07:22 PM
Hallway
Since Chuck is getting the same result in his 8009 release, I would suggest looking at your edasprof file from 8009 and see if there was a SET that didn't get included when upgrading to 8201M.


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
October 24, 2019, 03:59 PM
vaayu
Both evnvironments look same we didn't find any other SET differences. It is odd though why its behaving this way. Also, I found if we use FORMAT COM, it will supress these blanks but, we end up with double quoted strings.

Any other ideas to get rid of all spaces?

Thanks as always!


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
October 31, 2019, 10:31 AM
FP Mod Chuck
Vaayu

If this is still an issue I suggest you open a case with techsupport.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
November 01, 2019, 08:38 AM
jgelona
vaayu,

This sounds like MISSING/NULL vs. BLANK. We use comma and tab delimited files a lot (DFIX files). Blank fields are returned with delimiter blank delimiter. MISSING/NULL fields are two consecutive delimiters. You might check your metadata to make sure nothing changed.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
November 01, 2019, 10:40 AM
vaayu
Thanks, even with CAR example we're getting different outputs so thats still odd. There must be something environmental, its 8201M actually where I'm seeing these spaces/blanks.


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************