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] Problem with field and missings

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Problem with field and missings
 Login/Join
 
Member
posted
Hello All,

My WebFOCUS is version 7.7.03.
I generated a table file to a table. One of his numeric fields is format P11. The field is reported, but it contains many values ​​to zero (0). Asked to convert these values ​​to missing. so did this.

TABLE FILE XXXXX
PRINT
ORIGINAL_FIELD
COMPUTE PORIGINAL_FIELD/P11 MISSING ON=IF ORIGINAL_FIELD EQ 0 THEN MISSING ELSE ORIGINAL_FIELD;
END
-RUN

This compute, returns for missing values "-999998" for nonzero values, the correctly value.

To solve this problema, I made a compute transforming ORIGINAL_FIELD to alphanumeric number using PTOA. Was ok. But then I made a alphanumeric field to align right using RJUST did not work.

TABLE FILE XXXXX
PRINT
ORIGINAL_FIELD
COMPUTE PORIGINAL_FIELD/A18=IF ORIGINAL_FIELD EQ 0 THEN '' ELSE PTOA(ORIGINAL_FIELD,'(P11)','A18');
COMPUTE PPORIGINAL_FIELD/A18=RJUST(18,PORIGINAL_FIELD,PPORIGINAL_FIELD);
END
-RUN

In the end, what I did was create a computed field formatted I9. And run OK.

TABLE FILE XXXXX
PRINT
ORIGINAL_FIELD
COMPUTE PORIGINAL_FIELD/I9=ORIGINAL_FIELD+0;
COMPUTE PPORIGINAL_FIELD/I9 MISSING ON=IF PORIGINAL_FIELD EQ 0 THEN MISSING ELSE PORIGINAL_FIELD;
END
-RUN

This is a poltergeist!! I don´t understant that P11 field can't be put missing values and transformed in alphanumeric with PTOA can not align right with RJUST.

Regards,
Javier.

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


WF Prod: WebFOCUS & Dev.Studio 7.7.0.2
WF Test: WebFOCUS & Dev.Studio 7.7.0.3
BBDD: Oracle 9i,10g,11g SQL Server, DB2
ETL: OWB, Kettle
Other BI tools: Pentaho, MicroStrategy
 
Posts: 6 | Registered: September 02, 2011Report This Post
Expert
posted Hide Post
Step 1: Consider checking for MISSING instead of ZERO in this line of code:
COMPUTE PORIGINAL_FIELD/P11 MISSING ON=IF ORIGINAL_FIELD EQ 0 THEN MISSING ELSE ORIGINAL_FIELD;


It's not a "poltergeist", just something to be learned, something to be understood. If you think that this is a poltergeist, then wait till you see in store ahead of you, you'll be in for the adventure of you life when you see what else is out there withjout some education on WebFOCUS...

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Hi Javier,

I don't know what may be going on.

By using the CAR table, I managed to create a new "NEW_SALES" P11 field out of SALES (simulating your original P11 field) and then COMPUTE'd a new one setting NEW_SALES's value (or MISSING when NEW_SALES = 0).

DEFINE FILE CAR
NEW_SALES/P11 = SALES;
END
TABLE FILE CAR
PRINT CAR AND MODEL AND SALES AND NEW_SALES
COMPUTE FINAL_SALES/P11 MISSING ON = IF SALES EQ 0 THEN MISSING ELSE SALES;
BY COUNTRY
END


I don't seem to get that strange -999998 value you reported. In fact, I get MISSING instead of 0 as expected.

Perhaps something in your master file definition may give some clues?


On a different note, congrats on being on the 7.7.03 boat now! Would you please update your signature to reflect that + whatever database server and version you regularly use? It's all intended to tailor suggestions to something that is more relevant to your environment. Smiler



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report 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] Problem with field and missings

Copyright © 1996-2020 Information Builders