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 set &IBIWF_language to 'fr' and tried using a Date Format to hopefully display the Month in French. It does not work - it is displayed in English.
I also selected "French" from the "Dynamic Language Switch" selection on the MRE login page.
This code produces a Month Name in English:
-SET &IBIWF_language = 'fr';
DEFINE FILE CAR
DT1/A8YYMD = '20110308';
DT1A/DMtrYY = DT1;
END
TABLE FILE CAR
PRINT
DT1
DT1A
COUNTRY NOPRINT
WHERE READLIMIT EQ 1
END
-RUN
I thought this would automatically work. Do I have to use a Date Function?This message has been edited. Last edited by: Francis Mariani,
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
For [Web]FOCUS to know what language you want to use.
&IBIWF_language is there for us to know what language selection the user made at the WF client level but in my experience has no relevance at the FOCUS level. Only MRE/BID stuff.
Hmmm, maybe what I said is not entirely correct ... you'll need SET LANG so WebFOCUS can pick the right TITLE_xx from the master files and customize the error messages.
I am not sure if having a /DMtrYY field will make the automatic translation but in the past I've always resorted to using DATETRAN for that purpose.
Thank - I'll give that a try, but I wish I didn't have to, for two reasons: I have to modify several reports to resolve this issue and this DATETRAN function is an oddity in its syntax.
Cheers,
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
Well, if National Language Support (NLS) is not really supported in WF when it comes to dates, one can always resort to MLS ... "Manual Language Support" which even with its limitations doesn't fail
-SET &IBIWF_language = 'fr';
SET LANG = &IBIWF_language
-RUN
DEFINE FUNCTION DTFMT (ADATE/A8YYMD, FMTLANG/A2)
MTH/A2 = EDIT(ADATE, '$$$$99$$');
FLANG/A2 = UPCASE(2, FMTLANG, FLANG);
MTHNM/A20 = IF FLANG EQ 'FR' OR 'FC' THEN (
DECODE MTH (01 'janvier' 02 'février' 03 'mars' 04 'avril' 05 'may' 06 'juin'
07 'jouillet' 08 'août' 09 'septembre' 10 'octobre' 11 'novembre' 12 'décembre'
ELSE '?')
-* Add support for other languages here.
-* IF LANG EQ 'XX' THEN (
-* DECODE MTH (....)
-*
-* Default to English
) ELSE (
DECODE MTH (01 'January' 02 'February' 03 'March' 04 'April' 05 'May' 06 'June'
07 'July' 08 'August' 09 'September' 10 'October' 11 'November' 12 'December'
ELSE '?')
);
DTFMT/A30 = MTHNM || (' ' | EDIT(ADATE, '$$$$$$99')) | ' ' | EDIT(ADATE, '9999$$$$');
END
DEFINE FILE CAR
DT1/A8YYMD = '20121208';
DT1A/DMtrYY = DT1;
DT2A/A17 = LCWORD(17,CHGDAT('YYMD', 'MXDYY', DT1, 'A17'), 'A17') ;
NEW_DT/A30 = DTFMT(DT1, '&IBIWF_language');
END
TABLE FILE CAR
PRINT
DT1
DT2A
NEW_DT
COUNTRY NOPRINT
WHERE READLIMIT EQ 1
END
-RUN
This won't help you though as you'll still need to change your code to make use of the function ... thinking about it, you could actually use DATETRAN directly within the function although it does not support as many languages ...
Anyway, I hope you'll find a more "native" way to support this within the product. I think many of us will benefit from it.
DATEOUTPUT is very interesting ... thanks for sharing Francis.
quote:
Now, if only we can get the accents to display properly...
Using CODE_PAGE = 1252 - Windows (Latin 1):
SET LANG = fr
SET DATEOUTPUT = LOCALIZED
DEFINE FILE CAR
TDAY1/DMtrYY WITH CAR=15022012;
TDAY2/DMtrYY WITH CAR=12082012;
TDAY3/DMtrYY WITH CAR=15122012;
END
TABLE FILE CAR
PRINT TDAY1 AND TDAY2 AND TDAY3
WHERE RECORDLIMIT EQ 1
ON TABLE SET PAGE NOPAGE
END
Hmmm, what about CODE_PAGE = 137 or 437 ... I don't remember which one of them supports Western European (Latin 1) characters but it should be sufficient to display those accents ... the change has to be made on both Rep Server and WF Client.