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 in fields changing want report to stay the same.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[solved] Data in fields changing want report to stay the same.
 Login/Join
 
Platinum Member
posted
I have a report that gathers data from our payroll system and they are renaming the paycodes. Ex: PER (Personal) is becoming PTO (Personal time off). But... There is always a but, they want the report to stay the same.

I piped up at the meeting right away and said it could be done in webfocus. I had seen it done before.

Now I can not find it for the life of me and I don't even now what to search for. "Replace" returns to many results, and I can not search for "AS" its to short.

Its on the tip of my tongue so to speak.

So Funeral Leave (FNL), is becoming 30 different Bereavement codes. B01, B02, B03, etc... Depending on the relation to you of the person that died.

So If my report sees and field that is EQ B* I need the report to still show FNL.

IF PAYCODE EQ 'B01 OR B02 OR B03' PRINT AS FNL <--- is this close?

I know this is easy, I just can't find an example.

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


prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL

 
Posts: 133 | Location: Orlando, FL | Registered: August 04, 2005Report This Post
Expert
posted Hide Post
DEFINE FILE CAR
NEWNAME/A30=DECODE COUNTRY('FRANCE' 'ROQUEFORT' 'ITALY' 'PARMIGIANA' 'JAPAN' 'SAKI' 'ENGLAND' 'STILTON' ELSE 'AMERICAN');
END
TABLE FILE CAR
SUM SALES BY NEWNAME
END
...or...
DEFINE FILE CAR
NEWNAME/A30=IF COUNTRY EQ 'ITALY' OR 'FRANCE' OR 'ENGLAND' THEN 'EUROPEAN UNION' ELSE
IF COUNTRY EQ 'GREECE' THEN 'JURY STILL OUT' ELSE 'USA');
END
you can string up to 41 IF THEN ELSE's together, as i recall, before you have to start a new one.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
More on the DECODE function... If the conversion will be used in a number of reports, you could place the DECODE elements in a flat file, or a separate FEX (and use -INCLUDE) so you have only one place to do maintenance. Depending on the number of conversion elements (DECODE has limits), you might need to create a FOCUS file indexed on the field containing the new values and JOIN to this table to pick up the legacy values.

This message has been edited. Last edited by: Dan Satchell,


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
amen to that, Dan
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
The report in question is a pdf compound report of 5 different reports. So DECODE in a flat file may be the way to go.


prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL

 
Posts: 133 | Location: Orlando, FL | Registered: August 04, 2005Report This Post
Expert
posted Hide Post
The flat file is the easiest to maintain if you don't go beyond the limits.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Building off of Susannah's example above couldn't you just use:

 
DEFINE FILE CAR
NEWNAME/A30=DECODE COUNTRY(
ITALY 'EUROPEAN UNION'  
FRANCE 'EUROPEAN UNION' 
ENGLAND 'EUROPEAN UNION' 
GREECE 'JURY STILL OUT'
ELSE USA);
END


Quotes only needed if there are spaces.
I find it easier because I don't have to have all those OR's and I can list them one line at a time so it's easy to edit. In addition, you can put a define in a Masterfile so that it applies to any reports that use that Masterfile. Of course it's not as flexible as the if statements because it's only exact matches so you couldn’t do the following:

 
NEWNAME/A30= IF COUNTRY CONTAINS 'E' OR 'Y' THEN 'EU' ELSE 'USA';


Which might make it easier on all those B* codes.


WebFOCUS 8.1.05
Windows-iSeries DB2, All Outputs
HTML
 
Posts: 29 | Location: Cincinnati, OH | Registered: August 23, 2011Report 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 in fields changing want report to stay the same.

Copyright © 1996-2020 Information Builders