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     Editing a focus format file.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Editing a focus format file.
 Login/Join
 
Silver Member
posted
Hi,

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.

Thanks in advance.


Thanks

focus on mainframe client
Windows
Excel
 
Posts: 33 | Registered: December 14, 2007Report This Post
Platinum Member
posted Hide Post
Are you needing to alter the field formats of the FOCUS file or simply change data values in existing records?

If you are simply updating data values, you can do it via MODIFY code. You can look it up in the FOCUS manuals.

If you need to alter the table structure, that's a little more involved.
 
Posts: 118 | Location: DC | Registered: May 13, 2005Report This Post
Expert
posted Hide Post
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  


That should do it for you.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Silver Member
posted Hide Post
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 ?

Thanks,
Firoz


Thanks

focus on mainframe client
Windows
Excel
 
Posts: 33 | Registered: December 14, 2007Report This Post
Expert
posted Hide Post
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.

Please be sure to back it up first.

You can look up MODIFY with FIXFORM input.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Silver Member
posted Hide Post
How do I export the file from Lotus into a fixed format file ?


Thanks

focus on mainframe client
Windows
Excel
 
Posts: 33 | Registered: December 14, 2007Report This Post
Virtuoso
posted Hide Post
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, 2006Report This Post
Master
posted Hide Post
Firoz,

When you say Lotus do you mean Lotus 1-2-3 or Lotus Notes?


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by PBrightwell:
Firoz,

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, 2006Report This Post
Silver Member
posted Hide Post
Thanks for all the assistance.

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.

Thanks in advance.
Firoz


Thanks

focus on mainframe client
Windows
Excel
 
Posts: 33 | Registered: December 14, 2007Report This Post
Expert
posted Hide Post
Please see my original post. It does not use Lotus and allows you to do everything on the mainframe.

It is really a simple technique and one that I use repeatedly on a number of platforms. You might have to do a DYNAM instead of a FILEDEF.

Do some reading and give it a shot.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Master
posted Hide Post
Frank,

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, 2007Report This Post
Member
posted Hide Post
Firoz,
Before I add to this conversation...

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.

Michelle


WebFOCUS Production: UNIX 7.7.03M
WebFOCUS Test: UNIX EDASERVE 7.7.05 Client 8.0.01
 
Posts: 28 | Location: Connecticut USA | Registered: August 29, 2006Report This Post
Expert
posted Hide Post
My solution can be done entirely on the mainframe.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Member
posted Hide Post
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!

http://documentation.informationbuilders.com/masterinde...3/13direditfocus.htm


Personal: Windows 7.7.02
Clients: Variety
 
Posts: 16 | Location: Cincinnati, OH | Registered: February 17, 2006Report This Post
Silver Member
posted Hide Post
Hi,

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.

Thanks,
Firoz


Thanks

focus on mainframe client
Windows
Excel
 
Posts: 33 | Registered: December 14, 2007Report This Post
Expert
posted Hide Post
Firoz,

That looks perfect except that you should say
ON TABLE HOLD AS alphafile FORMAT ALPHA  

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.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Silver Member
posted Hide Post
Ginny,

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 ?

Firoz


Thanks

focus on mainframe client
Windows
Excel
 
Posts: 33 | Registered: December 14, 2007Report This Post
Virtuoso
posted Hide Post
With a HOLD you also get a master file,
with SAVE you will not.

If you need the master file (or better if you need the output with a descriptive file) you better use HOLD.




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, 2006Report This Post
Expert
posted Hide Post
Firoz,

I don't understand why your MODIFY is working without a master. Without a master, you would have to say

FIXFORM FLD1/format FLD2/format
DATA ON alphafile
END

There should be no ramifications to using HOLD instead of SAVE in this case.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Master
posted Hide Post
quote:
DYNAM ALLOC FILE focusfile DA userid.focusfile.focus SHR REUSE
CREATE FILE focusfile


Your extention on the FOCUS DB should be .FOC. Are you wanting to completely replace the existing file? CREATE will wipe out the existing file.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report 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     Editing a focus format file.

Copyright © 1996-2020 Information Builders