Focal Point
[SOLVED] FOCUS datasource

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

March 07, 2019, 04:41 AM
otto
[SOLVED] FOCUS datasource
Hello all,

I'm transferring a FOCUS datasource (with 6 segments, all SEGTYPE S0? with all parents the previous segment) into an Oracle database. I'm trying to work out if I can see within the datasource the relationship between the segments, ie a key so I can see which entry in a segment is related to its parent, any ideas?

Cordialement

This message has been edited. Last edited by: FP Mod Chuck,


WF 8201, Windows Server 2012 R2, SQL Server 2014, HTML, PDF, Excel, Powerpoint, Active Report
March 07, 2019, 05:14 AM
Addy
try using
CHECK FILE [MAS FILE NAME] PICTURE

E.g. CHECK FILE CAR PICTURE


WF 8.2.04
Windows/Unix
All Formats
In Focus since 2006
March 07, 2019, 08:41 AM
otto
Addy, useful but maybe I can explain a bit more with an eg

FILE=TEST, SUFFIX=FOC
SEGNAME=SEG01, SEGTYPE=S01
FIELDNAME=TEAM, E01, A20, $
FIELDNAME=MASCOT, E02, A20, $
SEGNAME=SEG02, SEGTYPE=S01, PARENT=SEG01
FIELDNAME=PLAYER_NAME, E03, A20, $
FIELDNAME=FAVOURITE_COLOUR, E04, A20, $

SEG01
LIVERPOOL MANU

SEG02
DALGLISH GROBELAAR HUGHES

So, I want to export the two segments as separate tables into our database.

is there any information in the foc datasource that I can use to show the link that Dalglish and Grobelaar play for Liverpool, ie a foreign key linking the segments.
I can choose the two fields PLAYER_NAME and MASCOT in a TABLE FILE and export the table combined and then normalize it, creating keys in the process, which is fine.
But if there is a foreign key in the foc datasource I can use linking segments(it must exist somewhere) it might be useful to me.
In asking this question I may be showing my misunderstanding of the foc datasource and any advice / correction appreciated.

Cordialement


WF 8201, Windows Server 2012 R2, SQL Server 2014, HTML, PDF, Excel, Powerpoint, Active Report
March 07, 2019, 09:13 AM
Tony A
Otto,

Seg02 would need to contain the key for the parent segment as the foreign key.

In a FOCUS multisegment datasource, the links between segments are held internally. So if you want to mimic or transfer this to another DBMS then you need (as you thought) to take the parent key and add it to the child table as a foreign key.

Good luck!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
March 07, 2019, 10:39 AM
otto
Tony,

Thanks very much for your help, it makes sense to me now.

Cordialement


WF 8201, Windows Server 2012 R2, SQL Server 2014, HTML, PDF, Excel, Powerpoint, Active Report
March 07, 2019, 11:36 AM
Addy
Hi Otto,
May be this can help.
It gives lost of info about the data source.


  
CHECK FILE CAR ON TABLE HOLD AS CAR_META

TABLE FILE CAR_META
PRINT
*
END



WF 8.2.04
Windows/Unix
All Formats
In Focus since 2006
March 08, 2019, 02:47 AM
otto
Addy,

Thanks very much, that looks useful, I didn't realise I could run that query and investigate the output of the structure in a table format like that.

Cordialement


WF 8201, Windows Server 2012 R2, SQL Server 2014, HTML, PDF, Excel, Powerpoint, Active Report