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     [CLOSED] NEGATIVE VALUE NOT SHOWING

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] NEGATIVE VALUE NOT SHOWING
 Login/Join
 
Member
posted
hello experts,

I created a tempral hold

   TABLE FILE AZ_MERCH_DUMMY
PRINT DUMMY
ON TABLE HOLD AS DUMMYHOLD
END

TABLE FILE DUMMYHOLD
SUM
COMPUTE HEADER/A40 = 'HEADER';
COMPUTE TY/D12.4 = 5;
COMPUTE PLAN/D12.4 = 5;
COMPUTE LY/D12.4 = 5;
COMPUTE PLAN_V_LY/D12.4 = 5;
COMPUTE ACT_V_LY/D12.4 = 5;
COMPUTE SORTER/I2 = 5;
BY DUMMY NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS KPI_SUMMARY_SS_CAT
END


and i read some vars from other holds:

  
TABLE FILE TY_INV
PRINT 
INV_TY 
INV_PS_TY 
ON TABLE HOLD AS TY_INV_VARING FORMAT ALPHA
END
-RUN
-READ TY_INV_VARING  &INV_TY.A12. &INV_PS_TY.A12.  

TABLE FILE LY_INV
PRINT 
INV_LY 
INV_PS_LY 
ON TABLE HOLD AS LY_INV_VARING FORMAT ALPHA
END
-RUN
-READ LY_INV_VARING  &INV_LY.A12. &INV_PS_LY.A12. 
END




and finally perform the following operation

  
-SET &PLAN_VS_LY = (&PLAN_INV_PS-&INV_PS_LY)/&INV_PS_LY;
-SET &ACT_V_LY =   (&INV_PS_TY-&INV_PS_LY)/&INV_PS_LY;
SQL
INSERT INTO KPI_SUMMARY_SS_CAT (HEADER,TY,PLAN,LY,PLAN_V_LY,ACT_V_LY,SORTER)
VALUES ('inv_ps',&INV_PS_TY,&PLAN_INV_PS,&INV_PS_LY,&PLAN_VS_LY, &ACT_V_LY ,11);
END	



however the &ACT_V_LY var should be negative as the numbers in the operation are:

&INV_PS_TY 9,877.5720
&INV_PS_LY 10,122.5970

therefore the resulut should be
(9,877.5720 - 10,122.59700) / 10,122.5970 = -0.0242

but WF is printing 0.0242 (posiive value()

can you point me in the right direction ?

the dm precision is set to 4

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


WebFocus 768
Windows, all output
 
Posts: 18 | Registered: June 20, 2011Report This Post
Virtuoso
posted Hide Post
That's not right is it.

Go back to the old method:
SET DMPRECISION=OFF
-RUN
-SET &INV_PS_TY = 9877.5720; 
-SET &INV_PS_LY = 10122.5970; 

-SET &ACT_V_LY = &INV_PS_TY-&INV_PS_LY;
-SET &ACT_V_LY  = FTOA(&ACT_V_LY/&INV_PS_LY,'(D12.4)','A15');
-SET &ACT_V_LY  = LJUST(15,&ACT_V_LY,'A15');
-SET &ACT_V_LY  = TRUNCATE(&ACT_V_LY);
-TYPE &ACT_V_LY 

Should do it for you.

This does look like an issue, any numbers between 0 and -.999 do not display the -ve sign:
SET DMPRECISION=4
-RUN
-SET &RESULT = -1.0242 ;
-TYPE &RESULT 
-SET &RESULT = -0.0242 ;
-TYPE &RESULT 
gives
 -1.0242
 0.0242


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Member
posted Hide Post
Thank you Alan, actually using just :

 -SET &ACT_V_LY  = FTOA(&ACT_V_LY/&INV_PS_LY,'(D12.4)','A15'); 


thank you very much for your help. However as you said that shouldn't be happening.
Would this happen to be a bug?


WebFocus 768
Windows, all output
 
Posts: 18 | Registered: June 20, 2011Report This Post
Expert
posted Hide Post
Thanks Alan for the nice input.

Rafael, to confirm if this is a bug, and/or for further assistance, please contact Information Builders' Customer Support Services and open a case. You may either call at 1-800-736-6130, or access online at InfoResponse.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report 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     [CLOSED] NEGATIVE VALUE NOT SHOWING

Copyright © 1996-2020 Information Builders