Focal Point
Programatic means of obtaining Adapter and Connection List

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

August 30, 2007, 01:11 PM
hammo1j
Programatic means of obtaining Adapter and Connection List
Does anyone know if there is a way of programatically obtaining the Adapters and Connections that have been set up in EDASPROF.PRF?

It would be similar to these features.

1. APP QUERY appname HOLD allows you to list files in application
2. SYSTABLE allows you to list masters in your APP PATH.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
August 30, 2007, 02:16 PM
FrankDutch
The EDASPROF.PRF is as far as I know in fact a flat file, maybe you can read it with a master file description and interpret the values.




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 31, 2007, 09:39 AM
cburtt
The 'edasprof.cfg' file is indeed a simple flat *.txt-like file. I've maintained them for years with NotePad and other text editor apps.
Find the full path to yours, FILEDEF it to your *.fex, and TABLE FILE it with a synonym or simply READ it line by line searching for what you want.


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.
September 04, 2007, 09:14 AM
AlexU
I did this for a client. Master and fex below. You just need to adjust the path in the FILEDEF to reflect yours.

MFD:
FILE=ADAPT ,SUFFIX=FIX,$
SEGNAME=ADAPTERS,SEGTYPE=S0,$
FIELDNAME=RECVAL ,ALIAS=RECVAL ,USAGE=A6 ,ACTUAL=A6 ,$
FIELDNAME=FILLER01 ,ALIAS=FILLER01 ,USAGE=A200 ,ACTUAL=A200 ,$

FEX:

FILEDEF ADAPT DISK E:\ibi\srv76\wfs\etc\edasprof.prf
DEFINE FILE ADAPT
CONNECT_STRING/A210 = RECVAL || (' ' | FILLER01);
END
TABLE FILE ADAPT
PRINT
CONNECT_STRING AS 'Adapter'
WHERE RECVAL EQ 'ENGINE'
END


WF 7703M, XP/Win7, MRE, RC, BID, PMF, HTML, PDF, Excel 2000/7/10
September 06, 2007, 04:14 AM
hammo1j
Thanks AlexU - a nice solution.

Ironically I have found out that's exactly what IB do themselves because if you comment a connection in EDASPROF it will appear in the SERVER console as a connection!

John



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo