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
July 07, 2009, 10:08 AM
Stefaans
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
July 07, 2009, 10:29 AM
Stefaans
Hi I am an old mainframer. 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 doublequoteThis message has been edited. Last edited by: Stefaans,
WebFOCUS 7.7.01 Windows, TSO 7.0
July 07, 2009, 10:52 AM
Francis Mariani
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.
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
July 07, 2009, 11:57 AM
Tim Bayer
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: