Focal Point
[SOLVED] Need to read the CRJOINTYPE metrics from Master File.

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

January 18, 2018, 09:15 AM
Veeramani Karuthapandian
[SOLVED] Need to read the CRJOINTYPE metrics from Master File.
Hi ALL,

I want to read the CRJOINTYPE(JOIN type) values from Master File.

please suggest.

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


WebFOCUS 8
Windows, All Outputs
January 18, 2018, 09:27 AM
Frans
Go to textview?


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
January 18, 2018, 03:19 PM
Waz
Is this for a Program or just to have a look ?


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!

January 18, 2018, 04:19 PM
FP Mod Chuck
Hi Veeramani

First of all welcome to Focal Point. I think you will find it very useful for getting answers to your development questions.

If you want to read this information with a WF program there is a table called syscolumn which contains the information you are looking for. The master file can be found in the ibi\srv81\home\catalog directory. You can set a WHERE statement to select on TBNAME.

Hope this helps.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
January 19, 2018, 01:14 AM
Veeramani Karuthapandian
Dear All,

Thanks for your reply.

For Example: Master File Contents are below like as,

car.mas:

FILENAME=TABLE_CURR, SUFFIX=SQLDBC , $
SEGMENT=2020_CURR, SEGTYPE=S0, $
FIELDNAME=MO_NB, ALIAS=MO_NB, USAGE=I6, ACTUAL=I4, MISSING=ON, $
DEFINE COM_IND/A1=IF FIELD_SK EQ 2 THEN 'Y' ELSE 'N'; $
SEGMENT=2020_AGNT, SEGTYPE=U, SEGSUF=SQLDBC , PARENT=2020_CURR, CRJOINTYPE=LEFT_OUTER,
JOIN_WHERE=GRP_SK EQ 2020_AGNT.GRP_SK;, $
FIELDNAME=USER_ID_CD, ALIAS=USER_ID_CD, USAGE=A9, ACTUAL=A9, $
SEGMENT=ACCT_CURR, SEGTYPE=U, SEGSUF=SQLDBC , PARENT=2020_CURR, CRJOINTYPE=LEFT_OUTER,
JOIN_WHERE=2020_CURR.ACCT_NB EQ ACCT_CURR.ACCT_NB;, $

Question:
I want to read all the FILENAME, SEGMENT, PARENT, CRJOINTYPE and JOIN_WHERE metric values through fex code.
please suggest.


WebFOCUS 8
Windows, All Outputs
January 19, 2018, 03:49 AM
Wep5622
I'm not sure it will contain the CRJOINTYPE data, but you can probably get a lot of that info from:
CHECK FILE TABLE_CURR HOLD

TABLE FILE HOLD
PRINT *
END



WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
January 19, 2018, 04:22 AM
Veeramani Karuthapandian
quote:
CHECK FILE TABLE_CURR HOLD

TABLE FILE HOLD
PRINT *
END



Already, I tried with the above mentioned code. For CRJOINTYPE and JOIN_WHERE columns are blank. Any other way to retrieve this values?.


WebFOCUS 8
Windows, All Outputs
January 19, 2018, 04:57 AM
Tony A
I suggest that you read the response from Chuck - FP Mod Chuck - above.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 19, 2018, 05:42 AM
Veeramani Karuthapandian
quote:
Originally posted by FP Mod Chuck:
Hi Veeramani

First of all welcome to Focal Point. I think you will find it very useful for getting answers to your development questions.

If you want to read this information with a WF program there is a table called syscolumn which contains the information you are looking for. The master file can be found in the ibi\srv81\home\catalog directory. You can set a WHERE statement to select on TBNAME.

Hope this helps.


please share the sample code. it's helps to resolve the issue.


WebFOCUS 8
Windows, All Outputs
January 19, 2018, 11:51 AM
FP Mod Chuck
Hi Veeramani

Here is some sample code.


DEFINE FILE SYSCOLUM
JOIN_TYPE/A20=
IF SYSCOLUM.SYSSEG.JOINTYPE EQ 'L' THEN 'Left Outer' ELSE
IF SYSCOLUM.SYSSEG.JOINTYPE EQ 'I' THEN 'Inner' ELSE 'No Join Type';
END
TABLE FILE SYSCOLUM
BY SYSCOLUM.SYSCOLUM.TBNAME
BY SYSCOLUM.SYSSEG.SEGNAME
BY SYSCOLUM.SYSSEG.JOIN_TYPE
WHERE SYSCOLUM.SYSCOLUM.TBNAME EQ '&TBNAME.(FIND SYSCOLUM.SYSCOLUM.TBNAME IN SYSCOLUM).TBNAME:.';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END



Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
January 21, 2018, 03:05 PM
Waz
Well done Chuck.....


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!

January 22, 2018, 03:23 AM
Veeramani Karuthapandian
Hi Chuck,

Great work. Thanks a lot. I also want the field (JOIN_WHERE) which is used to join two tables.

Thanks,Veeramani


WebFOCUS 8
Windows, All Outputs
January 22, 2018, 12:23 PM
FP Mod Chuck
I am working on that hope to have it to you later today. It must be in a different table and I haven't located it yet


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
January 23, 2018, 11:03 AM
Dan Brooke
Hey Veeramani,

I think you're looking for JOIN_EXPR

TABLE FILE SYSCOLUM
BY SYSCOLUM.SYSSEG.JOIN_EXPR
END

You probably also want PARENT to show the table that originates the join.

Hope that helps.

Dan


Dan B.
WebFocus 8205M
January 23, 2018, 12:58 PM
FP Mod Chuck
So here is the updated code but it only works in WF 8.2 the JOIN_EXPR field does not exist in SYSCOLUMN prior to that. Thanks Dan for your input on including PARENT and finding JOIN_EXPR!


DEFINE FILE SYSCOLUM
JOIN_TYPE/A20=
IF SYSCOLUM.SYSSEG.JOINTYPE EQ 'L' THEN 'Left Outer' ELSE
IF SYSCOLUM.SYSSEG.JOINTYPE EQ 'I' THEN 'Inner' ELSE 'No Join Type';
END
TABLE FILE SYSCOLUM
BY SYSCOLUM.SYSCOLUM.TBNAME
BY SYSCOLUM.SYSSEG.SEGNAME
BY SYSCOLUM.SYSSEG.PARENT
BY SYSCOLUM.SYSSEG.JOIN_TYPE
BY SYSCOLUM.SYSSEG.JOIN_EXPR
WHERE SYSCOLUM.SYSCOLUM.TBNAME EQ '&TBNAME.(FIND SYSCOLUM.SYSCOLUM.TBNAME IN SYSCOLUM).TBNAME:.';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END



Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
January 24, 2018, 05:07 AM
Veeramani Karuthapandian
Hi Chuck,

Thanks for your help. Currently, We are using WebFOCUS 8.1.05 version. Let me check in WF8.2


WebFOCUS 8
Windows, All Outputs