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] Getting current report name

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Getting current report name
 Login/Join
 
Member
posted
Does anyone know of an easy way for me to grab the current report name minus the .fex, so I can populate a variable with it?

For example; for report "MyReport.fex", I want to be able to grab "MyReport"

Thanks!

This message has been edited. Last edited by: Tim Bayer,



------------------------------------
WebFOCUS Version 7.6.2
 
Posts: 17 | Registered: September 08, 2008Report This Post
Silver Member
posted Hide Post
Hi
You may find this useful. You would have to place this in the code.
TABLE FILE MCTADJX
"&FOCFOCEXEC "
SUM KOUNT1
WHERE RECORDLIMIT IS 10
END


WebFOCUS 7.7.01 Windows, TSO 7.0
 
Posts: 43 | Registered: April 18, 2007Report This Post
Silver Member
posted Hide Post
Hi
I am an old mainframer.Smiler
Try this for WebFOCUS. It works,just tested it
regards Steve
DEFINE FILE SQLOUT
NNAME/A16 ='&FOCFOCEXEC';
LEN/I6 = ARGLEN(16,NNAME,'I6');
NEWLEN/I6 = LEN-4; -* dont want .fex
NUMCHAR/I6 = (NEWLEN -2) +1;
NEWNAME/A16 = SUBSTR(16,NNAME,2,NEWLEN,NUMCHAR,'A16');
END
TABLE FILE SQLOUT
PRINT
fund_id asset_id CALEN_DT NEWNAME
HEADING doubleqquote NEWNAME with a less than sign goes in here doublequote

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


WebFOCUS 7.7.01 Windows, TSO 7.0
 
Posts: 43 | Registered: April 18, 2007Report This Post
Expert
posted Hide Post
Tim,

If you're working with WF 7.6 and later, there's a newish variable &FOCFEXNAME that gives you the name of the fex without '.fex'. &FOCFOCEXEC has been providing an incorrect name since at least v5.3 days - it has an underscore at the front of the name.

Fex name: temporary123.fex
&FOCFEXNAME = temporary123
&FOCFOCEXEC = _temporary123

Try adding -? & to the top of your fex to list all the available variables at execution time.

This does not apply if you're running the fex via MRE - different variables are created.

(Please update your profile with the version of WebFOCUS you're working with.)


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, I tried your idea first because I was hoping it was as easy as a system defined variable. When I put the -? & at the top of my fex I get three variables back that contain the report name:

&FOCFEXNAME = MyReport.fex
&FOCFOCEXEC = _MyReport.fex
&FEX_NAME = MyReport.fex

The &FOCFEXNAME seems to also return .fex. I have not tried the other ideas yet, I will look at them now.

Thanks for the ideas.



------------------------------------
WebFOCUS Version 7.6.2
 
Posts: 17 | Registered: September 08, 2008Report This Post
Expert
posted Hide Post
  
-SET &ECHO=ALL;
-SET &FOC_FEXNAME = 'MyReport.fex';
-SET &FEX_OUT= GETTOK(&FOC_FEXNAME.EVAL, &FOC_FEXNAME.LENGTH, 1, '.', 20, 'A20');
-TYPE &FEX_OUT
-EXIT


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
Or

-SET &ECHO=ALL;
-SET &FOC_FEXNAME = 'MyReport.fex';

-SET &FEX_OUT= TRIM('T', '&FOC_FEXNAME.EVAL', &FOC_FEXNAME.LENGTH, '.fex', 4, 'A&FOC_FEXNAME.LENGTH');

-TYPE &FEX_OUT


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
Tom and Francis, both of those methods worked.

Thanks!



------------------------------------
WebFOCUS Version 7.6.2
 
Posts: 17 | Registered: September 08, 2008Report 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] Getting current report name

Copyright © 1996-2020 Information Builders