IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Swapping Columns
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Platinum Member
Posted
Hi,

I have 4 columns
Notional amt
Notional Currency
Sec notional amt
Sec notional Currency

My condition is like this
1.
if
Notional Currency equalto'USD'
then
Notional equalto Notional amt
and
Foreign equalto Sec notional amt

2.
if
Notional Currency notequalto 'USD'
then
Notional equalto Sec notional amt
and
Foreign equalto Notional amt

Please help me out on this issue


Thanks
Umar Farook S
WF 5.2/XP
 
Posts: 102 | Location: INDIA | Registered: June 15, 2007Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
this isn't a very complicated condition if you take a minute to think through the logic:
NOTIONAL=IF NOTIONAL_CURRENCY EQ 'USD' THEN NOTIONAL_AMT ELSE SEC_NOTIONAL_AMT;

and

FOREIGN=IF NOTIONAL_CURRENCY EQ 'USD' THEN SEC_NOTIONAL_AMT ELSE NOTIONAL_AMT;

You can only define one field at a time - don't make it more complicated than it is.


Regards,

Darin



WF Server: 7.1.6 on Z/OS and Linux, ReportCaster, Self-Service, MRE, Java
Data: DB2, DB2/UDB, Adabas, SQL Server Output: HTML,PDF,Excel2K
WF Client: Linux w/WebSphere, Servlet, CGI
 
Posts: 1232 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteEdit or Delete MessageReport This Post
Gold member
Posted Hide Post
It's pretty much the way you specified it:
DEFINE FILE filename
NOTATIONAL_AMT1/format=IF NOTATION_CURRENCY EQ 'USD' THEN NOTATIONAL_AMT ELSE SEC_NOTATIONAL_AMT;
FOREIGN/format = IF NOTATION_CURRENCY EQ 'USD' THEN SEC_NOTATION_AMT ELSE NOTATIONAL_AMT;
END
Of course, you have to put in the correct format, and use the fieldnames that correspond to your data, but hopefully this makes sense. The DEFINEs can also be in the master file Description. Please note: I used different names for my DEFINE fields than for the original fields. I always recommend that to avoid confusion.
 
Posts: 54 | Location: 2 penn | Registered: May 22, 2003Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Swapping Columns

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.