Using isql from a command line

NoteIf you are using isql on the same machine on which you installed DirectConnect for z/OS Option, you must add a access service entry to the interfaces (for UNIX) or sql.ini (for Windows) file that points to the access service you are testing.

StepsTo verify the access service configuration using isql

  1. Do one of the following:

    • On the UNIX client machine, use dsedit to create an interfaces file entry for the access service.

    • On the Windows client machine, use dsedit to create a sql.ini file entry for the access service.

    Be sure to enter the access service name exactly as you defined it in the configuration file.

  2. Set the environment variables from a command line prompt by running one of the following environment scripts, as appropriate for your platform:

    • For UNIX:

      DC_SYBASE.csh or DC_SYBASE.sh
      
    • For Windows:

      DC_SYBASE.bat
      
  3. For UNIX and Windows, run isql from the command line by entering:

    isql -SServiceName -Uuserid -Ppassword
    

    where:

    • ServiceName is the name of the access service exactly as you defined it in the interfaces or sql.ini file.

    • userid is a valid user ID for the target database.

    • password is a valid password for the user ID in the target database.

    If the connection is successful, a 1> prompt appears.

    NoteIf you cannot connect, the access service might not be running. Start the access service with DirectConnect Manager, edit the configuration file, and then verify that the Enable at Startup parameter is set to Yes. This starts the access service automatically when the server is started.

  4. At the 1> prompt, query a table in the target database by entering a select statement and pressing Return.

  5. At the 2> prompt, enter:

    go
    

    Press Return.

    The query should run and return a result set, followed by a >1 prompt.

  6. To exit isql, enter the following at the 1> prompt:

    exit
    

    Press Return.

A regular operating system command appears.

NoteAt this point, you can stop the DirectConnect server using the stopsvr utility, which shuts down the server and terminates all client connections. However, if you plan to perform post-installation tasks for the client and server, leave DirectConnect up and running.