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.
I have a task of altering some records of a focus format file. I thought of converting the file into lotus format and editing the lotus format file and then again reconverting the lotus format file into focus format. Is this the right way to doo it? If yes, Please let me know how can I convert a lotus format file into a focus format. If you have any other way of doing this task please let me know.
While MODIFY or MAINTAIN is the best way, another way would be to TABLE the existing file and save it as an ON TABLE HOLD FORMAT ALPHA. If you have a formula for what records you want to change, you can do that in the TABLE request using DEFINE to alter the contents. If not, make sure that the HOLD file is in a permanent location then use an editor to make your changes.
Then, do the following:
APP FI yourholdfilewith changes DISK location/hold.ftm <== Change to match your hold name
-* Backup file first.
-* focusfilename is what you call your FOCUS file.
-* Below, replace HOLD with whatever AS name you gave your hold file.
CREATE FILE focusfilename
MODIFY FILE focusfilename
FIXFORM FROM HOLD
DATA ON HOLD
END
Thanks for all your support. After making changes I need to again keep my file in focus format itself. I have alread modified this in LOTUS format now i want it to reformat back to focus. How can I do that ?
You will have to export the file from Lotus into a fixed format file, create a master file description for it, then do the code in my previous post which will reload the file.
Firoz, I gather that you have to alter the data manually and not by using a COMPUTE statement in MODIFY. If so, forget about Lotus. Use Excel instead. Do a TABLE FILE on your FOCUS file and extract the fields you need to alter together with the FOCUS file record keys and HOLD FORMAT EXL2K. After you fiddle with your data, use ODBC to access the data and create a MASTER with the WebFocus console. The TABLE FILE on the new master, hold it and load it into you FOCUS file using MODIFY.
MODIFY FILE focusfile
FIXFORM FROM holdfile
MATCH keyfields
ON MATCH UPDATE datafields
ON NOMATCH REJECT
DATA ON holdfile
END
Good luck!
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
When you say Lotus do you mean Lotus 1-2-3 or Lotus Notes?
Please do not make it more complex then needed.... Every one understands that it will not be notes.
Firoz
As far as I do remember you can with Lotus do the same things as with Excel. You can save an excel spreadsheet as CSV file and that is possible in Lotus too.
If you have fieldnames on the first row, you get them in the output file too. Since you created the file first I hope you ket the Masterfile, otherwiseyou need to create that master also.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
I think all of you are referring to the Web based focus. I work on mainframe and i need to do the same thing in mainframe. I understand that the same procedure as mentioned above can be incorporated in mainframe. please verify and post your helpful comments in this regard.
I am trying to simplify this not complicate it. If Firoz means 1-2-3 (spreadsheet) then he should be able to save it as a csv file create a master and read it back. If he means Notes, there is an ODBC connector that can read Notes with WebFocus.
Firoz,
I am with Ginny, I would not do this in Lotus. If the modifications are something you can do in a program you should. I would use TABLE logic to save a file with the keys of the records I want to alter, and any data that you might want to change and then use MODIFY to update those fields.
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
Is this a one time process? If so any of these solutions will work.
If this is a process that will need to be done numerous times in the future on the mainframe - the solutions are kind of complex as you need to keep crossing OS's and there are other methods that I can elaborate on - if needed.
If you are using mainframe FOCUS, you should have access to the old FSCAN command that will let you edit the FOCUS database directly. This will work if you want to add, change, or delete records. If you need to do other types of record reformating, you will want to listen to the other postings.
Be sure to make a backup copy of the file and read the documentation first!
First I converted the focus file into alpha using the following code.
TABLE FILE focusfile PRINT * ON TABLE SAVE AS alphafile FORMAT ALPHA END
Then manually edited the alpha file.
Then I converted the alpha file back to focus format using the following code.
DYNAM ALLOC FILE alphafile DA userid.alphafile.data SHR REUSE DYNAM ALLOC FILE focusfile DA userid.focusfile.focus SHR REUSE CREATE FILE focusfile MODIFY FILE focusfile FIXFORM FROM alphafile DATA ON alphafile END
Please let me know if my coding is correct. Also any additional concepts which i can include to improve the effeciency or prevent unusual errors in future.
You need the hold master in order to do the MODIFY FIXFORM using the FROM option.
As for additional concepts, as I mentioned before, if you want to change the same thing in all the records, you can do a DEFINE before your first TABLE, such that with ASNAMES turned on your hold file will have all the changes in it and you can do the MODIFY without having to change the data by hand.
I have coded the above code in two different focexecs. And using SAVE worked for me instead of HOLD. Please let me know if I am still wrong. And also what impact would be there if I change it to HOLD ?