Focal Point Banner


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.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Convert SMRTDATE/M to A9 full month word?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Convert SMRTDATE/M to A9 full month word?
 Login/Join
 
Virtuoso
posted
Is there a function on WF that will take a Smart Date formated field that is a format of "Mtr" and put the fullword of the month into an A9 alpha field?

Don't ask me why I wnat to do this because it would take too long to explain what I am doing. I am neck deep into a complicated but really cool report program.

Big Grin

This message has been edited. Last edited by: <Kathryn Henning>,


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
Wishful thinking!

I've found that we have to use DEFINE or COMPUTE. Here, I've typed it out for you, so you don't have to Big Grin

MTR/A9 = DECODE MX (
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 '');


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Thanks Francis for the thoughtfulness. However, I already coded the whole thing before I posted my question. I was just wondering if there was a simplier way. Apparently we need 1002 ways to work with dates in WF.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
Spoke too soon!

TABLE FILE GGORDER
SUM
ORDER_DATE NOPRINT
COMPUTE ORDER_DATEA/A8YYMD = ORDER_DATE;
COMPUTE ORDER_MTR/A17 = CHGDAT('YYMD','MX',ORDER_DATEA,'A17') ;
BY ORDER_DATE NOPRINT
WHERE READLIMIT EQ 10
END


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Or

TABLE FILE GGORDER
SUM
ORDER_DATE NOPRINT
COMPUTE ORDER_DATEA/A8YYMD = ORDER_DATE;
COMPUTE ORDER_MTR/A9 = LCWORD(9, CHGDAT('YYMD','MX',ORDER_DATEA,'A9'), 'A9');
BY ORDER_DATE NOPRINT
WHERE READLIMIT EQ 10
END


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Very Good Winky


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
indeed!




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Busy are you Francis? lol

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, 2004Report This Post
Virtuoso
posted Hide Post
Thanks Francis. I'll give that a try. It looks good. I will also look it up in the manual. Yikes! Eeker


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Guru
posted Hide Post
Here's just one more way.


TABLE FILE GGORDER
SUM
ORDER_DATE NOPRINT
COMPUTE ORDER_LOWER/MONtr = ORDER_DATE;
COMPUTE ORDER_UPPER/MONTR = ORDER_DATE;
BY ORDER_DATE NOPRINT
WHERE READLIMIT EQ 10
END


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
Expert
posted Hide Post
slick!
that's got uses for alot of stuff i am currently doing the old fashioned way...
thanks for reading the manual for us, Glenda. Wink




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Francis Mariani:
-snip-
COMPUTE ORDER_MTR/A9 = LCWORD(9, CHGDAT('YYMD','MX',ORDER_DATEA,'A9'), 'A9');
[/code]


I always give CHGDAT a full 'A17' output to work with; when you give it A9, no telling what the additional A6 it returns may trounce.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
My original requirement was for the Month Name to be in an ALPHA format field. Glenda's technique works great but does not put the month name into and alpha field.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
quote:
MONTR
Where's this curious format in the manual?

Tony, I have reports that take a half hour to run due to DBA's not having indexes on the DB2 tables, hence I have a lot of time...


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
COMPUTE CUR_MO/A17 = CHGDAT('YYMD', 'MDYYX', '&YYMD', 'A17');
COMPUTE DISP_MONTH/A9 = GETTOK(CUR_MO, 17, 1, ' ', 9, DISP_MONTH);


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
I just wanted to let everyone know I finally got a chance to change my code to use the CHGDAT function and it works great.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Master
posted Hide Post
Whoa !!!

This is an old thread, but when did Mtr get changed to MONtr ?????

I've been struggling with this and thought it was a quirk of Windows 8 ....

Like Francis I have been using a DECODE as a workaround ...

MONtr actually works !


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Convert SMRTDATE/M to A9 full month word?

Copyright © 1996-2020 Information Builders