When a client connects to a server it:
Determines the name of the server either programmatically or by referring to the DSQUERY environment variable. If the application user has not set DSQUERY, the runtime value for the server name defaults to the SYBASE environment variable.
Looks in directory services for an entry whose name matches the name of the server.
Uses the network information provided by the directory services entry to connect to the server. If the client cannot connect the first time, it makes additional attempts according to the delay and retry numbers indicated in directory services. If no matching entry is found, an error message is written to the client’s standard error file. If multiple networks are supported, the client attempts to connect using the information in the second network address entry for the server.
The Open Client documentation discusses client connections in much greater detail. See the Open/Client Programmer’s Supplement for your client platform or the appropriate Open/Client documentation.