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.
I'm trying to convert an alphanumeric variable to a double precision format variable with the ATODBL function but there is a problem: I always become 0.00000 as result.
-SET &ECHO=ALL;
-SET &MYVAR = 2912.12234;
TABLE FILE CAR
PRINT
COMPUTE CHANGE/D14.7 = ATODBL('&MYVAR','&MYVAR.LENGTH',CHANGE);
COUNTRY
END
The length (second parameter for ATODBL) must be exactly the length of the data in the variable - the best way to to do this is to use &var_name.LENGTH.
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
&vars are not classified as alpha or numeric. If the value contains 100 you could use it in either expression below without having to change any formats.
WHERE CODE EQ '&var';
OR
WHERE COUNTER GE &var;
The exception would be for dates. If it contains a value which will be compared as or used in further DATE computations, it needs to be converted to a smart date.
The use of quote marks tells the expression whether it is to be used as alpha or numeric.
You should just be able to say COMPUTE CHANGE/D14.7=&MYVAR ;
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Originally posted by Darin Lee: &vars are not classified as alpha or numeric. If the value contains 100 you could use it in either expression below without having to change any formats.
WHERE CODE EQ '&var';
OR
WHERE COUNTER GE &var;
The exception would be for dates. If it contains a value which will be compared as or used in further DATE computations, it needs to be converted to a smart date.
The use of quote marks tells the expression whether it is to be used as alpha or numeric.
You should just be able to say COMPUTE CHANGE/D14.7=&MYVAR ;
What I was saying is that there is no need to use the ATODBL function.
COMPUTE CHANGE/D14.7=&MYVAR ; And it appears that you need to make sure the CDN setting is correct (ON)
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Not quite sure how this worked for the other side of the pond.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007