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.
Help! I'm new to focus. I need to update a focus database. What I neeed to do seems basic? How do you for example update all records in field team that contain "night A" to "night b". I've been stuck for days. In Access this is a simple update query. Any example files that anyone can send me. Thanks,
In order to physically update the records, you need to use the MODIFY command so, best to download and read the MODIFY manual. Its pretty straight forward. You can temporarily redefine a field, withoug physically updating the records using a DEFINE either in the master or in your fex DEFINE FILE filename MYFIELD/A20=IF MYFIELD CONTAINS 'night A' THEN 'night B' ELSE MYFIELD; END This approach just redefines the value for reporting purposes, without physical change.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Joe We have a product called Maintain. This product allows for easy Updates, Includes and Deletes. It is available in WebFOCUS and on the Mainframe. To do what you want, create a new procedure or Focexec. As long as the field is not a key field, updating is no problem.
MAINTAIN FILE FOR ALL NEXT field1 INTO STK WHERE field2 EQ 'night A' COMPUTE I/I2=1; REPEAT STK.FOCCOUNT COMPUTE STK(I).field2 = 'night B'; COMPUTE I=I+1; ENDREPEAT FOR ALL UPDATE field2 FROM STK; END
That's it. Here, file is the name of your file, field1 is the key field in the segment and field2 is the field that we are updating. I hope this helps.
MarkThis message has been edited. Last edited by: Maintain Wizard,
Posts: 663 | Location: New York | Registered: May 08, 2003
Thanks, but I found out that Marketteam is unique and will not work. However, I think what I should do is the following:
TABLE FILE WKLYGFOC
BY PPNUMBER BY WEEK_OF BY MARKET BY TEAM WHERE WEEK_OF EQ '4/30/2006' ON TABLE HOLD AS WGPJUNK END
MAINTAIN FILE WKLYGFOC FOR ALL NEXT WEEK_OF INTO STK WHERE MARKET EQ 'Night' WHERE TEAM EQ 'A' COMPUTE I/I2=1; COMPUTE I/I2=2; REPEAT STK.FOCCOUNT COMPUTE STK(I).MARKET = 'New'; COMPUTE STK(I).TEAM = 'Night Team'; COMPUTE I=I+1; COMPUTE I=I+2; ENDREPEAT FOR ALL UPDATE MARKET FROM STK; FOR ALL UPDATE TEAM FROM STK; END
I need to update the field Market and the field team which are not unique. When I run this code I receive an error message. Any other help would be appreciated.
Yes, MODIFY will permanently update records of your choosing. For some examples look in your IBINCCEN folder (or your Country equivalent) and look at those fexes that begin "load...". These are the fexes that are used to create the New Century Corp demo databases (All FOCUS). Some are multi segment DBs and you can see how navigating to a lower segment can take place.
But, before you venture forth into the land of MODIFY, what DB are you using as there might be altenatives (SQL UPDATE etc.)?
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
If MARKET and TEAM are not keys, then this should work:
MAINTAIN FILE WKLYGFOC FOR ALL NEXT WEEK_OF INTO STK WHERE MARKET EQ 'Night' and TEAM EQ 'A' COMPUTE I/I2=1; REPEAT STK.FOCCOUNT COMPUTE STK(I).MARKET = 'New'; COMPUTE STK(I).TEAM = 'Night Team'; COMPUTE I=I+1; ENDREPEAT FOR ALL UPDATE MARKET TEAM FROM STK; END
Posts: 663 | Location: New York | Registered: May 08, 2003
All, you sure about MODIFY not needing a license I was under the impression that MODIFY and MAINTAIN both required a license. IBI allows you to use modify for Temporary files in a TABLE request, but if it is not a temporary file then a license is required, and if the file is a FOCUS database then the FDS requires a license.