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     [SOLVED] load FML hierarchy into hold file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] load FML hierarchy into hold file
 Login/Join
 
Member
posted
I am trying to load a FML hierarchy into a hold file because I need to do some COMPUTEs on the PARENT and CHILD fields. When I try to display the file I get error "(FOC36364) REQUESTED HIERARCHY IS NOT LOADED". It is as though the file is not created with the PROPERTY=PARENT_OF and REFERENCE=MY_ACCOUNT attributes. Also, I can print the fields of the file with ?FF but that does not show if I have those attributes defined. Does anybody have any ideas so to what I am doing wrong?

Thanks,
Swamp

The code follows:

-****************************************
-* Create hierarchy file with PARENT_OF *
-****************************************
FILEDEF CENTGLM DISK CENTGLF.MAS
FILEDEF CENTGLF DISK CENTGLF.FTM
-RUN
-WRITE CENTGLM FILE=CENTGLF,SUFFIX=FIX
-WRITE CENTGLM SEGNAME=CENTGLF ,SEGTYPE=S01
-WRITE CENTGLM FIELDNAME=MY_ACCOUNT_PARENT,USAGE=A7,ACTUAL=A7,PROPERTY=PARENT_OF,REFERENCE=MY_ACCOUNT,$
-WRITE CENTGLM FIELDNAME=MY_ACCOUNT,USAGE=A7,ACTUAL=A7,$
-RUN
?FF CENTGLF

-************************************
-* Display input file for debugging *
-************************************
-*TABLE FILE CENTGL
-*PRINT *
-*END

-************************************
-* Create a hold file from computes *
-************************************
TABLE FILE CENTGL
PRINT
COMPUTE MY_ACCOUNT/A7 = GL_ACCOUNT;
COMPUTE MY_ACCOUNT_PARENT/A7 = GL_ACCOUNT_PARENT;
ON TABLE HOLD AS CENTGLF
END

-************************************
-* Display hierarchy *
-************************************
TABLE FILE CENTGLF
PRINT GL_ACCOUNT_PARENT
FOR GL_ACCOUNT
'2600' WITH CHILDREN
END

This message has been edited. Last edited by: Swamp,


WebFOCUS 7.6.10
Windows
Excel, PDF, HTML
 
Posts: 19 | Location: Cincinnati OH | Registered: August 18, 2010Report This Post
Expert
posted Hide Post
1) FML and HOLD files don't go together well.
2) The PROPERTY and REFERENCE properties do not get saved in the HOLD file
3) Reading the manual (Creating Financial Reports > Creating Reports With Financial Report Painter > Reporting Dynamically From a Hierarchy), it appears you would have to code these properties, which means you could create your own Master and use it instead of the one created by the HOLD command.

You would have to do something like this:

FILEDEF CENTGLF DISK CENTGLF.FTM

TABLE FILE CENTGL
...
ON TABLE HOLD AS CENTGLF
END

FILEDEF CENTGLFF DISK CENTGLF.FTM

TABLE FILE CENTGLFF
...
'2600' WITH CHILDREN
END



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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Francis,

Thanks. I believe you have led me right to the solution. I will post tomorrow with a cleaned up example.

Thanks,
Swamp


WebFOCUS 7.6.10
Windows
Excel, PDF, HTML
 
Posts: 19 | Location: Cincinnati OH | Registered: August 18, 2010Report This Post
Member
posted Hide Post
Francis,

Here is my cleaned up example. I did exactly as you said creating my own Master to re-create the PROPERTY and REFERENCE properties that are lost when you create a HOLD file. I did have to add some FILLER fields to make things work.



-************************************
-* Display input file for debugging *
-************************************
-*TABLE FILE CENTGL
-*PRINT *
-*END

-************************************
-* Create a hold file from computes *
-************************************
TABLE FILE CENTGL
PRINT *
COMPUTE MY_ACCOUNT/A7 = GL_ACCOUNT;
COMPUTE MY_ACCOUNT_PARENT/A7 = GL_ACCOUNT_PARENT;
COMPUTE MY_ACCOUNT2/A7 = GL_ACCOUNT;
COMPUTE MY_ACCOUNT_PARENT2/A7 = GL_ACCOUNT_PARENT;
COMPUTE MY_ACCOUNT3/A7 = GL_ACCOUNT;
ON TABLE HOLD AS CENTGLF
END
-RUN

? HOLD CENTGLF

-************************************
-* Display HOLD file for debugging *
-************************************
-*TABLE FILE CENTGLF
-*PRINT *
-*END

-******************************************************************************
-* Create a NEW .mas file to insert PROPERTY and REFERENCE for hierarchy *
-* N.B. By trial-and-error I discovered that I needed to add FILLER fields. *
-******************************************************************************
FILEDEF CENTGLM DISK CENTGLF.MAS
-RUN
-WRITE CENTGLM FILE=CENTGLF,SUFFIX=FIX
-WRITE CENTGLM SEGNAME=CENTGLF ,SEGTYPE=S01
-WRITE CENTGLM FIELDNAME=GL_ACCOUNT, USAGE=A7,ACTUAL=A7,$
-WRITE CENTGLM FIELDNAME=GL_ACCOUNT_PARENT, USAGE=A7,ACTUAL=A7,$
-WRITE CENTGLM FIELDNAME=GL_ACCOUNT_TYPE, USAGE=A1,ACTUAL=A1,$
-WRITE CENTGLM FIELDNAME=GL_ROLLUP_OP, USAGE=A1,ACTUAL=A1,$
-WRITE CENTGLM FIELDNAME=GL_ACCOUNT_LEVEL, USAGE=I3,ACTUAL=I3,$
-WRITE CENTGLM FIELDNAME=GL_ACCOUNT_CAPTION, USAGE=A30,ACTUAL=A30,$
-WRITE CENTGLM FIELDNAME=SYS_ACCOUNT, USAGE=A6,ACTUAL=A6,$
-WRITE CENTGLM FIELDNAME=FILLER, USAGE=A13,ACTUAL=A13,$
-WRITE CENTGLM FIELDNAME=MY_ACCOUNT, USAGE=A7,ACTUAL=A7,$
-WRITE CENTGLM FIELDNAME=FILLER1, USAGE=A1,ACTUAL=A1,$
-WRITE CENTGLM FIELDNAME=MY_ACCOUNT_PARENT, USAGE=A7,ACTUAL=A7,PROPERTY=PARENT_OF,REFERENCE=MY_ACCOUNT,$
-WRITE CENTGLM FIELDNAME=FILLER2, USAGE=A1,ACTUAL=A1,$
-WRITE CENTGLM FIELDNAME=MY_ACCOUNT2, USAGE=A7,ACTUAL=A7,$
-WRITE CENTGLM FIELDNAME=FILLER3, USAGE=A1,ACTUAL=A1,$
-WRITE CENTGLM FIELDNAME=MY_ACCOUNT_PARENT2, USAGE=A7,ACTUAL=A7,$
-WRITE CENTGLM FIELDNAME=FILLER4, USAGE=A1,ACTUAL=A1,$
-WRITE CENTGLM FIELDNAME=MY_ACCOUNT3, USAGE=A7,ACTUAL=A7,$

-RUN
? HOLD CENTGLF

-*FILEDEF CENTGLFF DISK CENTGLF.FTM

-************************************
-* Display HOLD file for debugging *
-************************************
-*TABLE FILE CENTGLF
-*PRINT *
-*END

-************************************
-* Display hierarchy *
-************************************
TABLE FILE CENTGLF
PRINT MY_ACCOUNT
MY_ACCOUNT_PARENT
MY_ACCOUNT2
MY_ACCOUNT_PARENT2
MY_ACCOUNT3
GL_ACCOUNT
GL_ACCOUNT_PARENT
FOR MY_ACCOUNT
'2500' WITH CHILDREN
END

-************************************
-* Display hierarchy *
-************************************
TABLE FILE CENTGL
PRINT GL_ACCOUNT_PARENT
GL_ACCOUNT
FOR GL_ACCOUNT
'2600' WITH CHILDREN
END

This message has been edited. Last edited by: Swamp,


WebFOCUS 7.6.10
Windows
Excel, PDF, HTML
 
Posts: 19 | Location: Cincinnati OH | Registered: August 18, 2010Report This Post
Member
posted Hide Post
As a follow-up to my previous post, I have learned a few things. It is easier to have the file be a FOCUS file so I would make the following change:

-WRITE CENTGLM FILE=CENTGLF,SUFFIX=FIX
-WRITE CENTGLM SEGNAME=SEG01 ,SEGTYPE=S1

This will involve changing your filler fields.

Also, I am told that it is best if the hierarchy field is indexed:

-WRITE CENTGLM FIELDNAME=MY_ACCOUNT, USAGE=A7,ACTUAL=A7,FIELDTYPE=I,$


And, as you know the Hierarchy field and parent field need to have the same definition (A7, in this case) but the caption field can be different (A30).


WebFOCUS 7.6.10
Windows
Excel, PDF, HTML
 
Posts: 19 | Location: Cincinnati OH | Registered: August 18, 2010Report This Post
Expert
posted Hide Post
Thanks for the update Swamp.

I'll keep your findings close - I have to fiddle about with FML very soon.

Cheers,


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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     [SOLVED] load FML hierarchy into hold file

Copyright © 1996-2020 Information Builders