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 am having problems with the LCWORD function. My report has worked fine for ages formatting an UPPER case address into proper case and now it is doing something rather strange.
Each row of the report has 1 address split up into 5 components. If the length of the text in the next row is less than the row above, the remainder from the row above is appended onto the end of the text.
e.g row 1 is "Chelmsford Road" row 2 should be "West Vale" row 2 is "West Valed Road"
What is happening (and why now when this project is finished!!)
Many Thanks
DevStudio 7.6.1. SQL Server 2005
Posts: 31 | Location: Basingstoke - England | Registered: September 17, 2007
I extract the data from the database with this code
TABLE FILE MBC_BILLINGBILL
BY CUSTOMERACCOUNTNUMBER
BY SITEADDRESS1
BY SITEADDRESS2
BY SITEADDRESS3
BY SITEADDRESS4
BY SITEPOSTCODE
BY SERVICEACCOUNTNUMBER
BY METERPOINTNUMBER
BY BILLSTARTDATE
BY BILLENDDATE
BY BILLTYPE
BY SERVICEACCOUNTSTATEMENTID AS SASID
-SET &COUNTER = 1;
WHERE CUSTOMERACCOUNTNUMBER EQ &CANUMBER
-IF &CANUMBER0.EXISTS THEN GOTO STARTLOOPB ELSE GOTO DONEB;
-STARTLOOPB
-REPEAT LOOPB WHILE &COUNTER LT &CANUMBER0;
-SET &COUNTER = &COUNTER + 1;
OR &CANUMBER.&COUNTER
-LOOPB
-DONEB
WHERE (BILLDATE GE DT(&DATESTART)) AND (BILLDATE LE DT(&DATEEND));
ON TABLE HOLD AS Z_BULK&CURUSER FORMAT FOCUS INDEX SERVICEACCOUNTSTATEMENTID
END
-RUN
There is a little loop in there that processes more that one CANUMBER and when I view this data it is fine.
As you can see there are some commented SITE defines. If I use them I dont get the error.
The final table file is
TABLE FILE Z_P1&CURUSER
PRINT
CUSTOMERNAME AS 'Customer name'
CANUMBER AS 'CA No'
CUSTOWNREF AS 'Cust Own Ref'
SITE1 AS 'Address 1'
SITE2 AS 'Address 2'
SITE3 AS 'Address 3'
SITE4 AS 'Address 4'
SITEPOSTCODE AS 'Postcode'
SERVICEACCOUNTNUMBER AS 'Service Acc No'
............
ON TABLE PCHOLD FORMAT EXL2K
END
Hope this will shed some light. I have spoken to the guys that manage the WebFOCUS server and nothing has been updated recently apart from us going to British Summer Time.
Many Thanks
DevStudio 7.6.1. SQL Server 2005
Posts: 31 | Location: Basingstoke - England | Registered: September 17, 2007
Here is one I did with EMPLOYEE that looks a lot like yours and I didn't have any problems.
DEFINE FILE EMPLOYEE
LC_LNAME/A10=LCWORD(10,LAST_NAME,LC_LNAME);
SITE1/A20=LCWORD(20,ADDRESS_LN1,SITE1);
SITE2/A20=LCWORD(20,ADDRESS_LN2,SITE2);
SITE3/A20=LCWORD(20,ADDRESS_LN3,SITE2);
END
TABLE FILE EMPLOYEE
PRINT LC_LNAME
ADDRESS_LN1 SITE1 AS 'Address 1'
ADDRESS_LN2 SITE2 AS 'Address 2'
ADDRESS_LN3 SITE3 AS 'Address 3'
BY EMP_ID
ON TABLE PCHOLD FORMAT EXL2K
END
quote:
As you can see there are some commented SITE defines. If I use them I dont get the error.
And I don't understand this. If you uncomment those lines, you would override the LCWORD defines. Please explain further.
The issue is with the A100V columns - I don't think some of the string functions work well with variable length fields. Special functions exist for these: LENV, LOCASV, POSITV, SUBSTV, TRIMV, UPCASV. No Mixed Case though (at least not in v5.3.2 - check your manual for your version).
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
If I change the defines so that SITE1 does not use the LCWORD function, the error does not appear. I left those there so that you could see what I have done to locate the error.
I suppose I should log a fault with InfoBuilders because if you 2 are not sure what is wrong I reckon it is broken.
Many Thanks
DevStudio 7.6.1. SQL Server 2005
Posts: 31 | Location: Basingstoke - England | Registered: September 17, 2007
Thanks for the info in the V thing. I have taking that out of the master file and it has worked. I seem to remember something about that in the past, but in all honesty it was over 6 months ago and I haven't worked on WebFOCUS for 4 months!
Looks like the answer is always in the forum.
Cheers
DevStudio 7.6.1. SQL Server 2005
Posts: 31 | Location: Basingstoke - England | Registered: September 17, 2007