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     Empty integer field - Error Message (WebFOCUS 4.3.5)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Empty integer field - Error Message (WebFOCUS 4.3.5)
 Login/Join
 
<Christopher>
posted
Hi there,

I have a little problem with a report. If I use the following lines
COMPUTE DAYSDIFF/I6 = IF DATE2 NE '' THEN DMY(DATE1, DATE2) ELSE '';
I get an error message, because "''" is not integer. How am I supposed to do thant? As I want to work on with the result I need to have the field empty under above condition.

Many thanks in advance
Christopher
 
Report This Post
Expert
posted Hide Post
Chris, this code is trying to set an integer variable to an alpha value. its trying to give an I6 field a value of blank. that'll cause an error every time!
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<kiddpete>
posted
Chris,

You could do it with:

COMPUTE DAYSDIFF/I6 = DMY(DATE1, DATE2);

COMPUTE DAYSA/A6 = IF DATE2 NE '' THEN EDIT(DAYSDIFF) ELSE '';

or you could:

COMPUTE DAYSDIFF/I6S = DMY(DATE1, DATE2);

if all you need is to print a blank.
 
Report This Post
<Christopher>
posted
kidpete,

thanks for the tips you provided. The problem with the first solution is that there are leading zeros with the EDIT statement. The second way ist not possible because there are zeros I want to display (when the two dates are identical).

Anyone with another idea?

Thanks a lot
Christopher
 
Report This Post
Member
posted Hide Post
Ok, this worked for me. I had to change the field to an alpha, so it that won't work for you then this may not help.


COMPUTE DIFF/D12 = IF DATE1 EQ DATE2 THEN 0 ELSE DATE2 - DATE1;

COMPUTE DIFF2/A12 = IF DIFF GE 0 THEN FTOA(DIFF, '(D12)', DIFF1) ELSE '';

Good Luck!
 
Posts: 25 | Location: Kingwood, Tx | Registered: May 06, 2003Report This Post
Platinum Member
posted Hide Post
Does the calculation have to be done in a compute, or could you use a define? If you used a define you could do:

DAYSDIFF/I6 MISSING ON= IF DATE2 NE '' THEN DMY(DATE1, DATE2) ELSE MISSING;

Regards

Tewy
 
Posts: 123 | Location: UK | Registered: October 09, 2003Report 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     Empty integer field - Error Message (WebFOCUS 4.3.5)

Copyright © 1996-2020 Information Builders