8 Scripting Examples

Some complete examples which illustrate the use of catremote in scripts are available. They are written in the tcl scripting language3 and on Starlink systems are in directory:

  /star/share/cursa

The scripts provided are:

listavaildb.tcl
list the databases currently available,
querycat.tcl
query a remote catalogue,
resolvename.tcl
find the coordinates of a named object.

On Starlink systems the scripts should simply run without requiring any modifications. On non-Starlink systems you may need to edit them to change the specified location of both the tcl interpreter and the catremote utility. In all cases the former is the first line of the script and the latter the first executable line after the introductory comments. Sufficient comments should be included to document the use of catremote in each script.

The utility findcoords (see SUN/240[5]) is a simple wrap-around for the name-resolver function of catremote. It can serve as an example of invoking catremote from a Perl script. On Starlink systems the source is available in file:

  /star/bin/findcoords

3Tcl is described by its author, John Ousterhout, in his Tcl and the Tk Toolkit[6]; see also SUN/200[2].