Hi All, I'm trying to extract data from multiple Sybase databases (ASA 9) from over 2000 machines (each machine could have multiple dbs) to be imported into one central db and get rid of individual dbs. I'm using simple unload commands to csv files.

To identify whose data is being extracted/imported I need to append the database name or the DSN to the filenames (each db on each machine has a different DSN) or get the folder in which the DB file is located (each db on each machine is in a folder with the same name as the DB file).

Anyway to do this via a variable that can be called in a script ?
I'm not a big dba .. but a small sybase user.

Any help will be much appreciated.

Thanks !
Bindhi.