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     [SOLVED] How to covert a numeric data type to an alphanumeric??

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How to covert a numeric data type to an alphanumeric??
 Login/Join
 
Virtuoso
posted
Hey all!

How do I get this (should be) simple data type conversion to work?:

-SET &DATE = TODAY('A10');
-SET &YEAR = EDIT('&DATE.EVAL', '$$$$$$9999');
-SET &YEAR = EDIT(&YEAR);
-TYPE &YEAR.TYPE

I get back N. I need to get back A.

Thanks in advance!

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


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Master
posted Hide Post
I'm not sure you can change the TYPE of &YEAR within dialogue manager. In my playing with it just now, I had to force quoutes around it. Why are you trying to force it to alpha anyways?

  -SET &YEAR = '''&DATEYY.EVAL''';
-TYPE The data type of &YEAR is &YEAR.TYPE


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Virtuoso
posted Hide Post
quote:
-SET &DATE = TODAY('A10');
-SET &YEAR = EDIT('&DATE.EVAL', '$$$$$$9999');
-SET &YEAR = EDIT(&YEAR);
-TYPE &YEAR.TYPE


1. More simply,
-SET &DATE = TODAY('A10');
-SET &YEAR = EDIT(&DATE, '$$$$$$9999');


2. Dialog Manager variables are typeless -- their content is always a character-string. The .TYPE operator simply indicates whether the string value "looks" like a number or not.
-- By contrast, FOCUS (TABLE) variables are typed, and EDIT() can be used to convert between alpha and integer types.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
Thanks everyone!

Appreciate the help with understanding type conversion quirks in WF.

eric.woerle: I had to compare today's year part to a field that stores the year in an A4 format. I didn't design the table... Kind of annoying, but working around it.

Thanks again everyone!


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Master
posted Hide Post
CoolGuy,

Sounds like your over complicating things then. Use the suffix .QUOTEDSTRING to wrap quotes around your year. It will automatically compare them as alpha's. No need for validating type. As Jack mentions, Variables don't actually have an associated data type.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Virtuoso
posted Hide Post
Good to know eric.woerle and j.gross! Thanks for the insights!


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report 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] How to covert a numeric data type to an alphanumeric??

Copyright © 1996-2020 Information Builders