Focal Point
[CLOSED] Convert IBM Mainframe FOCUS db files to WebFOCUS db files

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

July 17, 2008, 03:30 PM
whoelse
[CLOSED] Convert IBM Mainframe FOCUS db files to WebFOCUS db files
Hi Folks,

I have been working with ibi Support for a few weeks on this and I have tried the suggestions here
http://techsupport.information...cof/cof_tcn_039.html without success. I have also tried some of the relevant suggestions from my search on this forum.

I am very sure somebody has done this already. Can anybody share with me the right set of code to convert a mainframe focus dababase file in EBCDIC format to its useable format in WebFOCUS. We are running Developer Studio 7.6.5 on Windows XP Pro. Both WebFOCUS and Developer Studiao are installed and configured on one workstation.

Here is what I have tried. From a single segment file:

Step 1.
On the Mainframe:
TABLE FILE XXXXX
PRINT *
ON TABLE HOLD FORMAT ALPHA AS HLD
END

Query on HLD in mainframe shows it contains data.

Step2.
Transfer HLD.FOCTEMP as HLD.FTM and HLD.MASTER as HLD.MAS from Mainframe to WebFOCUS using IND$FILE, a 3270 emulator.

Step 3.
From a WebFOCUS Procedure:
APP HOLD BASEAPP
TABLE FILE HLD
PRINT *
ON TABLE HOLD FORMAT FOCUS AS XXXXX
END


Results:

--------------------------------------------------------------------------------
No HTML Output!
--------------------------------------------------------------------------------

SET GRAPHSERVURL=http://localhost:8080/ibi_apps/IBIGraphServlet
SET GRAPHENGINE=GRAPH53
APP PATH BASEAPP
TABLE FILE HLD
PRINT *
ON TABLE HOLD FORMAT FOCUS AS XXXXX
END
0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0


Any help will be greatly appreciated.

This message has been edited. Last edited by: <Kathryn Henning>,


Prod: DevStudio 7.6.5 Servlet - Self Service - MS Windows XP SP2 - Apache Tomcat 5.0.28
Dev: DevStudio 7.6.5 Servlet - Self Service - MS Windows XP SP2 - Apache Tomcat 5.0.28
July 17, 2008, 03:38 PM
Tom Flynn
Don't Know, Who???,

You have to FILEDEF hold files, they are not FOCUS files...
You also "may" have to use (RECFM F LRECL xxx

As Prairie has reminded all newcomers to the Forum(this was her designated week), please do the following:

????...welcome to the Forum. Please go in and update your signature with which version you are running. Thanks

** Update signature
1) Logon to Focal Point and go into your complete profile.
2) Scroll down the page until you see the “Signature” field.
3) Fill in the signature you want to use. Here is a sample to model:

Prod: WebFOCUS 5.2.3 on Win 2K/IIS 6/ISAPI Mode
Test: WebFOCUS 7.1 on Win 2K/IIS 6/Weblogic 8.1/Servlet Mode

4) Once all changes are made/added, scroll down to the bottom of the page and click on the Submit button.


Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
July 17, 2008, 04:04 PM
Francis Mariani
If you see the master and data files in the Windows folder, then the transfer worked successfully.

Unfortunately, APP PATH BASEAPP isn't enough to allocate the data file, you have to use FILEDEF as Tom mentions. APP PATH is alright for the Master, though in this case, if it's in BASEAPP, the command is not necessary, as BASEAPP is always part of the PATH.

Because the data file is in an App folder, The FILEDEF command would look something like this:

FILEDEF HLD DISK baseapp/HLD.FTM

It could be coded like this, using the Windows directory structure as well:

FILEDEF HLD DISK c:\ibi\apps\baseapp\HLD.FTM


I don't understand why you would have to be "working with ibi Support for a few weeks on this".

An alternative to

TABLE FILE XXXXX
PRINT *
ON TABLE HOLD FORMAT ALPHA AS HLD
END

would be to use the REBUILD DUMP and LOAD commands.


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
July 17, 2008, 04:43 PM
GinnyJakes
Actually what I would do, after the hold file is created, is ftp the hold ftm and mas file as well as the mas file for the focus file to the Windows platform.

Then after the appropriate APP FI or FILEDEF as suggested, I'd do:
MODIFY FILE HOLD
FIXFROM FROM HOLD
DATA ON HOLD
END

That way you won't get any spurious FOCLIST fields in your Windows FOCUS file.

I'd also recommend that in the TABLE that creates the hold file that you sort the data by the keys.


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
July 17, 2008, 04:58 PM
TexasStingray
whoelse, you do need a FILEDEF in WebFOCUS as I am sure the MDF does not have the dataset populated in it.

  
FILEDEF HLD DISK C:\ibi\apps\baseapp\?????.???





Scott

Are your FOCUS files flat (one segment) or is there a structure.

I've transfered a bundle of FOCUS DB's from MF (EBCIDIC) to PC, and ended up ...


I still have the fexes that I write that did the unload and loadup.


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!

If you have many files you can make this project more automatic by using the CHECK FILE ... HOLD command in order to generate for each file the appropriate dumping and loading of data.

Also, when loading beware of multiple indexes. It is better, for efficiency considerations, to load without and then do a REBUILD - INDEX to create all the indexes at once.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

As a caveat to what Danny said regarding the indexes, you MUST do a CREATE FILE on the master with indexes in order to set the slots on the root page, then do the load with the master without the indexes, then do a REBUILD INDEX using the master with the indexes.

If your file is large and have several indexes, this technique as Danny mentioned improves load performance dramatically.


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
quote:
Originally posted by Waz:
Are your FOCUS files flat (one segment) or is there a structure.

I've transfered a bundle of FOCUS DB's from MF (EBCIDIC) to PC, and ended up ...

  • Transfering the original Master to PC
  • Extracting each segment of each FOCUS file to ALPHA format
  • Transfer the extracted files with there masters to PC
  • Create the New FOCUS files with CREATE FILE
  • Use MODIFY to load each segment into the FOCUS file, making sure they are loaded top to bottom, hierarchy wise.


I still have the fexes that I write that did the unload and loadup.




Hi Waz from Sydney,
I hope you are still an active contributor.
I have to do something similar with segmented FOCUS database tables on tha mainframe. We have to transfer the FOCUS data to WebFOCUS on UNIX. Since there are many canned focexecs against this database on the mainframe, I wanted to preserve it as FOCUS files and reuse the code wherever possible.
Could you please post an example of how you unloaded and loaded segments on one file?
Thanks!


WebFOCUS 760 HPUX - Using MRE, Report Caster, Dashboard and Self Service.
I'll take a look and see if I can find the fexes.


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!