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  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