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.

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.


Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED]why 'function' return '*' as my result?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]why 'function' return '*' as my result?
 Login/Join
 
Platinum Member
posted
Hi,

I have define a Function in Iway Datamigrator as following:

 
DEFINE FUNCTION FUN1(PARAM1/HYYMDS XDEFAULT '1900/01/01 00:00:00') 
 FUN1/A32V=CONCAT( TO_CHAR( (HPART( PARAM1, 'YEAR', 'I4' ) - 1911) ), SUBSTRING( DT_FORMAT( PARAM1, 'HYYMDS' ), 5, 27 ) ); 
END 

 


and I define a column named "New_Date" with:
 
DF.functions/chinese_year.FUN1(HUM_DATE)
 


and my HUM_DATE(HYYMDS) contain:
 

2013/06/20 11:10:47.443
2013/06/20 11:10:55.160
2013/06/20 11:25:40.563
2013/06/20 11:27:05.030
2013/07/23 16:56:08.407
 


but I end up with:
  

*******/06/20 11:10:47
*******/06/20 11:10:55
*******/06/20 11:25:40
*******/06/20 11:27:05
*******/07/23 16:56:08



any idea why?

Note: When I try FUN1 by input parameter manual and I get : 102/06/20 11:10:47.443
as expected.

This message has been edited. Last edited by: nox,


WebFOCUS v8.2.06 , Windows
 
Posts: 137 | Registered: August 29, 2019Report This Post
Platinum Member
posted Hide Post
This is an odd bug. Using the TO_CHAR function with I4 data in a DEFINE FUNCTION causes the asterisks.
Fix it by changing the I4 to an I5.
 DEFINE FUNCTION FUN1(PARAM1/HYYMDS XDEFAULT '1900/01/01 00:00:00') 
 FUN1/A32V=CONCAT( TO_CHAR( (HPART( PARAM1, 'YEAR', 'I5' ) - 1911) ), SUBSTRING( DT_FORMAT( PARAM1, 'HYYMDS' ), 5, 27 ) ); 
 END 

 TABLE FILE car
 PRINT COUNTRY
 COMPUTE HDATE/HYYMDS = '2013/06/20 11:10:47.443';
 COMPUTE DEFUNC/A32V  = FUN1(HDATE);
 COMPUTE NOFUNC/A32   = CONCAT( TO_CHAR( (HPART( HDATE, 'YEAR', 'I4' ) - 1911) ), SUBSTRING( DT_FORMAT( HDATE, 'HYYMDS' ), 5, 27 ) ); 
 END


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
Guru
posted Hide Post
It works for me in the current 8207.17 release. Please confirm the synonym describes the input field correctly. Other than that, sorry no idea.



N/A
 
Posts: 397 | Location: New York City | Registered: May 03, 2007Report This Post
Platinum Member
posted Hide Post
Hi dbeagan,

Thanks, Solved the problem. I think it is a bug... why 'I5' work while 'I4' is not working in Function? It's weird.

Hi Clif,

the version I test was on 8.206.773 version...latest for 8.206 for now.


WebFOCUS v8.2.06 , Windows
 
Posts: 137 | Registered: August 29, 2019Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED]why 'function' return '*' as my result?

Copyright © 1996-2020 Information Builders