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] DATA FORMAT FIELD CONVERSION

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] DATA FORMAT FIELD CONVERSION
 Login/Join
 
Platinum Member
posted
Here is the end of some code one of my former colleagues left me, and it is the part I need to change prior to my next stage.

I read that FPRINT converts any type of field except a text field to alphanumeric, and that makes complete sense to me.

 COMPUTE FMEASURE/A100 =
         IF DETAIL  EQ 'D' AND MEASURE LT &small 			THEN '^'    ELSE
		 IF COUNTER EQ  1 AND  MEASURE EQ MIN_VALUE 		THEN '^'	ELSE
		 FPRINT(MEASURE, 'D11', 'A40');     AS '&measure'
 


So, I understand my table will have ^ (carets) and entries such as 1,100, depending on the small cell test.

I want to convert the field's format from alphanumeric to numbers for such instances as 1,100 and MISSING (not zeroes) for the instances marked above by carets.

I need the MISSING feature because I'm going to use the results in a calculation. My calculation is set up with MISSING already, and it works in some other procedures where I do not have this data format issue.

At first, I thought ATODBL would do the trick, but I think the caret makes it a little more challenging.

Then, I thought about something like this:

DEFINE FILE TABLE
MEASURE2/D12C MISSING ON= IF (MEASURE EQ '^') THEN MISSING ELSE MEASURE;
END

At this point, my business use case does not allow me to change the code I posted at the beginning. So, I need to change the format after that.

Thoughts?

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


WebFocus 8.2.04
WebFocus 8.2.04

 
Posts: 191 | Registered: September 18, 2015Report This Post
Platinum Member
posted Hide Post
Julie,
I'm not sure I understand your example.

MEASURE2/D12C MISSING ON= IF (MEASURE EQ '^') THEN MISSING ELSE MEASURE;

What is the format of MEASURE?
If you're saying MEASURE EQ '^', that would assume MEASURE is ALPHA.
Then, you're trying to assign an Alpha to Numeric.

I'm taking a guess but do you want to do something like the following:
MEASURE2/D12C MISSING ON= IF (MEASURE EQ '^') THEN MISSING ELSE EDIT(MEASURE);
 
Posts: 229 | Location: New York | Registered: July 27, 2004Report This Post
Virtuoso
posted Hide Post
Julie,

MEASURE is already a numeric field, FMEASURE it's the equivalent alpha value where some values are replaced by carets under some conditions.

If I understand properly, to accomplish the same conditions as for FMEASURE but keeping it as a numeric field, the below should work

COMPUTE MEASURE2/D11 MISSING ON = IF DETAIL  EQ 'D' AND MEASURE LT &small    THEN MISSING
                             ELSE IF COUNTER EQ  1  AND MEASURE EQ MIN_VALUE THEN MISSING
                             ELSE MEASURE;

May need to be a DEFINE instead of a COMPUTE


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2410 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
Everyone,

Thank you for your replies. I apologize for not responding sooner. I did not realize I had notifications turned to the OFF setting.

I actually figured out my data conversion issue, so I will close this post.

I have a different question. I will write my question in a new post.


WebFocus 8.2.04
WebFocus 8.2.04

 
Posts: 191 | Registered: September 18, 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] DATA FORMAT FIELD CONVERSION

Copyright © 1996-2020 Information Builders