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.
Hi I need to checking for 2 conditions on same field in select part of the code. 1st cond:: CASE TRADE_SEQ_NR WHEN 1 THEN 'OPEN CONTRACTS' ELSE 'CLOSED CONTRACTS' END AS CONTRACT_STATUS, 2nd cond:: when trade seq number is not equal to one then a field called trade_date should be between &startdate and &end date
how am i supposed to do that
::One more problem:: in subhead i need to display only the end date for open trades but both start_date and end_date for closed_trades
Are you wanting to control something else besides subheads or subfoots?
TABLE FILE CAR
SUM SEATS
BY COUNTRY
BY CAR
ON COUNTRY SUBFOOT
" This is WHERE <COUNTRY"
WHEN COUNTRY EQ 'FRANCE' OR 'ENGLAND'
ON COUNTRY SUBFOOT
"This is WHEN <COUNTRY"
WHEN COUNTRY NE 'FRANCE' OR 'ENGLAND'
END
Have to play with the date though.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
DEFINE FILE CAR
DATEA/MDYY WITH CAR = IF COUNTRY EQ 'ENGLAND' OR 'FRANCE' THEN 0 ELSE '&MDYY';
DATEB/MDYY WITH CAR = '&MDYY';
END
TABLE FILE CAR
SUM SEATS
BY COUNTRY
BY CAR
ON COUNTRY SUBFOOT
" This is WHERE <COUNTRY WHEN <DATEB <DATEA"
WHEN COUNTRY EQ 'FRANCE' OR 'ENGLAND'
ON COUNTRY SUBFOOT
"This is WHEN <COUNTRY <DATEB TO <DATEA"
WHEN COUNTRY NE 'FRANCE' OR 'ENGLAND'
END
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
Thanks very much Leah Actually i was trying to implement the same for SUBHEAD and it worked at its best.
The date problem i am having is like i need to restrict datas in select statement itself. :::CODE:::: CASE TRADE_SEQ_NR WHEN 1 THEN 'OPEN CONTRACTS' ELSE 'CLOSED CONTRACTS' END AS CONTRACT_STATUS CASE WHEN TRADE_SEQ_NR <> '1' THEN TRADE_DATE BETWEEN TO_DATE('&STARTDATE','MM/DD/YYYY') AND TO_DATE('&ENDDATE','MM/DD/YYYY') END AS CLOSED_DATE FROM MurexODS.TRADE
When the contract status is 'closed contracts' or trade seq no is Not Equal 1 i need to get only datas for trade date which is in between the start and end date entered by the user.
Can you help or guide me with reading data from an external file into webfocus.
Probably should have opened a new topic, but when you say reading an external file, what do you want to do with it? My experience is mostly using filedef for decodes, or using table commands against flat files that have a mfd defined in conjunction with the filedef. Don't use the -read though so not familiar enough to tell you.
You will definitly need a filedef defining the file if it is not defined in your data source.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
Do you have master file discriptions for the files? If you did, you could use the standard match file logic.
match file a print (whatever you want to pring) by key field (or multiple by) run file b print (whatever you want to pring) by key field (or multiple by) after match hold as hold old-not-new end table file hold print..... end
If you don't have MFD's you will have to do more work defining key fields for both and use -read which have no experience with.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
FILEDEF TESTCSV DISK \\imnt14\SHARED\TRANSFER\Test3.csv
TABLE FILE TESTCSV PRINT Num Name Age Gender ON TABLE HOLD AS NEW END -RUN -* TABLE FILE NEW PRINT * END -EXIT
But i could not find what is the error in this code.Its always returning 0 errors 0 lines. its unable to read the csv file.I like to know for webfocus to read this file where it ahs to be placed.Is there any specific folder or directory where we have to place the csv file so that webfocus can read it from that particular location.Or even when placed in desktop it should read the file. Please advice.
I have coded to read 2 csv files.Contents of the csv files are same but file names are different. Now i need to compare both the files and print it. I tried using MATCH FILE syntax but its not getting printed.Pls advice. I ma posting my fex code here for your reference.
::code:: -* File qmtarde1csv.fex
FILEDEF QMTRADE1 DISK \\IMNT14\SHARED\TRANSFER\NEW_TRADE1.CSV FILEDEF QMTRADE2 DISK \\IMNT14\SHARED\TRANSFER\NEW_TRADE2.CSV
TABLE FILE QMTRADE1 PRINT TradeDate Portfolio NotionalAmt TradeCounterParty AssetSubType AssetType BY MMRefNumber ON TABLE HOLD AS QMTRADEONE END -RUN -* -*TABLE FILE QMTRADEONE -*COUNT * -*END -*-EXIT
DEFINE FILE QMTRADE2 END -* TABLE FILE QMTRADE2 PRINT TradeDate Portfolio NotionalAmt TradeCounterParty AssetSubType AssetType BY MMRefNumber ON TABLE HOLD AS QMTRADETWO END -RUN -* MATCH FILE QMTRADEONE MORE FILE QMTRADETWO RUN AFTER MATCH HOLD OLDANDNEW END -* TABLE FILE HOLD PRINT * END -EXIT
It looks like you are confusing MATCH with Universal Concatenation (MORE) and you have a syntax error on final match command.
Try this:
MATCH FILE QMTRADE1 PRINT TradeDate Portfolio NotionalAmt TradeCounterParty AssetSubType AssetType BY MMRefNumber RUN FILE QMTRADE2 PRINT TradeDate Portfolio NotionalAmt TradeCounterParty AssetSubType AssetType BY MMRefNumber AFTER MATCH HOLD OLD-AND-NEW END -* TABLE FILE HOLD PRINT * END
Hi Ginny Thanks very much it worked fine.i made those changes already.But got very much cleared now. In the same code i need to match all the columns for both the hold files. How can i do that.So that any difference of value even in one field should be identified.