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.
Problem is like the Subject tells: I need to change a date like 2011/04/15 into 20110415 in such a way that WebFOCUS understands it is a date field so I can join it to an other file en make where-statements on the date. Who knows what to do?
This is what I've got: DEFINE FILE DBC_ANALYSE DATUM/YYMD=CDATE(DBC_ANALYSE.DBC_ANALYSE.DBC_AFSLUITDAG); END
TABLE FILE DBC_ANALYSE etceteraThis message has been edited. Last edited by: Kerry,
Thanks for your constructive comments, It has helped me tremendously. Are you available for serious help or not? If not, please do not bother to reply..
Maybe I'm missing something here, but why not just use EDIT to: a) Mask out the slashes, and simultaneously b) Trim the result from 17 alpha characters down to the required 8.
Then it's a simple matter to convert to true YYMD.
You have to do some work too, we cannot help you if you are not precise in your questions. As Tom states, of course the solution did not work, since the solution is for a YYMD formatted date - as you stated.
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
I am guessing that your mother tongue is german so -
Die DEFINE, die Sie erwähnen oben definiert eine Funktion aufzurufen. Dies ist im Grunde ein eigenständiges Stück Code, das Ihnen erlaubt die Eingabe eines oder mehrerer Datenelemente (in Ihrem Beispiel) mit einem Ausgang bereitzustellen. Es gibt ein paar Anforderungen innerhalb der Funktion und diese sind gut dokumentiert, aber es genügt zu sagen, dass die wichtigsten Anforderungen, die den Namen der Funktion (CDATE in Ihrem Fall die gleichen sein wie das Feld zurück (bestanden CDATE/DMYY = DATUM werden; ).
The DEFINE that you mention above defines a function call. This is basically a stand alone piece of code that allows you to input one or more data items (one in your example) to provide an output. There are a few requirements within the function and these are well documented, but suffice to say that the main requirements are that the function name (CDATE in your case must be the same as the field passed back (CDATE/DMYY = DATUM; ).
Ich wage eine Vermutung, dass diese Funktion wurde vor einer Weile als könnte man die gleiche Hilfe erreichen geschrieben einige Routinen, so dass Sie hart Codierung decodiert etc. vermeiden konnte gebaut: -
I would hazard a guess that that function was written a while ago as you could achieve the same using some built in routines so that you could avoid hard coding decodes etc. :-
DEFINE FILE CAR
DBC_AFSLUITDAG/A17 = '1 Januari 2011';
DATUMH/HYYMDs = HINPUT(17, DBC_AFSLUITDAG, 8, 'HYYMDs');
DATUM/YYMD = HDATE(DATUMH, 'YYMD');
END
TABLE FILE CAR
PRINT DBC_AFSLUITDAG
DATUM
DATUMH
BY COUNTRY
IF RECORDLIMIT EQ 1
END
Das, was man über WebFOCUS Termine erinnern ist, dass sie als eine Zählung der Tage seit dem Stichtag (31. Dezember 1970) und sie werden anders, wie sie so nicht nötig, "der Schrägstriche loszuwerden" gehalten werden angezeigt existieren.
The thing to remember about WebFOCUS dates is that they exist as a count of days since the base date (31 December 1970) and they will be displayed differently to how they are held so no need to "get rid of the slashes".
@Tom,
Folks try their best to write correct english but sometimes interpretation does present a rather abrupt and factual sounding output. I guess we should try and give them the benefit of the doubt although, as you know, I am one of the first (usually) to suggest a good session with the FOCUS manual.
Folks versuchen ihr Bestes, um eine korrekte Englisch, aber manchmal Interpretation hat gegenwärtig eine ziemlich abrupt und sachlich klingenden Ausgang. Ich denke, wir sollten versuchen, und ihnen den Nutzen des Zweifels, obwohl, wie Sie wissen, ich einer der ersten bin (meistens) eine gute Sitzung mit dem FOCUS Handbuch vorschlagen.
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
De DEFINE die u hierboven vermeld definieert een functie aan te roepen. Dit is in principe een stand-alone stukje code dat je toelaat om input van een of meer data-items (een in uw voorbeeld) te voorzien in een uitgang. Er zijn een paar eisen binnen de functie en deze zijn goed gedocumenteerd, maar het volstaat te zeggen dat de belangrijkste vereisten zijn dat de functie naam (CDATE in uw geval moet dezelfde zijn als op het gebied doorgegeven (CDATE/DMYY = DATUM; ).
Ik zou gevaar een vermoeden dat die functie was een tijdje geleden geschreven zoals je zou het hetzelfde te bereiken met behulp van enkele ingebouwde routines, zodat je kon hard te coderen decodeert enz. te vermijden: -
DEFINE FILE CAR
DBC_AFSLUITDAG/A17 = '1 Januari 2011';
DATUMH/HYYMDs = HINPUT(17, DBC_AFSLUITDAG, 8, 'HYYMDs');
DATUM/YYMD = HDATE(DATUMH, 'YYMD');
END
TABLE FILE CAR
PRINT DBC_AFSLUITDAG
DATUM
DATUMH
BY COUNTRY
IF RECORDLIMIT EQ 1
END
Het ding om te onthouden over WebFocus data is dat ze bestaan als een telling van de dagen sinds het referentiejaar datum (31 december 1970) en zij zullen anders worden weergegeven om hoe ze zijn dus geen noodzaak om "zich te ontdoen van de schuine strepen" gehouden.
T
Mensen doen hun best om te schrijven correct Engels, maar soms uitlegging doet dit een nogal abrupte en feitelijke klinkende uitgang. Ik denk dat we moeten proberen hen te geven het voordeel van de twijfel, hoewel, zoals u weet, ik ben een van de eerste (meestal) om een goede sessie stellen met de FOCUS handleiding.
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
This is an English forum. Please do not use some automatic translation device to create something that looks like Dutch or German with English grammar and/or English typical expressions.
When I'm reading it I translate each word individually from Dutch/German to English trying to figure out what the original English sentence was. And -then- translate it's meaning back to Dutch.
Oh, and Martin...
Here you go:
DEFINE FILE CAR
DUMMYDATE/YYMD = &YYMD;
MYDATE/I8 = ( DATECVT(DUMMYDATE, 'YYMD', 'YY') * 10000 ) + ( DATECVT(DUMMYDATE, 'YYMD', 'M') * 100 ) + DATECVT(DUMMYDATE, 'YYMD', 'D')
END
TABLE FILE CAR
SUM SALES
BY DUMMYDATE
BY MYDATE
END
First I make a DUMMYDATE with a date in YYMD format ( displayed as yyyy/mm/dd )
Then I take the year part: DATECVT(DUMMYDATE, 'YYMD', 'YY')
The month part: DATECVT(DUMMYDATE, 'YYMD', 'M')
The day part: DATECVT(DUMMYDATE, 'YYMD', 'D')
MYDATE/I8 = ( Year * 10000 ) + ( Month * 100 ) + Day
G'luck. Greets, Dave
_____________________ WF: 8.0.0.9 > going 8.2.0.5
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010
you may consider buying the book "(Almost) 1001 ways to work with dates in webfocus" isbn 978-0-9791722-1-2 only 25 dollar it was and worth all the money.
succes
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