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 believe I have found a bug in the WebFOCUS 8 language parser. Consider the following code:
-SET &LF=HEXBYT(10,'A1');
DEFINE FILE CAR
CARNAME/A54=COUNTRY || (',&LF' | CAR) || (',&LF' | MODEL);
END
TABLE FILE CAR
PRINT COUNTRY AS 'Country&LF|of Origin'
CARNAME AS 'Country&LF|Car&LF|Model'
ON TABLE PCHOLD FORMAT EXL2K
END
This runs fine in WebFOCUS 7.6.11 and earlier releases.
However in WebFOCUS 8 (specifically 8.0.06), this gives the following errors:
0 ERROR AT OR NEAR LINE 4 IN PROCEDURE testcar FOCEXEC *
(FOC257) MISSING QUOTE MARKS: '
0 ERROR AT OR NEAR LINE 7 IN PROCEDURE testcar FOCEXEC *
(FOC003) THE FIELDNAME IS NOT RECOGNIZED: of
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT
What is happening is that the parser is not respecting the quoted string. It is seeing the line feed and saying that is the end of the line.
I can get by the first error by creating a LF/A1 field in the DEFINE and using that in the concatenation instead of using the &LF. It is less efficient, but that works.
However, I have not been able to find anything that lets me embed a LF in the column title. Please don't suggest using a comma (i.e. AS 'Country,of Origin'). I have some really long column titles (5 lines). When using the comma, and if I have 5 lines in one column, "AS 'Region'" effectively becomes "AS ',,,,Region'". With this, my formatting macros that vertically center the column titles don't work because of all of the extra line feeds WebFOCUS inserts.
I have opened a problem report with IBI but they haven't come up with a work-a-round. I can use some other character such as a colon the replace the colon with a LF in my macro, but I'd rather not update 30 macros if I don't have to.
Anyone have a suggestion?This message has been edited. Last edited by: jgelona,
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
The error occurs in v7.7.03 and v7.7.05. I don't have a suggestion, other than not treating the column titles as "lines" and instead use WRAP to narrow the width of the column.
SALES AS 'This is a very very very long column title'
...
TYPE=REPORT, COLUMN=SALES, WRAP=2, $
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
Interestingly enough, line breaks directly in the master seem to work:
FILENAME=CAR,SUFFIX=FOC
SEGNAME=ORIGIN,SEGTYPE=S1
FIELDNAME=COUNTRY,COUNTRY,A10,FIELDTYPE=I,$
SEGNAME=COMP,SEGTYPE=S1,PARENT=ORIGIN
FIELDNAME=CAR,CARS,A16,
TITLE='Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8', $
...
So, when using the field in a request without any alias the title is rendered "as is", which in EXL2K gives you the line break you are looking for. It won't work for HTML because browsers don't render LF as "line breaks", requiring <br /> instead but that's a different issue!.
TABLE FILE CAR
PRINT
CAR
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=REPORT, FONT='ARIAL', SIZE=8, $
TYPE=TITLE, BACKCOLOR='SILVER', $
ENDSTYLE
END
This won't work when you need to provide your own titles for newly DEFINE or COMPUTE fields and I'm obviously not suggesting that all TITLE's in your masters be changed either. This was just an exercise to determine if there was a way to embed line-feeds in columns titles on EXL2K reports without using WebFOCUS's default "comma" functionality, and yes, it is possible under certain circumstances yet a bit painful This message has been edited. Last edited by: njsden,
Originally posted by j.gross: Then again, isn't that what a comma is supposed to do?
That is what IBI said and the comma would be great except that if I have this:
REGION AS 'Region'
ENTRY_DT AS 'Current,Placement,Entry,Date'
It is executed as if I had coded this:
REGION AS ',,,Region'
ENTRY_DT AS 'Current,Placement,Entry,Date'
The title for Region has 3 line feeds I did not put in and when I try to center the cell vertically, nothing happens because of these extraneous line feeds. This is how FOCUS has worked forever, so I don't expect them to change that behavior. What I do expect is that the information inside a quoted string to be processed as what it is, a quoted string.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
Curious how there isn't a style option for vertical justification, while there is for horizontal... That would solve your issue with comma's, I think?
Looks like an omission to me.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
Here's the reply I got back from IBI. Not happy, but it is what it is.
"The Division explained that:
Linefeeds and binary zeroes have special meaning and can't be part of focexec.
In 76 it sometimes slipped in, sometimes did not work either. In 77 it does not
work. Mainframe is different because of the record-based I/O as opposed to
stream-based where linefeed signifies beginning of the new record. But binary
zeroes won't work there too this is unavoidable."
In 76 it didn't sometimes slip through it "slipped through" everytime I tried to use it. Dialogue Manager, TABLE, DEFINE and MODIFY.
My work-a-round is to use a : instead of a comma, then in the formatting macro, in the column titles, change the : to a LF.
I have also submitted a NFR (IBI Case# 10733540 internal: 000280628) requesting that for Excel column titles (and other relevant format), that LF be inserted only where there is a comma. If one title has 3 embedded commas (4 lines in the title), do not insert 3 LF if there is a column title with no commas.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
Wep5622, for what it is worth, I have submitted another NFR for Vertical Justification. Case#10733539 internal:000280628
Here's what I sent:
Currently there is JUSTIFY=CENTER for horizonal center. I am requesting new options,
VCENTER, VTOP, and VBOTTOM. JUSTIFY would have 2 components, a horizontal component
and a vertical component. Components could be separted by a /.
The Vertical component would be to the right of the slash. If there is no /, only
the horizontal component is present and existing code would work.
It could be implemented like this:
JUSTIFY=LEFT/VCENTER or
JUSTIFY=/VTOP
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006