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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at email@example.com and provide your corporate email address, company, and name.
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,