As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I have an issue where the database entry has trailing spaces making it 10 characters, but my report only shows 7 characters. For example: In the database is 'P123456 ' The report only shows 'P123456' My synonym shows the field is A20V. I have tried EXL2K and EXL07 and both remove the spaces. How can I get the spaces in the report?
I changed USAGE in .mas to A10 and still no trailing spaces. That said, it needs to remain 20 characters as that is the allowable input for that field. To give another example, a user may enter 'Fannie Mae ' and it does not exactly match our database entry of 'Fannie Mae'. This is a validation field and when users enter data that does not match specific fields in our database, it is reported here. There can be entries that take 20 characters, there may be entries that take only one character. There may be one mis keyed trailing space, there may be 5 or more trailing spaces. This is specifically to catch incorrect data entry.
you had said 10, above. and indicated that the problem lay in the excel export.that seems to be an issue with the way excel works. so now it seems your issue is with input, not output; if your user enters from an .htm page, then you have an &variable, yes? so you make sure to truncate that &var -SET &MYVAR = TRUNCATE(&MYVAR); to make sure you clean up what they've entered. and then use a LIKE in your filter statement -DEFAULT &MYBT = 'SEDAN '; -SET &MYBT = TRUNCATE(&MYBT) | '%'; TABLE FILE IBISAMP/CAR BY BODYTYPE BY MODEL ON TABLE SET HOLDLIST PRINTONLY IF BODYTYPE LIKE &MYBT.QUOTEDSTRING END
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Sorry, I was just giving one example. What we have is a program where data entry from clients is uploaded each morning. Some of the data entry fields are validated against current loan data to verify there is actually a matching loan, servicer, investor, etc... If something doesnt match, it goes into an error table. The entry that failed is entered exactly how it was given by client. So if they give us data that has trailing spaces, it will fail because the database doesnt get an exact match because it takes the trailing spaces into account. The filed I need for the report is in an Oracle database. It is Data Type: VARCHAR2 (20 Byte). When I do a simple TABLE FILE table PRINT field in any format I do not get the trailing spaces in the example I have in my database. I have tried SQL Report and I do not get the trailing spaces. I select Sample Data from that field within a WebFocus synonym and I do not get the trailing spaces. I also tried to see if I could just get the length using ARGLEN function, and that does not count the spaces. Im wondering if WebFocus just does not report actual trailing spaces? If so I will need to contact IBI because that is incorrect data being returned.
Add another test to compare the ARGLEN of the field against the ARGLEN of the field soft concatenated with a non blank character - 1. If the lengths do not agree then you have trailing blank(s).
DEFINE FILE something
APPARENT_LEN/I2 = ARGLEN(20, field, 'I2');
REAL_LEN/I2 = ARGLEN(21, field | '#', 'I2') - 1;
END
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
then you need to better manage your matching process. the concept of 'trailing spaces' in a /AnV field doesn't make sense.... they're mutually exclusive, by def. you need to understand that your browser is going to ignore trailing spaces, so you need to separate the concept of database from the concept of what you see in your browser. your issue has zero to do with wf.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Originally posted by Tony A: Add another test to compare the ARGLEN of the field against the ARGLEN of the field soft concatenated with a non blank character - 1. If the lengths do not agree then you have trailing blank(s).
DEFINE FILE something
APPARENT_LEN/I2 = ARGLEN(20, field, 'I2');
REAL_LEN/I2 = ARGLEN(21, field | '#', 'I2') - 1;
END
T
I should get 10 (7 char + 3 spaces) I get this: APPARENT_LEN = 7 REAL_LEN = 20 (that is the size of the field)
Originally posted by susannah: then you need to better manage your matching process. the concept of 'trailing spaces' in a /AnV field doesn't make sense.... they're mutually exclusive, by def. you need to understand that your browser is going to ignore trailing spaces, so you need to separate the concept of database from the concept of what you see in your browser. your issue has zero to do with wf.
This is how we manage our matching process. We get data from clients, we must import data exactly as a liability. This validation report shows clients what they do wrong so we get more correct data files.
Use LENV() to get the length "taken from the length-in-bytes of the field", and subtract the result of ARGLEN() to compute the number of trailing blanks stored in the field.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
When I change the USAGE back to A20V, I get 10 using LENV(). I also get 10 in REAL_LEN with Tony A example. So now I know it is passing the spaces, it's just not reporting them...
As a test I would append a character to the end of the column and run the report in PDF format.
HTML reduces multiple blanks to one. The Excel format WF generates isn't really Excel so you can't be sure that your Excel file is behaving as expected. Or, perhaps, one of the esoteric Excel formats will work:
quote:
The report formats and Excel workbooks that you can create are:
EXL07 (Excel 2007/2010 Workbook). With Excel 2007, Microsoft introduced enhanced worksheet functionality in a new workbook file format. The EXL07 format supports most StyleSheet attributes, allowing for full report formatting. The computer on which the report is being displayed must have Microsoft Excel 2007 or higher installed.
EXL2K (Excel 2000/2003 Workbook). The EXL2K format supports most StyleSheet attributes, allowing for full report formatting. The computer on which the report is being displayed must have Microsoft Excel 2000 or higher installed. By default, leading and internal blanks are compressed on the report output. For information on preserving them, see Preserving Leading and Internal Blanks in Report Output. In addition, WebFOCUS supports three EXL2K variations: EXL2K FORMULA, EXL2K PIVOT, and EXL2K TEMPLATE. When any of these formats is specified, additional processing is done.
EXL2K FORMULA. If you display a report using the format variation EXL2K FORMULA, the resulting worksheet will contain Excel formulas that calculate and display the results of any type of summed information (such as column totals, row totals, and sub-totals).
EXL2K PIVOT. Generates a fully functional Excel PivotTable, an Excel tool for analyzing complex data, much like WebFOCUS OLAP.
EXL97 (Excel 97 Spreadsheet). EXL97 is an HTML-based display format that opens in Excel 97 or higher and supports report formatting and drill-downs. The computer on which the report is being displayed must have Microsoft Excel 97 or higher installed.
EXCEL (Excel Spreadsheet). EXCEL is a binary display format with limited formatting support. (Although it does not support text fields, EXL2K format does.) The computer on which the report is being displayed must have Microsoft Excel installed.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
So maybe not HTML, this scenario could be something we say has do be seen in only Excel, if I can get it to work...
So, how do you think you will depict trailing blanks when you cannot see them?
What Im trying to achieve is the Excel export from WebFocus gives me the same output as Excel export from Oracle. I cannot visually see the trailing spaces when exporting directly from Oracle, but when I see a value that looks to be correct and click inside the cell exported from Oracle, I am able to right arrow past the characters to see there are spaces. In the WebFocus export to Excel, it does not include the spaces after characters that are in the database. What I dont understand is why in WebFocus, when I add this formula: COMPUTE ALEN/I2 = LENV(field, ALEN); It gives me 10, which is correct (7 characters + 3 spaces), but When i click throught that field in excel, it does not include the spaces. So the spaces are recognized, but not exported.
And the reason for why LENV displays correct length of 10 is WF will preserve internal blanks in all calculations and HOLD files. Only in HTML and EXL2k by default blanks are removed.
It appears that for Excel, the trailing blanks are ignored even if if you append a character at the end of the trailing blanks...
As Jack suggested, convert the blanks to some other character - either a visible character or perhaps you can find a special character that is rendered as a blank.
Or, using Jack's suggestion re. LENV() and ARGLEN(), create a column showing a count of trailing blanks.
Are you also concerned with multiple consecutive blanks that are not trailing?
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Originally posted by Rifaz: hi Mikey, It may not help. But, just heads up.To keep the trailing blanks in excel, this is my first post in focal point, i guess. Take a look.
This will add leading spaces, but thats not my issue.
Also, we use WebFocus to display the report data, but use Oracle Procedures, Views and MVs to get the desired data. So I can easily turn those blanks into just about anything I want in Oracle before passing it to WF. Changing the spaces to anything else is not my issue. The issue is I need SET SHOWBLANKS = ON to work with trailing spaces. Maybe SET TRAILINGSPACES = ON will be added one day!
I think this was previously suggested, why not ensure that the triling blanks are truncated when the database is updated? An easy fix and then you don't need this error report.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
FILEDEF XLDATA DISK xldata.csv
TABLE FILE ibisamp/car
PRINT COUNTRY CAR MODEL SEATS
COMPUTE COUNTRYV/A11V = COUNTRY;
ON TABLE SAVE AS XLDATA FORMAT COMMA
END
SET HTMLFORMTYPE=CSV
-RUN
-HTMLFORM XLDATA
Notes: The SET HTMLFORMTYPE=CSV may not be officially supported. Need to be configured to open .csv in Excel. Appears to work with Oracle varchars. Does not appear to work for alpha fields that contain all digits.
Question: Why is this important? Any other reason than wanting to exactly mimic what your Oracle tool does?
WebFOCUS 8.2.06
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010