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  WebFOCUS/FOCUS Forum on Focal Point     DM Variable Maximum Numeric Value

Read-Only Read-Only Topic
Go
Search
Notify
Tools
DM Variable Maximum Numeric Value
 Login/Join
 
Virtuoso
posted
Does anyone know what the maximum numeric value or length is for a Dialogue Manager variable? Does anyone know how to increase the maximum length?

I have a calculation for a DM variable that creates a number greater than 8 digits. I get the dreaded ******** in the variable.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
It looks like 8 numerals is the largest number in DM.

-SET &ECHO=ALL;

-SET &T1 = 99999999 + 1;
-TYPE &T1.LENGTH &T1

-SET &T1 = &T1 - 1;
-TYPE &T1.LENGTH &T1


I think you'll have to use TABLE FILE to do your match and then a -READ. The variable in the -READ can have a length greater than 9.


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 for the confirmation, Francis. I have another idea to get around this which i will test.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Platinum Member
posted Hide Post
This worked for us:

-SET &NEW_VALUE = FTOA(&ORIG_VALUE, '(D10c)', A13);

I recommend reading up on the FTOA subroutine to see if this will work for your situation.


Data Migrator 5.3, 7.1, 7.6
WebFOCUS 7.1, 7.6, 7.7
SQL Server, Oracle, DB2
Windows
 
Posts: 126 | Registered: January 18, 2007Report This Post
Virtuoso
posted Hide Post
Jessica,

That is interesting to know. I am familiar with the FTOA function. I ended up creating a DEFINE FUNCTION due to the fact that my calculation has a number of steps. The return value from the function is an A16 so the DM varialbe handles the value fine. In the FUNCTION I use the PTOA function to convert the final numeric value to Alpha.

This might not mean anything to you but hears the code I created.

DEFINE FUNCTION RMDYSCND (THEDATE/A8, BEGOREND/A1)
FOC_DAYS/P16=YMD(19001231,THEDATE);
INDSTIME/A1 =DSTIMEYN(FOC_DAYS);
SUB_DAYS/I5 =DECODE BEGOREND('B' 25203 'E' 25202 ELSE 0);
ADD_SCND/I5 =IF (INDSTIME EQ 'Y')
THEN DECODE BEGOREND('B' 14400 'E' 14399 ELSE 0)
ELSE DECODE BEGOREND('B' 18000 'E' 17999 ELSE 0);
FIN_SCND/P16=((FOC_DAYS - SUB_DAYS) * (60*60*24)) + ADD_SCND;
RMDYSCND/A16=PTOA(FIN_SCND,'(P16)','A16');
END


-SET &BEGSCNDS=RMDYSCND(&BEG_DATE,'B');
-SET &ENDSCNDS=RMDYSCND(&END_DATE,'E');

&BEG_DATE and &END_DATE are values from the input screen.


Thanks!

Mickey

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

Very interesting. I haven't used DEFINE FUNCTION for purely DM yet.

Thanks for sharing that.


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

This DEFINE FUNCTION capability in WF is great when you need to massage a data value supplied by a user. For example, our users enter a date range to select records. The problem is that the date/time values in the database are stored as the number of seconds from January 1, 1970 and are based on GMT instead of EST or DST time. Therefore I need to do a bunch of calculations to translate the dates entered by the user into values I can then plug into the WHERE clause. Doing this with a DM variable allows me to plug the raw values directly into the WHERE clause. This makes it possible for WF to build the SQL to pass to the database. If I called the DEFINE FUNCTION from a DEFINE field or from within the WHERE clause, the WHERE clause would not translate to SQL, forcing WF to pull all the records back and then process the selection, etc. etc.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
Mickey,
Remember that all numeric calculations in DM are integer. That is the reason for the ***. Also, you can input numbers with a decimal point and digits after the decimal point but in any calculations the results will be integer. When using FTOA, the result is alpha hence no problems.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Danny,
quote:
calculations in DM are integer .... but in any calculations the results will be integer

On the version of WF that you are running that is not strictly true. Try this -

SET DMPRECISION = 7
-RUN
-SET &Pi = 3.1415927;
-SET &Radius = 4;
-SET &Circum = 2 * &Pi * &Radius;
-TYPE &Circum

T

This message has been edited. Last edited by: Tony A,



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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     DM Variable Maximum Numeric Value

Copyright © 1996-2020 Information Builders