Focal Point
Moving .FOC files

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4561080982

June 24, 2008, 09:25 AM
Lpitt
Moving .FOC files
I am trying to move a FOCUS file (.FOC) created in FOCUS 6.9 on VMS platform to WebFOCUS on a windows server. Fields with a format of DX.XX all return zero once moved to the new platform. Packed numerics (PX.XX) come across fine. Way back, when experimenting with PC-FOCUS, I remember having to IMPORT my .FOC files from VMS to the PC. Does WebFocus require a similar importation? Or do I need to tweek my MFD? Would appreciate any help.
Thanks, Larry


WebFOCUS 7.6.7 on Win2k3
Output: HTML, PDF, Excel, DHTML, ALPHA
June 24, 2008, 09:38 AM
Tom Flynn
Larry,

You have to:
DUMP (TABLE PRINT HOLD FORMAT ALPHA), FTP, then LOAD (MODIFY)

or

Use DATAMIGRATOR, or another ETL tool, to extract the data.

Hope this helps...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
June 24, 2008, 09:42 AM
Francis Mariani
I don't think you can move a FOCUS database from one platform to another. You have to use the REBUILD DUMP facility to unload the data, move the unloaded data file, then us REBUILD LOAD to recreate the database.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 24, 2008, 10:39 AM
GinnyJakes
Either of these suggestions will work. If you do the first one, don't forget to ftp the hold master. This is the one I ususally do.


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
June 24, 2008, 05:38 PM
Lpitt
Thank you all. I tried both methods and have failed. With Tom's method I have no problem dumping and moving the data from VMS, but when I attempt to load the data back with my MODIFY code in WF get this message:

Reporting Server messages exceeded IBIF_max_messages, report retrieval aborted.

I broke the method down by segment and can load the root segment that has about 20K records. Loading a child segment that has about 250K records is where I get the above message. Is that big for WF?

I also tried the REBUILD approach. The problem here is my lack of understanding with the non-persistent sessions of WF. I received output that said the file was rebuilt, but I can't find it, and don't see any option to direct the output.

Thanks, Larry


WebFOCUS 7.6.7 on Win2k3
Output: HTML, PDF, Excel, DHTML, ALPHA
June 24, 2008, 06:21 PM
GinnyJakes
Put an APP HOLD dirname in your focexec that does the REBUILD. It will save your temp files there.

I don't know why the other technique didn't work. Make sure that the hold file is FORMAT ALPHA and that you do an FTP to bring the ftm and hold master to the target platform.


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
June 24, 2008, 07:40 PM
susannah
ah. SomethingWindows is my favorite platform.
larry...the message
Reporting Server messages exceeded IBIF_max_messages
usually suggests you have a loop, where you least expect it, somewhere in your code.
Before we talk about how to debug your code, lets just make sure some of the webworld fundamentals are covered...
250k records is not too big for wf.
in version 7 , focus files (actually XFOCUS files) can be gigantic.
Make sure you have created the .MAS for your target file, first.
Make sure that file is an XFOCUS (way cool) rather than just a FOCUS file. (read up on XFOCUS)
Make sure you have a USE statement to make sure your fex knows where you want to actually put that new database.
Make sure you issue the CREATE command before you start loading the new file..otherwise the file just gets created in the agent (that temporary directory ... a new concept for your 'persistent' mind to grasp), and then vanishes ... which fits with your symptoms.
USE
D:\IBI\APPS\somedirectory\NEWCAR.FOC NEW
END
CREATE FILE NEWCAR
MODIFY FILE NEWCAR
..yada yada
..or maybe your REBUILD syntax could go here, just make sure you've specified with your USE statement just exactly where that new file is s'posed to go.
Welcome to the webworld. You will like it, we promise.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 25, 2008, 07:30 AM
Tom Flynn
1st, THANKS to Francis, Ginny and Susannah, their input is valued and exceptional, as always.

Larry, I have done over 10 conversions from MF to Windows, always used the dump / load technique.

Ensure these steps have been followed:

1. The FOCUS DATABASE master from the M/F is copy/paste into an application folder within the APP PATH.
2. Allocate HOLDMAST to a PDS you can write to; this will preserve your master when you HOLD the data.
3. Table out all the data and ON TABLE HOLD AS WHATEVER FOMAT ALPHA. This will will preserve P,D,I formatted fields.
4. Copy/Paste your master, WHATEVER, from HOLDMAST into an APP folder which in the APP PATH. (Remove any zeroes from bytes 73-80 for every line of the master, you can set NUM OFF to remove all of them)
5. FTP the data and, "possibly", you will need to use FILEDEF, i.e., APP FI WHATEVER DISK pathname/dataset_name (RECFM F LRECL XXX
I have found that you need to filedef the data with RECFM and LRECL to accurately read the data
6. TABLE FILE WHATEVER and ensure your record counts from the MF match those on Windows.
7. TABLE FILE WHATEVER on Windows and HOLD the data.
8. CREATE FILE NEWFOCUSDB
9. Use MODIFY to load, example below
  
MODIFY FILE NEWFOCUSDB
FIXFORM FROM HOLD
-*  Root Segment key field based on SEGTYPE
MATCH KEYFIELD1 KEYFIELD2 KEYFIELD3 etc
ON NOMATCH INCLUDE
ON MATCH CONTINUE
-*  Child Segment key field based on SEGTYPE
MATCH CHILD1 CHILD2 CHILD3 etc
ON MATCH UPDATE *
ON NOMATCH INCLUDE  
DATA ON HOLD
END



If I've missed anything, someone will chime in, hopefully...

Hope this helps...

Tom

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
June 25, 2008, 05:55 PM
Waz
Larry, I had a similar issue many years ago when moveing Foc databases from MVS to Windows.

The only safe way I found was to Table Hold each segment, transfer to Windows (with Master) and then create and load each segment.

I found at the time that REBUILD DUMP and LOAD had issues with the transfer and conversion from EBCDIC to ASCII.

Ended up writing two programs, one to analyse the Master and dump each segment, the other to put it back together on the other end.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

June 25, 2008, 10:09 PM
j.gross
Two caveats:
Numeric fields in the source Focus file may contain values that overflow their print format; dumping them in Alpha format will yield asterisks, preventing the Load of the segment.
Similarly, fields with D format may lose precision in the process (i.e., 1/3, stored as .33333333 in a D12.2, will be loaded in the new Focus file as 0.33), so reports may not tie.


- Jack Gross
WF through 8.1.05