Focal Point
[SOLVED] Display APP Path

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

January 04, 2010, 10:35 AM
fatboyjim
[SOLVED] Display APP Path
Hi,

I know that ? PATH displays the list, but it displays in the NO HTML OUTPUT page.

I would like to display the application paths list in a nice way (formatting, font, color, etc). I have tried to put a wrapper around it by putting it on the header and display a record in a table, but it does not work.

If anyone has any suggestions, it'll be great.
Thanks.

Best Regards,

Jimmy Pang

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


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
January 04, 2010, 11:45 AM
GinnyJakes
I had asked that question quite awhile back re having APP SHOWPATH be able to be stored in a file and was told that there were no plans to change it.

You could try pointing TERMINAL to a file.

If you just want the edasprof.prf path, I have code that parses the file and extracts the applications and writes them to a file. If you would be interested, I'd be happy to post. You could do the same with a user profile.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
January 04, 2010, 11:53 AM
fatboyjim
Hi Ginny,

If you can post your parse file code up that'll be great.
Thanks.

Best Regards,

Jimmy Pang


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
January 04, 2010, 12:24 PM
GinnyJakes
All of the APP PATH code is on a single line in the edasprof.prf file at our site. LINE200 is a generic master with one field in it with a length of A200. Make sure that there is only one space between the directory names.

This should get you started.
APP PREPENDPATH BIADMIN_CATALOG
FILEDEF LINE200 DISK /WebFOCUS/ibi/srv76/wfs/etc/edasprof.prf
? FILEDEF
TABLE FILE LINE200
PRINT *
IF LINE200 CONTAINS 'APP PATH'
ON TABLE HOLD
END
DEFINE FILE HOLD
APPPATH/A200=SUBSTR(200,LINE200,10,200,200,'A200');
END
TABLE FILE HOLD
PRINT APPPATH
ON TABLE SAVE
END
-RUN
-READ SAVE &APPPATH.A200.
-SET &ENDIT=POSIT(&APPPATH,200,'  ',2,'I3');
-SET &I=1;
-SET &LOC=0;
-APPLOOP
-IF &LOC GE &ENDIT GOTO ENDAPPLOOP;
-SET &APPNAME.&I=GETTOK(&APPPATH,200,&I,' ',70,'A70');
-SET &ENDDIR=POSIT(&APPNAME.&I,200,'  ',2,'I3');
-SET &LOC=&LOC + &ENDDIR;
-SET &I=&I+1;
-GOTO APPLOOP
-ENDAPPLOOP
-SET &LIM=&I-1;
CREATE FILE WFAPPPATH
MODIFY FILE WFAPPPATH
FIXFORM APPPATH/A70
DATA
-REPEAT ENDDATA FOR &I FROM 1 TO &LIM STEP 1
&APPNAME.&I
-ENDDATA
END
TABLE FILE WFAPPPATH
PRINT *
END



Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
January 04, 2010, 03:43 PM
fatboyjim
Thanks Ginny, but can you provide the master file that you used as well?

Best Regards,

Jimmy Pang


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
January 04, 2010, 03:44 PM
Waz
You could try this technique.

http://forums.informationbuild...991040903#7981054062

It uses trace to capture the output, then it can be used as a data source and report on it.


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 04, 2010, 04:13 PM
GinnyJakes
quote:
LINE200 is a generic master with one field in it with a length of A200.

You should be able to do this yourself. The master only has 3 lines in it. Give it a shot.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
January 05, 2010, 09:13 AM
fatboyjim
Hi Ginny,

I created a masterfile with as follows:
  
FILENAME=LINE200  , SUFFIX=FIX     , $
  SEGMENT=LINE200, SEGTYPE=S1, $
FIELDNAME=LN, ALIAS=LN, USAGE=A200, ACTUAL=A200, $


It gave me error as follows
(FOC003) THE FIELDNAME IS NOT RECOGNIZED: LINE200
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT

I was running this part of the code:
  
APP PREPENDPATH BIADMIN_CATALOG
FILEDEF LINE200 DISK /WebFOCUS/ibi/srv76/wfs/etc/edasprof.prf
? FILEDEF
TABLE FILE LINE200
PRINT *
IF LINE200 CONTAINS 'APP PATH'
ON TABLE HOLD
END


Best Regards,

Jimmy Pang


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
January 05, 2010, 09:17 AM
fatboyjim
quote:
Originally posted by Waz:
You could try this technique.

http://forums.informationbuild...991040903#7981054062

It uses trace to capture the output, then it can be used as a data source and report on it.


Hi Waz,

I tried the following sample and it works great!
I have modified it as follows:
Changed to ? Path to extract the app paths, remove leading and trailing spaces, and extract all the entries that starts with the drive (eg. C:\).
  
SET TRACEOFF = ALL
SET TRACEON = ALL
SET TRACESTAMP=OFF
SET TRACEUSER=&TRACEFILE
-RUN
-* get the app path
? PATH
SET TRACEOFF = ALL
-RUN
FILEDEF MASTER DISK trace.mas
FILEDEF TRACE DISK trace.trc
-RUN
-WRITE MASTER FILENAME=TRACE, SUFFIX=FIX
-WRITE MASTER SEGNAME=TRACE
-WRITE MASTER FIELDNAME=LINE, FORMAT=A200, ACTUAL=A200, $
-RUN
DEFINE FILE TRACE
RESULT/A155 = SUBSTR(200,LINE,45,200,155,RESULT);
-*Trim leading and trailing spaces
TRIMRESULT/A155 = TRIM('B',RESULT,155,' ',1,TRIMRESULT);
AMPER/A1 = EDIT(TRIMRESULT,'9');
END
TABLE FILE TRACE
PRINT RESULT
-* My server drive is D:\
IF AMPER EQ 'D'
END


Thanks for your help.
I will mark this one as solved.

Best Regards,

Jimmy Pang


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
January 05, 2010, 09:28 AM
GinnyJakes
quote:
FIELDNAME=LN, ALIAS=LN, USAGE=A200, ACTUAL=A200, $

Even though this is solved, the reason yours didn't work is because my master has the fieldname of LINE200 and you have LN. You would have had to change the code to use LN instead.

Also, application path directories and filedef options would have to be changed to match your environment, not mine.

But I'm glad you got something working.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
January 05, 2010, 09:51 AM
fatboyjim
Thanks Ginny for your help as well, much appreciated.

Best Regards,

Jimmy Pang


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV