August 30, 2007, 01:11 PM
hammo1jProgramatic 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.
August 30, 2007, 02:16 PM
FrankDutchThe 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.
August 31, 2007, 09:39 AM
cburttThe '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.
September 04, 2007, 09:14 AM
AlexUI 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
September 06, 2007, 04:14 AM
hammo1jThanks 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