Focal Point
Is it possible?

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

August 06, 2007, 11:52 AM
neuro
Is it possible?
Is it possible in a procedure to get the directory path of the procedure file and display it in a report? If so can someone provide an example?

Thanks


Currenly working @ Learning Circle Education Services
Previously worked @ Nationwide Insurance
Prod: WebFOCUS 7.6.11


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11
August 06, 2007, 12:27 PM
mgrackin
You can use the WHENCE command to get the full path but it does not populate a DM variable with the result. It only displays it so you cannot grab it to put it in something else such as a HEADING.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
August 06, 2007, 12:38 PM
neuro
Hmm, well that is no good. Smiler

We are trying to create a process of documenting our reports and one of the things we want to do is display the location of the procedure say in the "FOOTER". However we are wanting to just add a procedure that will tell us this instead of editing all of our procedures with the location, which over time could change and possibly not get edited to the new location.


Currenly working @ Learning Circle Education Services
Previously worked @ Nationwide Insurance
Prod: WebFOCUS 7.6.11


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11
August 06, 2007, 01:01 PM
Tony A
So you haven't even tried using something like WHENCE &FOCFEXNAME FOCEXEC then?

Don't try it from Dev Studio as the value for &FOCFEXNAME is always ADHOC from DS.

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 
August 06, 2007, 03:08 PM
FrankDutch
Tony is right, we put in every fex the &FOCFEXNAME and if you run it from the editor that will give "ADHOC" But when you run it via the Dashboard or from the browser it does give the internal fexname.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

August 09, 2007, 09:59 AM
Glenda
Please excuse my ignorance, but the only training I have are the manuals and other FOCAL point users. I'm not complaining, I retain more with hands on training.

Is there documentation somewhere on this?

Glenda


Glenda

In FOCUS Since 1990
Production 8.2 Windows
August 09, 2007, 10:37 AM
Tony A
Glenda,

A the top right of this page is a link for searching the Technical Documentation Library.
Click it and then choose WebFOCUS Reporting and your release on the left hand side. On the search item enter "whence". Only one document is shown but it is very informational.

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 
August 09, 2007, 11:15 AM
Francis Mariani
quote:
FOCFEXNAME


Tony A and FrankDutch,

I have never used this magical parm, it does not exist when I've run my fexes. What I do have in my self-service fexes is &FOCFOCEXEC which has an underscore in the first character and which probably won't work with WHENCE. And I'd love to have someone explain to me how to use the WHENCE command to get the result into a Dialogue Manager variable, which is what the original question was about.


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
August 09, 2007, 11:31 AM
Francis Mariani
If this is for MRE, the domain and folder are in DM variables.

This message has been edited. Last edited by: Francis Mariani,


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
August 09, 2007, 12:19 PM
Francis Mariani
There has to be a way to do what you want. Perhaps something can be added to WF Admin Console > Configuration > Custom Settings, but I don't know...

Here is a completely ridiculous way, and this will only work for programs that are in a folder in App Root, not for programs that are in a folder that has been added via APP MAP, APP PREPENDPATH or APP APPENDPATH. The program loops through each App, one by one, looking for the program - when it finds it, it gets out of the loop:

-SET &ECHO=ALL;

-DEFAULT &PROGRAM1 = 'NCRR004';

-SET &PROGRAM1 = LOCASE(&PROGRAM1.LENGTH, &PROGRAM1, 'A&PROGRAM1.LENGTH');

-SET &DIRSEP = IF &FOCMODE EQ 'UNIX' THEN '/' ELSE '\';

APP LIST HOLD
-RUN

?FF FOCAPPL
-RUN

-READ FOCAPPL NOCLOSE &ADATE.A10. &ATIME.A8. &APPNAME.A45.

-REPEAT END_LOOP1 WHILE &IORETURN EQ 0;

APP QUERY '&APPNAME' HOLD
-RUN

?FF FOCAPPQ
-RUN

DEFINE FILE FOCAPPQ
FILENAME1/A70 = LOCASE(70, FILENAME, 'A70');
END
-RUN

TABLE FILE FOCAPPQ
PRINT *
WHERE FILENAME1 EQ '&PROGRAM1...fex';
ON TABLE HOLD
END
-RUN

-IF &LINES GT 0 GOTO EXIT_LOOP1;

-READ FOCAPPL NOCLOSE &ADATE.A10. &ATIME.A8. &APPNAME.A45.

-END_LOOP1
-EXIT_LOOP1

-SET &PROGRAM_LOC = &APPROOT || &DIRSEP || &APPNAME || &DIRSEP || &PROGRAM1 || '.fex';

-TYPE PROGRAM LOCATION: &PROGRAM_LOC



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
August 09, 2007, 02:39 PM
Alan B
Francis,

Ridiculous though this seems, it is also the only way I could think of to do this. I do something similar, for a different reason. It would be nice if there could be a &FOCFEXPATH type variable for self service apps.


Alan.
WF 7.705/8.007
August 09, 2007, 05:53 PM
Francis Mariani
Take a look at Master File Descriptions

The answer is in there!

Here's how to use what we've learnt:

-SET &ECHO=ALL;

-DEFAULT &PROGRAM1 = 'NCRR004';

-SET &PROGRAM1 = LOCASE(&PROGRAM1.LENGTH, &PROGRAM1, 'A&PROGRAM1.LENGTH');

SQL FMI SET SYSFILES FOCEXEC
-RUN

DEFINE FILE SYSFILES
FILENAME1/A64 = LOCASE(64, FILENAME, 'A64');
END
-RUN

TABLE FILE SYSFILES
PRINT
PHNAME
WHERE FILENAME1 EQ '&PROGRAM1';
ON TABLE HOLD AS H001 FORMAT ALPHA
END
-RUN

-READ H001 &PHNAME.A80.

-TYPE PROGRAM LOCATION: &PHNAME


Damn good news!


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
August 10, 2007, 01:00 AM
Alan B
Of course Francis, thank you. RTFM, works all the time!


Alan.
WF 7.705/8.007
August 10, 2007, 03:40 AM
FrankDutch
Alan

how about this amper value?

"&focfexurl"

"&fochtmlurl"

I never used them, but it might be something you can use..




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

August 10, 2007, 04:19 AM
Alan B
Not really Frank,

Maybe I am just awkward, but I have 3 main application directories:
all_trak
sky_trak
del_trak

sky_trak and del_trak contain similar programs, called in the same way, but with subtle differences. For example, each contains a POD program, with the same layout, different CSS files and accessing different data sources. With over 1500 programs, an error can happen!

all_trak is always in the path, when a user logs on I prepend either sky_trak or del_trak into the path. I know from WF_USER which they have, but I don't know, without looking, if the program they run is from all_trak or sky_trak/del_trak.

The url does not hold this info, as the path is searched.


Alan.
WF 7.705/8.007