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 do not believe that I will be able to do this, but I figured I'd ask. I'm looking to localize the dates in my Master File. For example, I have a variable that Identifies whether my default location is US or UK. If US I want the master file I access to use MDYY. If it is UK I want the Master File to use DMYY. I am looking to do this without having to maintain 2 master files. I did find the following documentation
quote:
Reference: Support for Variables in Master and Access File Attributes In the Master File, the following attributes can be parameterized with variables: POSITION, OCCURS, REMARKS, DESCRIPTION, TITLE, HELPMESSAGE.
In the Access File, the following attributes can be parameterized with variables: CONNECTION, TABLENAME, START, CHKPT_SAVE, CHKPT_FILE, POLLING, TIMEOUT, MAXLUWS, ACTION, MSGLIMIT, DIRECTORY, NAME, EXTENSION, DATA_ORIGIN, MAXFILES, MAXRECS, PICKUP, TRIGGER, DISCARD, ARCHIVE.
Note: You can concatenate multiple variables to create an attribute value.
Because of that, I am assuming that this can't be done. But if anyone has come across a work around or other solution, I would love to hear it.
Thanks!This message has been edited. Last edited by: Kerry,
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
SmartDate storage is the same no matter the format. So you really just need to find a way to change the format based on the country. Here are a couple of ideas to try. The first uses a LET command to append the appropriate date format to the end of the date field every time it appears. This provides a global approach (say in EDASPROF), but may cause problems in DEFINEs and other places where the date is not being displayed - but still might be worth a try, especially if you can name the LET something different (say DISPLAY_DATE) from your date field name. The second requires inserting a DM variable whenever your date field will be displayed.
-DEFAULTS &CNTRYX = 'UK';
-*
-SET &DTFMT = IF (&CNTRYX EQ 'US') THEN 'MDYY' ELSE
- IF (&CNTRYX EQ 'UK') THEN 'DMYY' ELSE 'YYMD';
-*
LET CURRDATE = CURRDATE/&DTFMT
-*
DEFINE FILE CAR
CURRDATE/YYMD = '&YYMD';
END
-*
TABLE FILE CAR
PRINT COUNTRY CURRDATE
END
-DEFAULTS &CNTRYX = 'UK';
-*
-SET &DTFMT = IF (&CNTRYX EQ 'US') THEN 'MDYY' ELSE
- IF (&CNTRYX EQ 'UK') THEN 'DMYY' ELSE 'YYMD';
-*
DEFINE FILE CAR
CURRDATE/YYMD = '&YYMD';
END
-*
TABLE FILE CAR
PRINT COUNTRY CURRDATE/&DTFMT
END
There is a DATEFORMAT setting, but unfortunately it only applies to DateTime values, and not SmartDates.This message has been edited. Last edited by: Dan Satchell,
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
Waz, but that is not a real solution. Now you have two different fields. I wonder if you can use a variable format based on the country of the user within the master. And then use that in a defined field in the master. .. DEFINE FMT/A8=DECODE &COUNTRYUSER(UK DMYY US MDYY NL YYMD);,$ DEFINE DATEFIELD/FMT=BASEDATE;,$
...
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
Well probably not, but it is used here, nore because we have common Fex's that report of different schemas. The columns names are the same but the formats vary. So the solution was to have one master, and the variations in the master as different fields all ounting to the same column. The fex knows which column via an Amper variable.
Fits neatly together, and the fex doesn't care about working out the format, its just there.
Would love to know if the defined FMT field is a possibility.
We are utilizing Oracle here. I can try it and see what happens. It might take it.
Dan,
Interesting approach. I don't think option 1 will fit our needs, but something to keep in mind. Option 2 could work for developers, but this wouldn't work in adhoc reporting. I need something that is simple and works for end users and developers new to WebFOCUS.
Frank,
I will try to do a proof of concept on your idea tomorrow.
I wonder if I can do a hybrid of yours and Dan's approach. Something like:
DEFINE DATEFIELD/&FMT=BASEDATE;,$
The help file doesn't say anything about what amper variables are allowed in Defines.
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
Unfortunately I missed summit last year. I haven't heard of MFD_PROFILE before. You wouldn't happen to have a copy of that presentation that you could share, or be able to pass on any details about it, would you?
Thanks
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
Go to tech support on the ibi web site and do a search for MFD_PROFILE.
Basically the MFD_PROFILE is a fex that runs at the beginning of master file processing. You may be able to create a global variable that can be used as your display format for dates.
Like I said, we are not on 7.7 so I don't have the ability to try it out, but it might work.
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