%\documentstyle[12pt]{article}
\documentstyle[11pt]{article}
\pagestyle{empty}
%\setlength{\topmargin}{-18mm}
\setlength{\topmargin}{-24mm}
\setlength{\textheight}{255mm}
\setlength{\textwidth}{168mm}
\setlength{\oddsidemargin}{-5mm}
\setlength{\evensidemargin}{-5mm}
\setlength{\parindent}{0mm}
\begin{document}
\def\egs{{\it e.g.}}
\def\egl{{\it e.g.\/}}
\newcommand{\us}{\_\,}
\newcommand{\wildcard}{\mbox{$*$}}
\newcommand{\eg}{{\it e.g.}\ }
\newcommand{\ie}{{\it i.e.}\ }
\newcommand{\etc}{{\it etc.}\ }
\newcommand{\ies}{{\it i.e.}}
\newcommand{\iel}{{\it i.e.\/}}
\newcommand{\hms}{{\tt h\,m\,s}}
\newcommand{\dms}{{$^{\circ}$\,{\tt '}\,{\tt "}}}
\newcommand{\degree}{{^{\circ}}}
\newcommand{\AAA}{{\AA}\ }
\newcommand{\ml}{{$\times$}}
\newcommand{\sh}{{\ \hspace{0.7cm}\ }}
\include{frontpage}
\pagestyle{plain}
%\parskip 0.3cm
\parindent 0pt
%\include{part1}
%\include{part2}
%\include{part3}
%\end{document}

\parskip 0.3cm
\baselineskip 12mm
\title{ {\tt User Manual - No. {\rm XXVI} }
%\vspace{2.0cm} 
\\
{\bf La Palma Archive User Manual} }

\author{E.J. Zuiderwijk \\
Royal Greenwich Observatory, Cambridge \\
 \& \\ Kapteyn Laboratory, Groningen\\ and \\
Ernst Raimond and Ger van Diepen\\
Netherlands Foundation for Research in Astronomy}

%\date {17 May 1994}
%\today
\maketitle
\baselineskip 12pt

\setcounter{page}{1}
\normalsize

\section{INTRODUCTION}

\subsection{About the La Palma Observations Archive}

Observations collected with telescopes of the Isaac Newton Group (ING) at the
Observatorio del Roque de los Muchachos on the Spanish island of La Palma,
are archived at the Royal Greenwich Observatory, Cambridge, England.
The Group consists of the 1.0-m Jacobus Kapteyn Telecope (JKT),
the 2.5-m Isaac Newton Telescope (INT), and the 4.2-m William Herschel 
Telescope (WHT). These telescopes are operated by the Royal Greenwich
Observatory on behalf of the UK Particle Physics and Astronomy Research Council
(PPARC) and the Nederlandse organisatie voor Wetenschappelijk Onderzoek (NWO).

The La Palma Data Archive is part of the Dutch contribution to the joint
operation of the ING telescopes. It consists of a comprehensive set of
computer programmes which enable efficient storage, housekeeping and management
of the collected observations. A detailed description of the archive operation 
is given by Zuiderwijk et al. (1994, PASP, {\bf 106}, 515).

A catalogue of archived observations is kept on-line on a VAX computer
at RGO (node GXVG). It contains several $10^5$ entries, and holds information
about the instrument, detector(s), telescope, \etc at the time the data was 
obtained. 
The catalogue can be searched by means of an
elaborate and versatile piece of query software. An archive user wanting
to retrieve data can compose a table of observations of interest, and send it as
a request for data to the archive manager for granting, 
processing and subsequent release. There is, however, a
proprietary period of one year (from the date of observation), during which data
can only be released with explicit consent of the original owner, \ie the
principal investigator on the PATT or CAT proposal under which the observations
were obtained. After the one year period the data are in the free domain.

Data are released on magnetic tape in FITS format, and can be read by a standard
FITS reader. However, early INT and JKT data headers may contain some additional
unusual FITS descriptors for part of the (\eg instrument-specific) information;
if such information has to be accessed by data-reduction software, the usage of
an extended FITS reading programme (`INGFITS', which runs in the FIGARO data
reduction software environment) may be usefull. Usually, however, a standard
FITS reader will do.

A recipient of data from the archive is asked to acknowledge the archive in
(possible) ensueing publication(s), and further may consider to send us an empty
tape in return. We would appreciate receiving preprints or reprints of
publications which contain La Palma Archive data.

\subsection{About this manual}

This manual replaces the earlier edition of the archive PRIMER (La Palma
Technical Note No.~69), and {\it partly} superseeds the archive User's
Guide (ING User Manual No. {\rm XIX}). The emphasis of this user manual is
completely and exclusively on queries of the observations catalogue both
{\it on-line}, via a captive account at RGO, or {\it off-line}, via the
archive mailserver. Additional functions of the query software, such
as queries of the archive index and other modes of access, are outside the 
of this manual scope, and are {\it not} 
included here; they are described in the already mentioned earlier ING 
User Manual No. {\rm XIX} (see also page~\ref{remote}).

This User Manual is devided into three parts. Part~{\rm I}, 
sections~\ref{seccatc} to~\ref{secedit}, gives an
astronomical description of the archive contents. 
%
Part~{\rm II}, sections~\ref{secprimer} to~\ref{secserver},
has the character of a `Primer' with a general introduction to the query
software, and describes how to {\it on-line} query the archive catalogue via 
the captive account and the usage of the archive mailserver.
%
Part~{\rm III}, section~\ref{seccqs} to~\ref{tables},
deals with the command language employed by the query software, and includes a
detailed description of individual commands and qualifiers.

\clearpage
\setcounter{part}{0}
\part{Astronomical Overview}

\section{Catalogue contents} \label{seccatc}

The La Palma Archive contains observations collected with the JKT and the INT
since medio 1986; observations obtained with the WHT are routinely archived 
since 1991. 
Table~\ref{tbl1} summarizes the more important items in the catalogue.
The archive contains the raw data taken at the telescopes. Therefore, a 
substantial fraction (about one quarter) of the catalogue entries relate to 
calibration exposures; a further ten percent of observations are of astronomical
standards.

\begin{table}[ht]
\begin{center}
\caption{Contents of the Master Catalogue} \label{tbl1}
\vspace{4mm}

\begin{tabular}{llc}  \hline 
Catalogue Item & Details & Notes \\ \hline
Telescope Coordinates        & RA, Dec in J2000 coordinates   & \\
Object Name (`Title')        & 24 ASCII characters            & \\ 
Observation Type             & 1-byte integer number [1,255]  & 1 \\
Object Type                  & up to 4 1-byte integers [1,255]& 1 \\
Telescope                    & {\it e.g.\/} INT, JKT, WHT    \\
Instrument                   & {\it e.g.\/} IDS, PFCU, ISIS   & 2 \\
Detector name                & {\it e.g.\/} CCD, IPCS, RCA, EEV3 & 3 \\
Date and Time of Observation & UT date and UT & \\
Exposure time                & Seconds        & \\
Waveband information         & {\it e.g.\/} U, V, O5007, H6607 & 2 \\
Polarisation                 & {\it e.g.\/} Calcite, Polaroid  & 2 \\
Sky quality, Seeing codes    & added afterwards & 4 \\
Observer identification      & up to 4 characters (`initials')& \\
Observing proposal reference & character string & \\
Proprietary Period           & default 365 days & \\
Pointers to archive tapes    & \\ \hline 
\end{tabular}
\vspace{0.2cm}

\footnotesize
\begin{tabular}{lclc}
{\bf Notes}: &1& See section~\ref{seccode} &\ \hspace{8.0cm}\  \\
             &2& See section~\ref{secinst} & \\
             &3& See section~\ref{secdets} & \\
             &4& See section~\ref{secedit} & \\
\end{tabular}
\normalsize
\end{center}
\end{table}

%\normalsize

A complete list of catalogue items and derived information, and of
the keywords under which that information can be accessed, is given
furtheron (see section~\ref{SEL} and Table~\ref{tbla1}).

\section{Instruments} \label{secinst}

Table~\ref{tbl2} shows the common-user instrumentation for which observations
are archived.
A detailed description of ING instrumentation is outside the scope of this
manual. For full documentation about individual instruments the reader is
referred to the Observers Guide and the various Instrument Manuals. However,
some knowledge about the instrumentation may be of help to an archive user
not familiar with the observatory itself. Therefore, some characteristics
of individual instruments will be given here.

\begin{table}[h,b,t]
\small
\begin{center}
\caption{ING instruments with archived data}
\label{tbl2}
\vspace{4mm}

\begin{tabular}{cclll}  \hline 
Telescope& Focus & Instrument & Description & Detector(s)\\ \hline
JKT &Cassegrain & FWHL & Direct Imaging, no camera optics & CCD\\
    &Cassegrain & QUBES & Belfast Echelle Spectrograph & CCD\\
    &Cassegrain & RBS  & Richardson-Brealey Spectrograph & CCD\\
INT &Cassegrain & IDS  & Intermediate Dispersion Spectrograph & CCD, IPCS\\
    &Cassegrain & FOS-I  & Faint Object Spectrograph & CCD \\
    &Prime      & PFCU & Imaging Camera (Prime Focus Cone Unit) & CCD\\
    &Cassegrain & MES  & Manchester Echelle Spectrograph & CCD, IPCS\\
    &Cassegrain & QUBES& Belfast Echelle Spectrograph & CCD\\
WHT &Cassegrain & ISIS & Intermediate-dispersion double Spectrograph&CCD, IPCS\\
    &Cassegrain & FOS-II & Faint Object Spectrograph & CCD\\
    &Nasmyth    & UES  & Utrecht Echelle Spectrograph & CCD, IPCS\\ 
    &Cassegrain & TAURUS & Fabry-Perot Imaging System & IPCS, CCD\\
    &Cassegrain & APORT& Auxilliary Cassegrain Imaging Port & CCD\\ 
    &Cassegrain & LDSS & Low Dispersion Survey Spectrograph & CCD\\ 
    &Prime      & PRIME& Prime Focus Imaging Camera & CCD\\
\hline 
\end{tabular}
\end{center}
\normalsize
\end{table}

\subsection{Imaging instruments}

imaging instruments JKT, INT, WHT \\ filters and sets \\scales for various CCDs
\\ operational constraints.

{\em TO BE COMPLETED}

\subsection{Spectrographs}

\begin{itemize}
\item The Faint Object Spectrographs (FOS, on INT and WHT)

The FOSs are fixed-format low-dispersion spectrographs of special design
matched to the optical characteristics of the telescope in order to optimize
throughput. The spectrum covers the whole wavelength range from 3500\AAA up to
10500\AAA. There are two spectral orders, both slightly curved, which requires
precise treatment during data reduction. A set of special atmospheric standards
is usually required to (flux) calibrate the red part of the spectrum. Data
reduction is best done by using the Durham FOS software package, but reduction
can be done using standard IRAF functions.

\item The Intermediate Dispersion Spectrograph (IDS, on INT)

This spectrograph comes with a set of 15 different gratings, which cater for
low dispersion spectroscopy at 16\AAA resolution all the way up to `high'
dispersion spectroscopy at 0.3\AAA resolution, and corresponding spectral
coverage. There are two cameras, on a short focus and a long focus arm, each
with its own detector mounted (CCD or, previous to 1992, IPCS);
it is possible to switch from one arm to the other during an observing night,
but both arms cannot be used simultaneously. Data reduction for CCD 
observations is standard; long-slit observations taken with the IPCS may 
require an advanced two-dimensional package (see section~\ref{secdets}).
On rare occasions the IDS has been used in a cross-dispersed mode.

\item The ISIS double spectrograph (on WHT)

This is an intermediate dispersion spectrograph with two independent cameras,
one on the blue and one on the red arm. Both cameras can be used simultaneously,
thus one may find in the archive sets of two ISIS observations taken at the 
same time. The blue arm can be equiped with either a blue-sensitive CCD or the
IPCS, the red arm always carries a CCD detector. Sometimes only one camera is
used. A range of gratings is available to allow spectroscopy from low to high
resolution. ISIS can also be used in spectropolarimetrical mode, for which 
purpose
active optical elements can be inserted into the lightpath. The polarization
information is available in the archive catalogue.

\item The Utrecht Echelle Spectrograph (UES).

A very stable high-dispersion echelle spectrograph resident on the Nasmyth
platform of the WHT. UES requires a large detector (1000$\times$1000 CCD) in
order to have a large spectral coverage. UES has also been used with the WHT
IPCS detector on very faint objects. UES data can be reduced routinely with
the IRAF or FIGARO/ERIS software packages.

\item The Richardson-Brealey Spectrograph (RBS on JKT).

A very stable, off-axis spectrograph at the JKT Cassegrain focus, for low 
and intermediate dispersion (resolution 1\AAA to 10\AAA) spectroscopy. The
grating setting on this instrument is not under computer control, and done
manually.

\item QUBES and MES.
{\em TO BE COMPLETED}
\end{itemize}

\subsection{Special Instruments}

\begin{itemize}
\item TAURUS

A two-dimensional imaging spectrograph. This instrument can be used in etalon
mode, where a series of exposures is taken through a sequence of narrow-band
Fabry-Perot etalon settings. The data are three dimensional, and difficult to 
reduce. There is a reduction package available at RGO and at Roden 
(The Netherlands).

Alternatively, TAURUS can be used as imaging instrument, using a filter instead
of the etalon.

\item The Low Dispersion Survey Spectrograph
{\em TO BE COMPLETED}

\end{itemize}

\section{Detectors}\label{secdets}

There are two types of detectors in use at ING instruments: the Imaging Photon
Counting System (IPCS) and the Charge Coupled Device (CCD). The catalogue also
contains a small number of observations recorded on photographic plate, but in
those cases the catalogue only serves as observing log, and the data cannot
be retrieved in a standard way; these observations are flagged (see 
section~\ref{seccode}) and are best ignored when searching the archive.

\subsection{The IPCS detectors.} 
The IPCS detector is based on the principle of event centering: Incoming
photons on the light-sensitive target are amplified by an image-tube
intensifier; the light flashes at the output window are registered by
a Vidicon or CCD detector. That signal is analyzed by hard-wired logic to
determine the positions of individual photon events. The sensitivity of the
IPCS is determined by the characteristics of the Image Tube phosphorus.
The IPCS is sensitive up to about 7000\AA, with an overall Quantum Efficiency
of about 20\%. In practice the IPCS is only used for observations where the
signal-to-noise is limited by the detector, \ie high dispersion spectroscopy
on faint objects (in dark time).

A first-generation IPCS has been in use at the IDS spectrograph (INT) until
about 1992. This detector made use of a Vidicon tube for event detection,
and therefore required elaborate set-up procedures for alignment and minimizing
of image distortion. Image size is maximum 2048$\times$256 pixels, but for
spectroscopic use a format of 2048$\times$32 is more typical. Pixel size
is usually 15$\mu$ in the dispersion direction.
Calibration of this detector can be cumbersome and, in
particular for longslit spectroscopy, special calibration exposures are
needed. These calibration are marked in the catalogue with special codes.


A second-generation IPCS with CCD readout has been in use at the WHT instruments
(ISIS and UES) since 1991. Maximum format is about 2400$\times$3200; pixel size
12$\mu$.

\subsection{The CCD detectors}
Over the years a plethora of CCD detectors have been in use at practically
all ING instruments. A listing of past and current detectors was kindly provided
by Dr. P. Jordan of RGO and is given in Table~\ref{ccds} at the end of this
Part I. This table is also
included in the on-line help facilty of the archive and will be kept up-to-date.

CCD detectors in the catalogue are described either by `CCD' (on JKT and INT)
or by the camera name, \eg EEV3, (on WHT). It is intended that the camera name
will be shown throughout, and we are in the process of amending the catalogue 
accordingly (see section~\ref{secedit}).

\section{Astronomical codes}\label{seccode}

The observations catalogue contains two coded items which may be called
`astronomical codes': the `observation type' and the `object type'.

\subsection{Observation-type code}

The Observation Type is a integer number encoding the kind of 
observation, and serves to distinguish between calibration and science 
exposures. The archive recognizes roughly 7 different types of observations;
a summary is shown in table~\ref{tblobstype}. The complete list of current
observation types in use can be obtained by using the SHOW command of the
query software (section~\ref{SHO}).

\begin{table}[h]
\centering
\caption{Observation-type codes (summary)} \label{tblobstype}
\vspace{0.3cm}
\begin{tabular}{|c|l|} \hline
 Type & Description \\ \hline
    0 & (still) Undefined \\
1 $-$ 7 & Science observations \\
8, 9    & Corrupted and Test data \\
10 $-$ 19 & Astronomical (\eg flux) Standards \\
20 $-$ 29 & Detector characteristics (BIAS, DARK, \etc) \\
30 $-$ 39 & Flatfield exposures of one kind or another \\
40 $-$ 49 & Arc exposures \\
$\ge$ 50 & Special calibrations \\ \hline
\end{tabular}
\end{table}

Occasionally, a new entry may be added to the list (for which there is 
ample possibility), for instance if a new instrument uses a specific kind
of calibration exposure. The query software supports a function to search
calibrations for a given selection of observations (CALSELECT, see 
section~\ref{CAL}), which makes use of the observation-type code.

\subsection{Object-type code}

There are up to four integer-number Object Types associated with each
observation, which encode a brief astronomical description of
the data. At the moment we have identified some 150 astronomical categories
which allow for both a very general typing ({\it e.g.\/} `galaxy') 
or a more detailed ({\it e.g.\/} Seyfert~{\rm I}) description. 

Data can be selected on object type(s), and all catalogue entries with any of 
the (up to) 4 types matching the specification will be found. However, the
object-type codes are put into the data base by the archive manager. Given
the plethora of different objects in the catalogue (there are over 10000),
this is a very substantial task, requiring much effort and time.
Consequently, there will always be a substantial number of observations, which
which have not yet been typed. Thus, searching the catalogue on object type
may not reveal all observations of a given object.

Table~\ref{tblobjtype} lists some examples of object type codes; 
an archive user can obtain a complete list by using the SHOW command of the
query software (section~\ref{SHO}).

\begin{table}[h]
\centering
\caption{Sample of object types used in the La Palma Archive} \label{tblobjtype}
%\scriptsize
\footnotesize
\begin{tabular}{|lcc|lcc|} \hline  
Category & & code & Category & & code \\ \hline
        unknown                                    & = &1    & 
        Protostar/Protostellar Cloud               & = &90   \\
        Star(-like object) of unknown type         & = &2    & 
        T Tauri star                               & = &91   \\
        Non-stellar object of unknown type         & = &3    & 
        Cocoon star                                & = &92   \\
        terrestrial                                & = &9    & 
        Herbig-Haro object                         & = &93   \\
 & &  &         {\it etc.\/} & &  \\
        Solar System                               & = &10   &  & &  \\
        Sun                                        & = &11   & 
        Nebula                                     & = &100  \\
        Moon                                       & = &12   & 
        H-II region                                & = &101  \\
        Planet                                     & = &13   & 
        Compact H-II region                        & = &102  \\
        {\it etc.\/} & & & 
        Supernova Remnant                          & = &103  \\
 & &  &         {\it etc.\/} & &  \\
        Early Type Star (A9 or earlier)            & = &20   &  & &  \\
        O type                                     & = &21   & 
        Galactic Centre                            & = &110  \\
        Wolf-Rayet (spectrum) star                 & = &22   & 
        Halo object                                & = &111  \\
        Helium (spectrum) star                     & = &23   & 
        population II object                       & = &112  \\
        {\it etc.\/} & & & 
        Galactic non-stellar                       & = &113  \\
 & & &         {\it etc.\/} & &  \\
        Late Type Star (F0 or later)               & = &30   &  & & \\
        F type                                     & = &31   & 
        Galaxy (incl. anonymous)                   & = &120  \\
        G type                                     & = &32   & 
        Elliptical                                 & = &121  \\
        K type                                     & = &33   & 
        cD (giant elliptical)                      & = &122  \\
        {\it etc.\/} & & & 
        Lenticular (S0) Galaxy                     & = &123  \\
 & & &         {\it etc.\/} & &  \\
        main-sequence star                         & = &40   & & &  \\
        giant or sub-giant                         & = &41   & 
        Active Galaxy                              & = &130  \\
        supergiant                                 & = &42   & 
        Emission-line Galaxy                       & = &131  \\
        subdwarf                                   & = &43   & 
        Seyfert I                                  & = &132  \\
        {\it etc.\/} & & & 
        Seyfert II                                 & = &133  \\
 & & &         {\it etc.\/} & &  \\
        Variable star                              & = &50   & & &  \\
        Long period (semi-regular) variable        & = &51   & 
        Extragalactic star-like object             & = &140  \\
        Irregular variable                         & = &52   & 
        BL Lac object                              & = &141  \\
        Mira type                                  & = &53   & 
        Blue star-like object                      & = &142  \\
        {\it etc.\/} & &  & 
        {\it etc.\/} & & \\
 & & &  & &  \\
        Eruptive variable                          & = &60   & 
        Quasar/QSO                                 & = &150  \\
        Supernova                                  & = &61   & 
        BAL QSO                                    & = &151  \\
        Supernova Type I                           & = &62   & 
        OVV quasar                                 & = &152  \\
        Supernova Type II                          & = &63   & 
        X-ray QSO                                  & = &153  \\
        {\it etc.\/} & &  &         {\it etc.\/} & & \\
 & & &  & &  \\
        Binary or Multiple star                    & = &70   & 
        (member of) (Pair or) Group of galaxies    & = &160  \\
        Eclipsing Binary                           & = &71   & 
        Abell Cluster                              & = &161  \\
        Spectroscopic Binary                       & = &72   & 
        Supercluster                               & = &162  \\
        Massive X-ray Binary                       & = &73   & 
        High-redshift (super)cluster               & = &163  \\
        {\it etc.\/} & &  &         {\it etc.\/} & &  \\
 & & &  & & \\
        (member of) Star Cluster                   & = &80   & 
        candidate identification of $\gamma$-ray source & = &170  \\
        Open Cluster                               & = &81   & 
        candidate identification of X-ray source & = &171  \\
        Galactic Globular Cluster                  & = &82   & 
        candidate identification of UV source & = &172 \\
        Globular Cluster in other galaxy           & = &83   & 
        candidate identification of IR source & = &173  \\
        {\it etc.\/} & & &         {\it etc.\/} & &  \\  \hline
\end{tabular}
\end{table}

\section{Catalogue Maintenance}\label{secedit}

The archive receives the observations as they are produced by the Data 
Acquisition System (DAS) of ING telescopes. Unfortunately, the desciption
of the data with the FITS headers has not always been completely reliable,
due to technical or operational difficulties encountered during an
observing session.
For instance, a failure of the computer link between the Telescope Control
System and the DAS at the time of observation will have resulted in
missing position information in the FITS descriptors, hence in the catalogue. 

Problems have occurred with the description of a whole range of catalogue items,
and a substantial number of observations may have one or more item undefined,
or sometimes even uncorrectly defined (\eg temporal information, instrument and 
filters names, \etc ).

The correction of such missing or erroneous information in the catalogue is an
on-going effort, and very time consuming. Archive users might, therefore,
take this health warning into account (and spare a thought for the archive 
manager), if they stumble upon missing information when searching through the 
catalogue.

{\em TO BE COMPLETED}

\newpage
% CCDs in use at ING
\begin{table}
\centering
\caption{ING CCD Summary Version 04/07/94} \label{ccds}
\vspace{0.3cm}
\small

\begin{tabular}{|lc|c|l|c|c|c|c|c|c|} \hline

%\multicolumn{2}{c}{CHIP~TYPE} & CAMERA & OPERATING & BIAS  & 
{CHIP~TYPE}& & CAMERA & OPERATING & BIAS  & 
   READ & 	GAIN  &   Max  &   FORMAT   & Notes \\
        & &  NAME  & \multicolumn{1}{c|}{DATES}  & LEVEL & 
 NOISE  & e/ADU & Counts & Pixel size &       \\
        & &        &           & (adu) &
(e$^-$) &           &  (adu) &  [micron]  &       \\ \hline

 RCA 501EX &t& RCA  & Jul~85 & 1300 & 60 & 3.8 & $>$65K & 320{\ml}512 & 1 \\
           & & (PF) & \sh Feb~87 &      &    &     &        & [30{\ml}30] &   \\
\hline
 RCA 501EX &t& RCA2 & Feb~87 & 300  & 60 & 3.8 & $>$65K &         & 2 \\
           & &[$*$] & \sh onward &      &    &     &        &         &   \\
\hline
 GEC P8603 & & FOS1 & May~85 &  150 & 7  & 1   &    27K & 385{\ml}578 & 3 \\
           & &(INT) & \sh May~88 &      &    &     &        & [22{\ml}22] &   \\
\hline
 GEC P8603 &c& FOS1 & May~88 & 150  & 8  & 1   & $>$65K &         & 4 \\
           & &      & \sh onward &      &    &     &        &         &   \\
\hline
 GEC P8603 & & GEC1 & Jun~84 & 140  & 5  & 0.8 & 40K    &         & 5 \\
           & &(IDS) & \sh Dec~86 &      & 12 pf &  &        &         &   \\
\hline
 GEC P8603 & & GEC1 & Feb~87 & 100  & 7  & 0.8 & $>$30K &         & 6 \\
           & &      & \sh Dec~87 &      &    &     &        &         &   \\
\hline
 GEC P8603 &c& GEC3 & Dec~87     & 100  & 7  & 1   & $>$65K &         & 7 \\
           & &[$*$] & \sh Apr~92 &      &    &     &        &         &   \\
\hline
 GEC P8603 & & GEC2 & Sep~85 & 100  & 6  & 1   & 30K    &         & 8 \\
           & & (JKT)& \sh Mar~86 &      &    &     &        &         &   \\
\hline
 GEC P8607 & & GEC2 & Jul~86 & 100  & 8  & 1.6 & 35K    & 385{\ml}578 & 9 \\
           & &      & \sh Nov~86 &      &    &     &        & [16{\ml}16] &   \\
\hline
 GEC P8603 & & GEC2 & Nov~86 & 150  & 9  & 2.2 & $>$65K & 385{\ml}578 & 10 \\
           & &      & \sh Jan~88 &      &    &     &        & [22{\ml}22] &   \\
\hline
 GEC P8603 &c& GEC4 & Jan~88 & 200  & 6.5& 1.1 & $>$65K &         & 11 \\
           & &[$*$] & \sh May~89 &      &    &     &        &         &    \\
\hline
 GEC P8603 &c& FOS2 & Aug~87 & 200  & 10 & 2   & 30K    &         & 12 \\  
           & &(WHT) & \sh May~89 &      &    &     &        &         &    \\
\hline
 GEC P8603 &c& GEC5 & Jul~88 & 150  & 9  & 1.1 & 40K    &         & 13 \\
           & &(WHT) & \sh onward &      &    &     &        &         &    \\
\hline
 GEC P8603 &c& GEC6 & May~89 & 200  & 8  & 1   & 60K    &         & 14 \\
           & &[$*$] & \sh May~92 &      &    &     &        &         &    \\
\hline
 GEC P8603 &c& FOS2 & May~89 & 200  & 9.5& 2.3 & $>$50K &         & 15 \\
           & &      & \sh onward &      &    &     &        &         &    \\
\hline
 EEV P88225& & EEV1 & Jul~89 & 2450 & 5  & 1.7 & 60K    &\ 770{\ml}1152  & 16 \\
           & &(ISIS)& \sh Dec~89 &      &    &     &        &[22.5{\ml}22.5]&    \\
\hline
 EEV 88231 & & EEV2 & Dec~89 & 2630 & 4  & 1.1 & 60K    &          & 20 \\
           & &[$*$] & \sh Jun~91 &      &    &     &        &          &    \\
\hline
 EEV 0530  &M& EEV3 & Apr~91 & 3850 & 3.5& 0.8 & 50K    &1242{\ml}1152 & 21 \\
           & &(ISIS)& \sh onward &      &    &     &       &[22.5{\ml}22.5]&    \\
\hline
 EEV 0520  &M& EEV4 & Jun~91    & 2700 & 4  &   1 & 50K  &\ 770{\ml}1152 & 22 \\
           & &[$*$] & \sh onward&      &    &     &      &[22.5{\ml}22.5]&    \\
\hline
 EEV 0530  &M& EEV5 & Oct~91 & 4100 & 4.5& 0.7 & $>$45K &1242{\ml}1152 & 23 \\
           & & (INT)& \sh onward &      &    &     &       &[22.5{\ml}22.5]&    \\
\hline
 EEV 0530  &M& EEV6 & Oct~91 & 3600 & 3.5 & 1.0& $>$50K &          & 24 \\
           & &(ISIS)& \sh onward &      &     &    &        &          &    \\
\hline
 Tek TK1024&t& TEK1 & Mar~92 & 450  &5/12 & 2.4& $>$60K & 1024{\ml}1024 & 25 \\
           & & (WHT)& \sh Oct~92 &      &     &    &        & [24{\ml}24]   &    \\
\hline
 Tek TK1024&t& TEK1 & Nov~92 & 2290 & 5   & 1.3& $>$60K & 1024{\ml}1024 & 25 \\
           & & (WHT)& \sh onward &      &     &    &        & [24{\ml}24]   &    \\
\hline
 EEV 05-30 &M& EEV7 & Apr~92 & 4300 & 4   &0.76& $>$60K & 1242{\ml}1152 & 26 \\
           & & (JKT)& \sh onward &      &     &    &        &[22.5{\ml}22.5]&    \\
\hline
 EEV 0206  &M& GEC7 & May~92 & 7600 & 8.5 & 1.4& $>$60K & 335{\ml}520   & 27 \\
           & & (INT)& \sh onward &      &     &    &        & [22{\ml}22]   &    \\
\hline
\end{tabular}
\end{table}

\clearpage
\newpage
\addtocounter{table}{-1}

\begin{table}
\centering
\caption{ING CCD Summary Version 04/07/94 continued}
\vspace{0.3cm} \small

\begin{tabular}{|lc|c|l|c|c|c|c|c|c|} \hline

CHIP~TYPE & & CAMERA & OPERATING & BIAS  & 
READ & GAIN &   Max  &   FORMAT   & Notes \\
        & &  NAME  & \multicolumn{1}{c|}{DATES} & LEVEL & 
 NOISE  & e/ADU & Counts & Pixel size &       \\
        & &        &           & (adu) &
(e$^-$) &           &  (adu) &  [micron]  &       \\ \hline

% EEV05-50 &M& EEV8  & yet to &      &   &   &       & 2186{\ml}1152   & 28 \\ 
%          &M& (UES) & come   &      &   &   &       & [22.5{\ml}22.5] &    \\ 
%\hline
GEC P8603 &c&GEC3.1 & May~92 & 100? & 7 & 1 & $>$65K & 385{\ml}578 & 29 \\
          & &       & \sh onward &      &   &   & 100Ke  & [22{\ml}22] &    \\
\hline
Tek TK1024 &t& TEK2 & Nov~93 & 1125 & 4.5 & 1.2 & $>$65K & 1024{\ml}1024 & 30 \\
           & & (WHT)& \sh onward &      &     &     & 120Ke  & [24{\ml}24]   &   \\
\hline
Tek TK1024 &t& TEK3 & May~94 & 800  & 4.5 & 0.7 & $>$65K & 1024{\ml}1024 & 33 \\
           & & (INT)& \sh onward &      &     &     & 120Ke  &  [24{\ml}24] &   \\
\hline
Tek TK1024 &t& TEK4 & Jul~94 & 500  & 4.7 & 0.8 & $>$65K & 1024{\ml}1024 & 34 \\
           &t& (JKT)& \sh onward &      &     &     &  120Ke &  [24{\ml}24]  &    \\
\hline
%Tek TK1024 &t& TEK5 & Sep~94 &       &    &     &        & 1024{\ml}1024 & 39 \\
%           &t& (WHT)& estimate &     &    &     &        &  [24{\ml}24]  &    \\
%\hline
\end{tabular}
\end{table}

{\bf General comments}:

\begin{itemize}
\item {\tt [*]} with camera name, indicates usage on several instruments.
\item {\tt "c"} with chip type, refers to a dye-coating to give enhanced 
      UV-response.
\item {\tt "M"} with chip type, refers to a `Metachrome' phosphor coating, 
      for UV response.
\item {\tt "t"} with chip type, refers to a thinned CCD, for enhanced peak/UV
      response.

\item Typical digitised areas exceed the size of the imaging area; \eg
      1124{\ml}1124 for TEK Cameras.

\item Read-noise is quoted at the STANDARD readout speed.

\item ADU = analogue-digital converter units. The e$^-$/ADU figures are 
      believed correct to about 10\% . The figure is given for the default 
      (standard) readout speed.

\item The maximum available digitised count is always 65535 ($2^{16}$). This is 
      a purely electronic limitation. In some cases measurements close to 
      this limit have not been made; these are often indicated by, \eg ,
      `$>$55K'. Usually the linearity limit is constrained by the ADC range 
       combined with the electronic gain of the system, rather than by a real 
      limitation of the CCD (which exceeds 100000 electrons in most 
      cases).

\item The GEC CCD was originally made by GEC-Hurst Research Centre; however 
      all devices are now made by EEV (Chelmsford, part of GEC group). We 
      have retained the original `GEC' camera names, for camera-heads 
      containing small CCDs (although they are now supplied by EEV; `GEC7' 
      is such an example).
\end{itemize}
%\vfill

%\newpage
{\bf Further notes with individual CCDs}:

\begin{enumerate}

\item [1] The original RCA chip; began to deteriorate early 1987.

\item [2] This is our last but one remaining RCA CCD.

\item [3] This chip suffered from poor charge transfer; it was replaced in May 1988.

\item [4] This is a high-quality coated-CCD. 

\item [5] Originally fitted to IDS Camera. A nominal preflash (pf) was routinely
     used. Chip electronics were reset in Oct/Nov 1984. From Oct 1986 
     chip performance was poor.

\item [6] No preflash required; un-coated chip. 

\item [7] This coated chip is was destroyed by preamp-OS s/c in April 92.

\item [8] A-grade chip originally fitted to this camera, replaced in March 1986.

\item [9] A 3/4 scale chip; temporary spare in JKT camera.

\item [10] A normal-sized chip; does not require preflash; replaced Jan 1988.

\item [11] For the first month of use the gain was 2.2e/ADU; later 1.1 e/ADU. 
      Developed a threshold fault in May 89.

\item [12] A standard ESO-coated EEV CCD; poor blue response. 

\item [13] A standard ESO-coated EEV CCD. 

\item [14] Dye-coated EEV CCD, with negligible preflash needed.
      Destroyed (by GEC3 P-A fault), in May92. 

\item [15] Dye-coated EEV CCD; no preflash used. This  
      chip has the normal coated UV/blue response. In July 89 switched to 
      operate with the new WHT Dwingeloo CCD controller. 
      High noise has been seen if FOS-body is not well earthed. 

\item [16] A large-format setup-grade CCD for ISIS; operates with the WHT 
      Dwingeloo CCD controller only; replaced in Dec  89.

\item [20] Super-grade, un-coated '88200' CCD. Gain adjusted to
       reduce e/ADU factor.

\item [21] Metachrome-coated, super-grade device; used on ISIS blue arm. 

\item [22] Coated, super-grade chip. 

\item [23] Large-format, coated, super-grade chip, used on INT/IDS.

\item [24] The default ISIS-red sensor. 

\item [25] This is a grade-1, thinned CCD. Used at first for LDSS, 
      but available for use at any WHT focus. At the observatory, it 
      exhibited higher noise (13e) than during tests at Cambridge (5e); 
      In Oct 92 it was returned to Cambridge, for examination. The problem 
      was traced to a noisy preamp. connection. The head was returned to 
      ING in Nov 92; the preamp-gain was increased (to give minimum noise, for  
      spectroscopic applications).

\item [26] This super-grade sensor is similar to the EEV5 one, and is now the 
      default on the JKT, where it has replaced the GEC head. 

\item [27] This is a GEC small-format sensor; it has been thinned and 
      Metachrome-coated. It has lower noise, but is less uniform than the 
      RCA2 head. For use on INT/JKT.

%\item [28] The grade-1, coated EEV chip for UES mainly. Not yet at  ING. 

\item [29] Replacement chip for GEC3; used on various instruments.

\item [30] Duplicate of TEK1, with a larger cryostat. 5 readout speeds now 
   introduced. Installed at WHT Prime Focus, but also for use on ISIS and UES.

\item [33] The new Tek head (for INT), which is mechanically similar 
      to TEK2 (larger 2.5l cryostat). Delivered to ING in May~94, with extra 
      readout modes and speeds. Simultaneous binning with window, and a 
      double-window mode.

%\item [34] This JKT Tek head is a duplicate of TEK3, with the same 
%      operating modes. Due to be delivered to ING in mid-July 1994.

%\item [35] A duplicate of the TEK1/2 heads, for use on WHT 
%      auxilary port mainly. Due Sept 1994.
\end{enumerate}

\clearpage
\setcounter{part}{1}
\part{The Captive Account and Mailserver} \label{secprimer}

\section{General aspects of archive queries}

An archive user has interactive access to the Observations Catalogue, but
access to the data only by request. The actual observations are stored 
off-line and have to be retrieved by the archive operators. A de-archiving
request is subject to authorization by the archive manager, in order to
safeguard (possible) proprietary rights of the original owner(s) of the data.

The program ARCQUERY allows the user to query the Observations Catalogue and to
select observations of interest in a `query table'. This software can be used 
interactively (on the captive account) or in batch mode (via the server). At
the end of a query session, the user may make a request for the selected 
observations to be de-archived. Such a request, however, can only be processed
if the user has provided address information: the archive (manager) requires
knowledge of who, and where, the user is. In particular, a user identifies
him or herself with up to 4 initials on login, and, preferably on first-time 
usage, may
provide additional information with the `address' facility. The database system
communicates with its users via electronic mail, and an E-mail address has 
therefore to be provided as part of the user identification.
Successful processing of a request includes the mailing of a dearchiving log to 
the user, and, of course, sending the data off on a FITS tape.

All files created during a query session are identified by the initials of the
user. At the end of a session the tables and listings created during that 
session (the `query context') may be saved for future use. At the beginning of
each query session the program checks whether there are any saved results from 
a previous session with the given user identification (initials) and, if found, 
offers the option to restore them. The query context is
updated after the execution of every command; recovery from accidental exit,
a system crash, or a similar disaster, is therefore straightforward.

At any level of the query process HELP information is available on line; the
simplest way of accessing HELP is by typing a question mark `{\tt ?}' at the
point where the user gets lost. A more complete description of this facility
is given in section~\ref{HEL}.

A full description of ARCQUERY command, command qualifiers, keywords and
keyword qualifiers is given in sections~\ref{DEF} to~\ref{EXI} of 
part~{\rm II} of this manual. The ARCQUERY command interpreter works with
a minimal matching method: commands, qualifiers and keywords alike may be
abbreviated to an unambiguous combination of the leading characters; upper
case or lower case may be used.

An archive user can define a set of user-specific defaults and symbols,
which can be modified at any time during the session either permanently or
temporarily. It is possible to do this in an initialization file, which will
be executed automatically when one starts ARCQUERY. 


\section{Access}

The Observations Catalogue and query software reside on a disk at the RGO
VAX node GXVG at Cambridge (UK). The software can be accessed both on-line,
via the captive account ARCQUERY, and off-line via the mailserver. The GXVG
node can be reached via INTERNET, SPAN, JANET and STARLINK (UK users).

In order to use the query software interactively, simply connect to GXVG, and
logon as username ARCQUERY; no password is required. Only
a limited number of commands of the query software can be executed from
this account. Table~\ref{access} shows GXVG's network identifications.

\begin{table}[th]
\centering
\caption{The GXVG node at RGO} \label{access} \vspace{0.3cm}

\begin{tabular}{|c|c|c|c|} \hline
 & & & \\
 INTERNET & SPAN & JANET & STARLINK\\
 & & & \\  \hline
 & & & \\
   131.111.69.20    & 63559 & UK.AC.RGO.SRF & GXVG \\
 GXVG.AST.CAM.AC.UK &  &  & \\ 
 & & & \\ \hline
\end{tabular}
\end{table}

If the connection to the given SPAN address does not succeed, then try to 
connect via the RLESIS server at the Rutherford Appleton Laboratory (Didcot,
Oxfordshire), as follows:

\begin{itemize}
\item Connect to RLESIS
\item Logon as username ESIS
\item (a menu appears) Select option 1
\item Choose Node GXVG
\item Logon as ARCQUERY
\end{itemize}


\section{The Captive Account ARCQUERY}

GXVG is a DEC~VAX
machine running under DCL. On the captive account, the user cannot execute 
any DCL commands; only the commands of the query software are available.
 However, several aspects of the archive software make use
of the DCL protocol; the HELP facility, for instance, is based on the VAX
HELP facility.

On entry, the user is prompted for a set of (up to 4) initials. This is an
important piece of information, and will be kept in the archive database.
Thus, a user may reflect a moment on the question before providing an answer.

After completion of the login procedure, a listing appears of 
available functions:

\begin{itemize}
\item {\bf ARCQUERY}:

      To enter the catalogue query software; the subject of the remaining 
      sections of this part~{\rm III}.
\item {\bf EXAMPLE{\us}QUERY}: 

      Shows an example of a simple archive query session; first-time
      users may browse through it to get an idea of the function of
      several arcquery commands.
\item {\bf ARCSHOW}: 

      Shows archive catalogues available. The one of interest here is
      OBSCAT{\us}LP. The other posibilities ARCINX{\us}LP and WSRTOLD relate to
      searches of the packet database, or remote access to the Westerbork
      Radio observations archive in Dwingeloo. Actually, with current fast
      network links, the WSRT archive can best be accessed by directly logging
      on to the ARCQUERY account at the Dwingeloo site 
      (Internet node `nfra.nl').
      Index searches and remote access to other catalogues are described in
      ING User Manual {\rm XIX}.
\item {\bf HELP, HELPQUERY, HELPCAT}

      On-line HELP information about ARCQUERY functions. This HELP facility
      can also be accessed from inside the ARCQUERY programme itself.
\item {\bf EDT{\us}INITFILE, TPU{\us}INITFILE}

      Edit an ARCQUERY initialization file via the EDT or TPU editor. Such an
      initialization file is executed on entry of the ARCQUERY programme, and
      can be used to define user-specific symbols and default settings, which
      are then automatically available at the beginning of each subsequent use
      of the query software.
\item {\bf CALCULATE}
      
       This programme enables the user to carry 
       out a large number of pocket-calculator like functions, including
       the conversion of units. It has its own help-facility.
\item {\bf EXIT, LOGOUT}

       To logout from the captive account, with control returned to the user's
       own site, or, if you entered via RLESIS (SPAN), to ESIS.
\end{itemize}


\section{Interactive use of ARCQUERY software}

\subsection{Starting ARCQUERY} \label{secstart}

The catalogue query software is started from the captive account by typing: 

{\tt ARCQ[UERY]}\ , or\ \ {\tt ARCQO}

On entry, the programme will perform the following checks:

\begin{itemize}
\item {\bf Identification check}: ARCQUERY will test whether address 
       information is known to the database for user initials as provided
       on login. If no information is found, a message is displayed to that
       effect. It is recommended to provide the information with the 
       ADDRESS function as a matter of priority when in business. See
       section~\ref{re:address}.

\item {\bf Restoration check}: Subsequently, ARCQUERY will test if a saved
      query context exists, left from an earlier query session by this user.
      If such a saved context is found, the user will be prompted for its
      restoration, or not.

\item {\bf Catalogue check}; Finally, but only after start-up with
      the {\tt ARCQ[UERY]} command, the user will be asked what archive
      has to be accessed. Just answer OBSCAT{\us}LP to this one.

      Start-up with {\tt ARCQO} implies accessing OBSCAT{\us}LP.
\end{itemize}


Once inside ARCQUERY the full arsenal of commands and other tools are at the
user's disposal. An extensive description of ARCQUERY commands, keywords and
qualifiers, and of the command language syntax, is presented in part~{\rm II}
of this manual, to which the user is referred for full details.

\subsection{Terminating ARCQUERY}

The regular way of stopping ARCQUERY is by using the EXIT command (see 
section~\ref{EXI}). An alternative way is to reply to any question or prompt 
with {\tt CTRL/Z}. This will terminate execution in a manner similar to 
EXIT/SAVE. If no qualifier is given with the EXIT command, ARCQUERY will prompt
for one; the SAVE qualifier saves the query context of this session.

In principle, {\tt CTRL/Y} should not be used to stop ARCQUERY. 

After termination of the ARCQUERY programme, control is returned to the
captive account menu; in order to logout, do {\tt EXIT} again, or type
{\tt LOGOUT}.

Programme execution is also terminated when the ARCQUERY prompt runs into a 
time-out. The time-out period is set to 30 minutes; if a reply is not given
within that period, CTRL/Z is forced, followed by exit/save.



\subsection{Interrupts}

The process started by a number of ARCQUERY commands (\eg  SELECT, CALSELECT,
LIST, COUNT) may be interrupted by CTRL/E or CTRL/C. 

{\tt CTRL/E} merely enquires the status of the process. It produces the number
of records processed or selected so far. The process continues thereafter. 

{\tt CTRL/C}, on the other hand is a real interrupt. The user will be asked 
to decide what to do next. In general, the options are:

\begin{tabular}{ll}
 SHOW & to show the status and continue (identical to {\tt CTRL/E}); \\
 KEEP & to discontinue the process, but keep what has been done \\
      & so far as the final result of the process; \\
 ABORT& to abort the process and discard all results of it; one \\
      & returns to the point where the original command was given.\\
\end{tabular}

A special interrupt {\tt CTRL/L} may be used (it does not always work!) to 
discontinue/continue listing on the VDU (if a command would produce such a 
listing).

\section{Aspects of a simple-minded ARCQUERY session}

\subsection{Overview}

The ARCQUERY software employs about 20 primary commands, 
which fall in roughly six groups:

\begin{tabular}{ll}
- help and preparation &{\tt HELP, DEFAULT} \\
- selecting        &{\tt SELECT, EDIT, CALSELECT} \\
- table handling   &{\tt UNION, INTERSECTION, DIFFERENCE, RENAME, DELETE} \\
- listing          &{\tt LIST, TYPE/PRINT, SPOOL, SHOW} \\
- requesting       &{\tt REQUEST, ADDRESS{\us}INFO, MODIFY{\us}REQUEST} \\
- miscellaneous    &{\tt SORT, COUNT, MAIL{\us}COMMENT} \\
- termination      &{\tt EXIT} \\
\end{tabular}

An on-line HELP (section~\ref{HEL})
facility can be accessed at any point in a query session by 
simply typing a \verb+"?"+. For example, typing \mbox{\verb+"SELECT ?" +} on 
the ARCQUERY prompt will produce that part of the HELP information pertaining
to the SELECT command; alternatively, one may use \mbox{\verb+"HELP SELECT" +}.

The ARCQuery software uses a table structure: a SELECT operation on table N,
for instance, will produce a new output table N+1. The default table 0 on entry
is, of course, the catalogue itself; the newly created output table becomes the
default for the next operation. Similarly, table-handling commands all create
new tables (which then become the default). Input and output tables can also
be specified with command qualifiers, and one can flip back and forth between
tables, if one so wishes. The default table can also be explicitly defined;
see sections~\ref{TAB} and~\ref{tables}, and below.


\subsection{SELECTions}

The SELECT command (section~\ref{SEL})
acts, in principle, on all items in the observations
catalogue, and on some derived quantities. A complete list of keywords used
with SELECT is given in table~\ref{tbla1}; a short list of items of interest
for first-time users includes:

\begin{verbatim}
- Name of the observer (up to 4 initials)               keyword: INI
- Name of the telescope                                          TEL
- Name of the instrument                                         INST
- Detector name                                                  DET
- Object name (up to 24 characters)                              OBJECT
- Object type (up to 4 code numbers)                             OBJ_TYPE
- Observation type (coded, e.g. arc/flat/object/standard)        OBS_TYPE
- RA and/or DEC, or position                                     RA, DEC, POS
- Date of observation                                            DATE
- Exposure time                                                  EXPO
- Waveband (filter) information                                  WAVEB
\end{verbatim}

Simple selections can be as follows:

\verb+SEL INI=EJZ             +: get all observations taken by observer EJZ

\verb+SEL DET=IPCS            +: get all observations taken with the IPCS

\verb+SEL OBJECT=3C273*       +: get all objects whose name starts with 3C273

In the last example the wild card `{\wildcard}' can be useful, because many 
observers add some
brief comment or clarification to the object name. If the wild card is not
specified, the archive will only search for object names 3C273 strictly, and
everything else is ignored. Note, however, that the use of wildcards will slow
down the search. Further note that blanks in object names (and other character
keywords) are ignored unless the user does explicitly specify blanks in the
select command (section~\ref{synwild}). Thus:

\verb+SELECT  OBJECT=3C273    +: will find 3C273, but also \eg  3C\ 273 or
3\ C\ 273, even 3\ C\ 2\ 7\ 3

\verb+SELECT  OBJECT=3C 273   +: finds 3C\ 273 or 3\ C\ 273, but not 3C273


During the search the SELect command may generate a listing of the
selected observations (depends on the default setting, which in its turn
depends on the access mode to the captive account used). Such a listing can 
be suppressed by giving an interrupt \verb+<CTRL/C>+ and continue with 
\verb+NOLIST+, or by using {\tt CTRL/L}, or, straight from
the beginning with the \verb+NOLIST+ qualifier in the SELECT command itself:

\verb+SEL/NOLIST+\ldots {\sl etc.}

If the default is set to NOLIST, then, after a select process is completed,
a message appears stating the number of records selected. One may choose to
list the table with \verb+"LIST"+; alternatively, the {\tt /LIST} qualifier
may be used directly with the SELECT command itself:

\verb+SEL/LIST+\ldots {\sl etc.}


\subsection{Input/Output tables}

If a SELECT command finds observations in the input table which satify the 
search specification, a new output table is created, which becomes the
default input table for the next command. Thus, if the three commands shown
above were to be given sequentially, the SEL INI command creates table 1
(table 0 being the catalogue), the SEL DET command then uses table 1 as input
and creates table 2, and finally the SEL OBJECT command creates table 3.

If you would like to do a search again of the catalogue, you can specify the
input table explicitly in the select command:

\verb+SEL/INP=0  INI=BMW      +: get data taken by BMW from the catalogue

Or, the table counter could be reset beforehand with:

\verb+DEFAULT INPUT_TABLE=0+

before doing the SELect. Note that tables 1, 2 \etc  can now, in principle,
be overwritten with subsequent SELections. However, before an existing table is
actually overwritten, the user will have to confirm it, or to define
a new output table. In any case, care should be taken if one of those
tables contains (part of) the final selection for a request!

The output table can also be specified at will in the select
command, \eg :

\verb+SEL/INP=3/OUT=2  OBJECT=NGC4151*+

which overwrites the existing table 2. If no output table is specified, the
input table name, either explicitly specified or the default, is used to 
define the default output table.

The table qualifiers can, for instance, be used to limit the
number of scratch tables, which otherwise could easily fill up the work space
of the captive account. Tables can also be DELeted; several tables can be
combined in one output table with Union, DIfference, or Intersection
(section~\ref{TAB}). Thus,
by intelligently using the select and table-handling functions, a user can
compose a final table with observations of interest, and submit a request
to de-archive those observations.


\subsection{Value ranges and logical constructions}

For some keywords it makes sense to do a selection on a range of values, and
the command interpreter accepts interval and relational specifications:

\verb+SEL RA  = (6:10:30 to 18:05:)  +: find all objects in this RA interval

\verb+SEL DEC = (0:: to 70::)        +: find all objects between 0 and 70
 degrees declination.

\verb+SEL DEC > 20::                 +: find all objects above 20 degrees decl.

\verb+SEL DATE >= 3MAR87             +: all observation on or after 3 March 1987

The last examples show that operators such as \verb+ > +,\verb+ >= +,
\verb+ < +,\verb+ <= +,\verb+ = + and \verb+ <> + 
(not equal) can be used. Furthermore, the syntax interpeter understands
logical constructions such as:

\verb+SEL   RA = (6:: to 18::)  &  DEC = (0::, to 70::)  &  EXPO > 800+

\verb+SEL   (OBJECT = N*4151  &  DATE <= 3MAR89)  |  OBJECT = M81*+

Here, the \verb+&+ stands for the logical AND operator; the \verb+|+ symbol
represents the logical OR operator. For these operators one may also use the
Fortran operators \verb+.AND.+ and \verb+.OR.+ , and similarly \verb+.GT.+,
 \verb+.GE.+, \verb+.LT.+, \verb+.LE.+, \verb+.EQ.+
and \verb+.NE.+.

\subsection{Table handling}

As an example of the usage of table handling facilities, the previous example
selection specification can also be made as follows:

\verb+SEL/INP=0/OUT=A   (OBJECT = N*4151  &  DATE <= 3MAR89)+

\verb+SEL/INP=0/OUT=B    OBJECT = M81*+

\verb+UNION/INP=(A,B)/OUT=1+

The UNION command combines the two selections A and B in one tabel 1.
Similarly, the INTERSECTION function serves to obtain a table of entries which
occur in each of two tables, and the DIFFERENCE command will produce a table
of entries which appear in only one of two tables.

If,  after the union operation, the tables A and B are no longer needed, it is
a good idea to delete them with:

\verb+DELETE/INP=A  +, and: \verb+ DELETE/INP=B +

You will be prompted for confirmation of the deletion. 

\subsection{Requests}

In order to submit a request to the archive manager for the release of 
observations (section~\ref{REQ}), just type:

\verb+REQUEST/OUTPUT_TYPE=FITS +, or \eg :

\verb+REQUEST/INP=3B/OUTPUT_TYPE=FITS +

The latter form specifies the query table, just in case one is not sure about 
the default. The REQUEST command
sends your request to the manager (it will be queued); you will
be asked to provide any comment which might be relevant for your request;
for instance, you might like to receive the data on either a DAT or EXABYTE
tape. Protected data (the proprietary period is one year) will only be released
with explicit consent of the original principal investigator. The command

\verb+SHOW REQUEST = *+

will display the status of any  outstanding request(s) of this user
(queued, granted, executed or rejected). Note that an outstanding request can 
be cancelled by the user at any time before excution; see section~\ref{REQ}
for details. The ARCQUERY software will return an E-mail message after a 
request has been processed. 

When submitting a request for data, it may be of interest to consider the order
in which the observations appear in the table; the data are de-archived in
precisely that order and thus appear in that order on the FITS tape. If the
table was obtained after many selections and table-handling operations, the
observations can really get scrambled. Therefore, it can be a good idea to
sort (section~\ref{SOR}) the table before submitting the request. A sort on
the keywords DATE, TIME, and possibly FITSTAPE will do nicely, \eg :

{\tt SORT/INP=3A/OUT=4  FITSTAPE,DATE,TIME}


\subsection{Exit procedure}

On {\tt EXIT} the following actions ensue:

\begin{itemize}
\item All requests defined during the session are forwarded to the archive 
      manager for authorization; request are queued.
\item Print files created during the session will be submitted to the printer 
      (default or otherwise, see section~\ref{TYP}), or will be sent to the 
      user's E-mail address. Subsequently the files are deleted.
\item If {\tt /NOSAVE} is specified, all query tables, symbols, \etc will be 
      deleted.
\item ARCQUERY updates some statistics of archive usage.
\end{itemize}


The qualifiers with the EXIT command of interest are:

\begin{itemize}
\item {\tt /SAVE}, or {\tt /NOSAVE}, to save the query context, or not. On the
      captive account, an absent {\tt /[NO]SAVE} qualifier will result in a
      prompt for a decision. 

      The saved query context consists of all query tables, list files and
      symbols that exist at the moment of termination, and of possible
      changes made to your user information. A saved query context can
      be restored at the begin of your next ARCQUERY session. Note,
      however, that on the captive account, the context is deleted 7
      days after the last modification.

      The possibility to save the context after a session enables a user
      to interrupt a search at any point, and come back later, for
      instance after studying a (mailed) listing of the selection(s)
      made.

\item {\tt /[NO]MAIL}, to specify that any print files (section~\ref{TYP})
      must be mailed or not to the user's (current) E-mail address. If
      this qualifier is absent, print files will be output to the default
      output device; this can be E-mail, but may also be a line printer,
      depending from where the captive account is accessed.
      If you do want output via E-mail, always use the {\tt /MAIL} qualifier
      on exit:

     \verb+ EXIT/MAIL/SAVE  +, or: \verb+ EXIT/MAIL/NOSAVE+

     If you have registered as archive user (see section~\ref{re:address}),
     ARCQUERY knows your E-mail address by default.
      Note that your E-mail address may be (re)defined explicitly 
      during the session (see section~\ref{re:eaddress}). 

      If you have not yet registered as user, and have not specified an 
      electronic mail address with the ADDRESS function, ARCQUERY wil try to 
      find a way back to you for mail output via the network path of your 
      login. This is not always successful. 
\end{itemize}



\section{User Identification (ADDRESS{\us}INFO)} \label{re:address}

On startup of the ARCQUERY software, the system will test the given initials
against the archive users database. If they do not figure in the archive users
list, the programme will display a message to that effect.

The `address{\us}info' function (section~\ref{ADD})
enables the user to define user information for
the archive database; the information is sent to the manager for inclusion
by submitting a request. 
The archive requires a minimum of address information before
data can be released: the archive (manager) has to know who, and where a
requester is. 
Queries of the catalogue can be made without registration, but no data can be
de-archived before the archive username is authorized by the
archive manager; therefore, users are advized to submit the request during their
first session.
This may seem a cumbersome way of treating worried first-time users, but it
is necessary in order to avoid confusion about archive users, and because the
data are (partly) protected by the proprietary period of one year. 

\subsection{Interactive Mode}

The user information may be entered interactively, on the captive account,
by typing:

\verb+ ADDRESS_INFO  +, or simply: \verb+ ADDRESS+

This command executes the address function in `menu' mode: you will be
prompted for the required information items. The information is split into
a part concerning the user's home institute, and the user's personal 
information. The minimum information prompted for consists of:
\begin{itemize}
\item A (full) {\bf name}; this item is compulsory.
\item The user's home {\bf institute} (compulsory; see below).
\item A computer {\bf username} (compulsory).
\item A computer {\bf host} machine name; compulsory, but may be blank 
      (see below).
\item Your {\bf phone} extension.
\end{itemize}

(Keywords appear in {\bf bold} script.) The tricky entry of this list is 
the Institute name: The archive data base contains
details of a large number of institutes, entered over the years by archive 
users and the archive manager. At the prompt for the institute name, the user
can inspect the list of institutes in the data base. If your institute is
included in the list, just enter that name, and the only other items
prompted for are a username, computer host (both required for communication
via electronic mail), and a phone extension. If the institute does not
appear in the list, the user will have to provide additional information,
which is described below.

The data base contains with every institute name a `generic' E-mail address,
which may look, for instance, like the one of the Kapteyn Institute at
Groningen (on INTERNET):

{\tt SMTP\%"<user>@<host.>astro.rug.nl"}

The address function will substitute the given username and hostname into
the indicated fields; thus, users at that institute have to provide
only a minimum of information. The `SMTP' part in the above address refers
to the local electronic-mail protocol used at the archive node.
If the hostname is redundant, a blank hostname
may be specified at the prompt: a user at node {\tt astro.rug.nl}
defines:  host = {\tt " "}, while a user at {\tt kapteyn.astro.rug.nl} fills
in: host = {\tt kapteyn}.
  
After running through
the menu, a request can be submitted automatically to the archive manager to 
have the information added to the user list, if wanted.
Alternatively, one may 
choose to submit the request at a later stage (for instance after further
alterations) with the command:

\verb+REQUEST/ADDRESS_INFO+

When submitting the request in this way, the user is also prompted for a
comment, which may serve to send any additional information or remarks to the 
archive manager with your request. The comment option is suppressed by using
the {\tt /NOCOMMENT} qualifier with the request function.

Note that a minimum of information is required, and that if some address
items have been left undefined, a request/address cannot be done; ARCQUERY 
simply refuses execution. Further, if a request is not made during the
current session, any address information
that may have been typed in will be lost on exit unless a the query
context is saved (section~\ref{EXI}).



\subsection{Command mode}

The address function can also be used in command mode.
Values of address items are specified with keyword(s) given 
with the command, \eg :

{\tt ADDRESS name="A X User"  }, and:

{\tt ADDRESS institute="GRONINGEN", username="AXU"}

If the required minimum of information is available, you will be prompted
for a decision to submit the request automatically. That prompt can be
suppressed by using the {\tt /NOREQUEST} qualifier with the command:

{\tt ADDRESS/NOREQ host=" ",phone="4638" },

which then must be followed explicitly by a request, if so required. 

If an institute name is specified, which is not included in the database,
additional information about the institute has to be defined before a
request/address can be made (next subsection). A listing of the current
selection of institute names in the data base is obtained with the SHOW
command:

{\tt SHOW INSTITUTE  }, or \verb+  SHOW INSTITUTE=name +,

where the second form will produce all available information of the named 
institute.

Information of an institute which already exists in the database, can only be 
changed in command mode, because it is not prompted for in menu mode, if
the user specifies an existing institute name.



\subsection{Defining a new Institute name}

If the user's institute name is not included in the archive database, there
are two options available: One can take the easy option, and choose as
institute name either `INTERNET' or `BITNET', or the user provides full
information, including a proper institute name or intelligible acronym.

The INTERNET and BITNET names are simply `virtual institutes', with which
only the user's E-mail details are communicated. The hostname to be used
with INTERNET is the full Internet node specification. With BITNET the
host is best specified with the SPAN node number; BITNET E-mail is
routed via the RLESIS node at RAL.
If you register in this way, perhaps some
additional comments can be provided with the request, which could enable
the archive manager to add your institute to the database.

Information required for a new institute name consists of (see also 
section~\ref{ADD}):

\begin{itemize}
\item The {\bf institute} name or acronym; in menu mode
      this item was already defined earlier.
\item The full name of the institute; keyword={\bf instname}; compulsory.
\item Any additional name, for instance pointing to a subdivision of
      a large organization; keyword={\bf subname}, optional.
\item A (mail) {\bf address} of the premises; compulsory.
\item The {\bf town} and/or postcodes, {\bf country}; compulsory.
\item The institute's {\bf telephone}, {\bf telefax} and {\bf telex} numbers; 
      optional.
\item The institute's electronic-{\bf mail} address; see above, compulsory.
      If there is a choice, the archive manager prefers an Internet address.
\end{itemize}

%\newpage
An example:

{\tt ADDRESS institute="BMO", instname="Bold Mountain Observatory" \\
     ADDRESS/NOREQ subname="Observatorio de Nuestro Domo" \\
     ADDRESS/NOREQ address="Mushroom Road", town="One Peak", \etc  \\
     ADDRESS/NOREQ mail="<user>@<host.>bmo.country" \\
     REQUEST/NOCOM/ADDRESS }

\subsection{Altering existing user information (temporarilly)} 
\label{re:eaddress}

Address information can be altered  by simply running \verb+ADDRESS_INFO+ again
in menu mode, or by explicitly (re)defining selected items in command mode.
Any item can be changed; however, if the user's institute is altered, and the
new name is as yet unknown, additional institute information will be required;
see above. 

It can sometimes be useful to redefine address information for the current 
ARCQUERY session only. Suppose a previously registered user logs onto
the captive account from another node and account than specified in the
original address information. For instance, she or he is observing and
wants to query the archive to check on previous observations. The address 
information
can be modified temporarilly, for this session only, in order to direct
mail output to the user's temporary computer account. 

To change the address is
straightforward: one can simply change the institute specification,
if the current user's site is included in the database, or one can 
use a `virtual' institute name to redefine the E-mail addres.
For instance, a visitor at the La Palma observatory site, can redirect 
ARCQUERY output to the mountain with \eg :

{\tt ADDRESS/NOREQUEST institute="ING", host="LPVE", user="GUEST07"}

or, alternatively, with:

{\tt ADDRESS/NOREQUEST institute="INTERNET", host="LPVE.ING.IAC.ES", 
 user="GUEST07"}

The {\tt /NOREQUEST} qualifier serves to suppress the otherwise automatic
prompt for the submission of a request. The changed address disappears
when ARQUERY is terminated without save of the query context; then,
on next login, the original address information applies again. If the
context is saved on exit, the changes can be restored on next logon.

If you are a frequent traveller, it may be useful to define address changes
as symbols in your intialization file on the captive account (see below).

The original address information can be restored from the database during 
an ARQUERY session, by typing:

{\tt ADDRESS/NOREQUEST institute=*, host=*, user=*}


\section{Search Strategies}

\subsection{Finding a particular object or objects}

A search for a particular object is best done by searching on its sky position.
There are two reasons for doing so: First, the object may appear in the 
catalogue under several different and perhaps abbreviated names, and secondly,
the postion is an
indexed catalogue item, which makes a search on it very quick. When searching
only on the item object({\us}name), usually a wildcard has to be used, and
the whole catalogue is tested, which can be much more time consuming than an
indexed search.

A search on sky position is best done by either specifying a range for the
catalogue items RA and DEC, or by using one of the derived keywords POSITION
or BOX. For example, in order
to find observations of NGC4151, at RA=12:10:32, Dec=39:24:30 
(J2000 coordinates) any of the following searches could be made to obtain a
first selection:

\verb+ SEL/INP=0/OUT=1 RA = 12:08:00 to 12:13:00 , DEC = 39:00:00 to 40:00:00+\\
\verb+ SEL/INP=0/OUT=1 RA = 12:10:32 UNC 0:02:30 , DEC = 39:24:30 UNC 0.25   +\\
\verb+ SEL/INP=0/OUT=1 POS = (12:10:32.0, 39:24:30, 30 arcmin)               +\\
\verb+ SEL/INP=0/OUT=1 BOX = (12:10:32.0, 39:24:30, 30 arcmin, 24 arcmin)    +

By explicitly specifying the (here generous) search radius (with POS) and search
box (with BOX), the defaults are overwritten. Those default sizes may also be 
modified (temporarilly) by using the {\tt /RADIUS} and {\tt /BOXSIZE} 
qualifiers with the select command, or (permanently) by redefining the default 
values themselves (and permanently, for the remainder of the session)
 with the DEFAULT function (sections~\ref{SEL} and~\ref{DEF}).

Note that a selection on a precise position with {\tt SEL RA=12:10:32, 
DEC=39:44:40} is unlikely to produce the desired result, or even any result,
because in this case the specified values of RA and DEC must be exactly 
identical to those in the Observations Catalogue. 

Searching on object name is generally an uncertain strategy. For example,
Markarian galaxies could be indicated by object names starting with MK, MRK,
or MARK, but many have also an NGC or other designation. One can try \eg :

\verb+SEL  RA=(6:: to 12::)  &  DEC=(0:: to 30::) & obje=(MK*,MRK*,MARK*) +

to find the observations with a Markarian-like name in the given sky area,
but this search will not necessarily yield all objects of your interest
present in the catalogue.


Further, it is  possible to use Ecliptic or Galactic coordinates as well as
another Equinox. The default coordinate system (Equatorial) and equinox (J2000)
can be replaced by
your own favorite with the DEFAULT command, or be specified, either with SELECT 
command qualifiers, or by prefixing the POS and BOX keys with  `EQ', `EC' 
or `GA':

\verb+ SEL/EQ=B1950  POS = ....+ \etc .

\verb+ SEL/COOR=GAL/EQ=1985  POS = ....+ \etc , or: 
\verb+ SEL/EQ=1985 GAPOS= ....+

In order to search observations in relatively large areas one can also select
by sky-cell number of the position index (see section~\ref{SEL} and 
table~\ref{tblcells}). Each cell covers an area of approximately 7 square degrees.


The following recipe may be useful when you know the name of your object, but 
forgot its position, assuming that there are indeed any data of it in the
archive:

\begin{itemize}
\item Do: \verb+SEL/INP=0/LIST OBJE=*name*  + ;use wildcards, and the LIST 
      qualifier.
\item As soon as a record is listed, which includes the position, interrupt 
      with: {\tt CTRL/C}

      Save the table with: {\tt KEEP}, or lose it with: {\tt ABORT}.

\item Do: \verb+SEL/INP=0/OUT=1 POSI= .... +, which will find your
       observations.
\item Similarly, you can find \eg the sky cell with: 
      \verb+  LIST .... ,GAPOS, CELL, ....  +,
      after the interrupt and {\tt KEEP}.
\end{itemize}



\subsection{Finding a particular observing night}

Catalogue items with temporal information are: Date, Time, and Exposure.
Date and Time are specified in the form {\tt DD-MM-YY} (day-month-year) and 
{\tt HH:MM:SS}, where `{\tt :}', `{\tt /}' or `{\tt -}' are acceptable 
delimiters; Exposure is specified in seconds. A full description of the
format is given in sections~\ref{syndate} and~\ref{syntime}.

The keyword DATE selects from midnight to midnight; this is often inconvenient,
and therefore a derived keyword NIGHT is avalibale to select particular
obeserving nights. NIGHT selects from noon to noon. Thus, the command:

{\tt SEL NIGHT=13-SEP-1993}

will select data from noon 13-sep-1993 until noon 14-sep-1993. The command:

{\tt SEL NIGHT=13-SEP-1993 \& EXPO>200}

selects data from that night with an exposure time greater than 200 seconds.


\subsection{Finding a particular Data Tape}

The two keywords refering to the original D(ata)-tape, are {\tt FITSTAPE} and
{\tt FITSFILE}. Selections can be made on these keys, but some care should be
exercised when doing so. The tape and file information is NOT part of the
catalogue, in the sense that it does not appear in the actual records, but
is stored separately and addressed via pointers. There are safety reasons
for having this setup, not least because the tape name and file number have
to be stored totally secure, or, if they were in some way corrupted, the
archive software would never find the data back. 

Thus, if a search for a FITSTAPE is specified, what happens is that the tape
information is first accessed via a pointer, and then tested. It is a very
IO intensive process, which, if done for every record of the 
catalogue, is an {\em extremely} time consuming operation. 

Therefore, if you wish to search for a particular tape, the best thing to do
is to search on another catalogue item as well: the tape information will then
only be accessed if the additional search specification(s) are satisfied.
The catalogue item to use that springs to mind is the DATE (or NIGHT) of 
observation, not least because the date is an indexed item. A reasonably 
reliable strategy is to apply a window around the (approximately) know date 
of the observations:

\verb+ SEL  DATE  = (<first> TO <last>) & FITSTAPE=I*nnnn + \\
\verb+ SEL  NIGHT = (<first> TO <last>) & FITSTAPE=I*nnnn +

If you do not know the date, but for instance do know of a particular object
on the tape, search on that object first (see above), and do:

\verb+ LIST ...., DATE, FITSTAPE, [FITSFILE,].... +

Subsequently, now knowing a date, search for the whole tape using a date 
window. As a final check you may list the selection thus obtained and inspect
the FITSFILE item, in order to see if the whole tape was covered by the
date window; some D-tapes do contain data taken over a longer period of time.

If you don't have any additional information about the tape you want to find,
and only have the name to go on, then it may be better to search for it in
batch mode, by using the mailserver access mode (see section~\ref{server}). 


\subsection{Usage of wildcards}


The wildcards,`{\wildcard}' and `\%',  may be used in alphanumeric values
to replace part of the character string by any character. The 
difference between `{\wildcard}' and `{\%}' is that `{\wildcard}' can indicate
a character string of any length, including zero length, while `{\%}' stands for
one character only. 
For example, `\%\%{\tt A}' indicates all three-character strings
with an A as last character, while `{\tt *A}' may have any length, and 
includes `{\tt A}' itself.

The use of wildcard(s) is particularly useful when searching on object{\us}name:
Most catalogue entries contain, apart from the, possibly abbreviated, object
title, additional information, ranging from a filter name to a run number
or seeing information. The wildcard can replace such additional information,
and the user only needs to concentrate on the object name. For example, if
you want to find observations of the object NGC205 you may try:

\verb+ SEL OBJECT = NGC205*+

However, better is this:

\verb+ SEL OBJECT = (N*205 *,N*205) +

The second formulation will also uncover N205..., but not, for instance, 
NGC2051. Further, the blank specified in this form is 
significant, and a curiosity of the software is that {\tt N*205 *} will not
uncover the plain name `NGC205', because the blank after the 5 is not treated
as part of the name in the catalogue object name field.


Wildcards can {\em not} be used in the values of coded catalogue items, such as
{Telescope} or {Waveband}; see table~\ref{tbla1}.

\subsection{Finding Calibrations}


Once a user has made a selection of the astronomical observations to retrieve
from the archive, the appropriate calibration data may be found with the 
CALSELECT command. This command will find observations of a specified 
`Observation Type' (see section~\ref{seccode}) within a specified number of 
days before and after (each of) the astronomical observations
already selected (in the default table).

The observation type is an integer code number primarily used to separate the 
various calibration exposures from the astronomical observations. A short list
is given in table~\ref{tblobstype}; all the observation types used
in the catalogue can be listed by typing:

\verb+SHOW CODE_GROUPS=OBS_TYPE  +, or: \verb+ SHOW CODE=OBS_T+

The default setting for the CALSELECT command is to search in a window
of 7 days before to 7 days after the date of each astronomical observation, and
on observation type $\geq $ 10, which means that all calibration exposures
encountered will be collected. The command, given without further
qualification uses the default setting:

\verb+CALSELECT+

However, in many cases it can be better to search for specific calibrations
with a more appropriate window setting, taking into account some knowledge
of observing practise. For instance, observers tend to take flat-field
exposures at the beginning or the end of their runs, but arcs much nearer the
the actual science spectra. Instead of the single, unqualified, CALSELECT
search, a sequence such as the following may be more appropriate:

\verb+CALSELECT OBS_TYPE=(10 to 19), DAY_LIMITS=(1,1), window=4+ (standards)

\verb+CALSELECT OBS_TYPE=(20 TO 29), DAY_LIMITS=(1,1), window=3+ (bias, darks)

\verb+CALSELECT OBS_TYPE=(30 TO 39), DAY_LIMITS=(5,5), window=6+ (flats)

\verb+CALSELECT OBS_TYPE=(40 to 49), DAY_LIMITS=(1,1), window=2+ (arcs)

\verb+CALSELECT OBS_TYPE>=50, DAY=(3,3), window=5 + (others)

This is a whole mouthful, and clearly an area for experimentation; it may be
worth the effort to define such specific calibration-selection commands as
special symbols (next section).

The {\tt CALSELECT} command can dig out quite a number of calibrations,
in particular if the search boundaries are taken generously. Searches
within one day of observation is normally more than sufficient and quite 
likely it will even then be necessary to weed out unwanted entries, for
instance because they relate to other, unwanted observations taken in the 
same night, or, because observations from other observers than the one who
took the data, are mixed in as well. This will usually require the removal
out of specific entries. A straightforward way of doing that, without the need
for complex select constructions, is by using the (VAX-based) EDIT facility. 
First, create a list file:

{\tt LIST/FILE}\ , or {\tt LIST/FILE item, item, item, \ldots}\ , then do:

{\tt EDIT/EDT }\ , or {\tt EDIT/TPU}

which puts you in edit mode, and enables you to delete any line from the
table. On output of the editor the new query table will automatically be
generated.

What if CALSELECT fails to uncover any calibrations? One possibility
is that you happen to work on a part of the catalogue which is not yet
provided with astronomical codes (see section~\ref{secedit}), and the
only way to find calibrations is then to inspect other observations taken
in the same night (or nights, by the same observer). Most calibrations 
can be identified by their name ({\rm FF}, {\rm ARC}, {\sl etc.\ }),
so it is generally not too difficult to find your data
by selecting on such names and inside an appropriate time interval:

\begin{itemize}
\item Do a SELECT on the NIGHT into a scratch table.
\item Do {\tt LIST/FILE ...., object, night, initial, .....}.
\item Use EDIT to {\em delete} the observations wanted.
\item Exit from the editor with `EXCLUDE'.
\item Merge the resulting scratch table and your original selection with UNION.
\item Delete the scratch tables.
\end{itemize}

In the
case of {\rm ARC}s for spectroscopic observations it is helpful that many of
these are taken at the same sky position of the actual astronomical object,
so a search on position will dig them out. In particular with WHT data it
is possible to find most calibrations in this way (check on
exposure times; arcs and flats usually have less than 100s).


\section{Usage and definition of symbols} \label{secsymbols}

Complex or frequently used keyword constructions or logical expressions can be 
abbreviated to ARCQUERY symbols. Such symbols can be used as shorthand or
alternative keyword names. For example, if you define the symbol NLSEL as:

\verb+ NLSEL = "SEL/NOLIST/FILE" +,

then the subsequent instruction:

\verb+ NSEL OBJE=N*4151*  + is equivalent to: 
    \verb+ SEL/NOLIST/FILE OBJE=N*4151*+

Carefully constructed symbols can greatly simplify a complex search. As an 
example, consider the search for direct images in a particular waveband,
taking into account that there are several imaging instruments available.
Define two symbols, \eg IMAGES, and VBAND, as follows :

\verb+ IMAGES = "INST=(FWHL,PFCU,PRIME,CASS.AUX.PORT)" +

\verb+ VBAND  = "(WAVEBAND=V | OBJECT=* V *)" +

The VBAND construction takes into account that some images have no waveband
information (yet; see section~\ref{secedit}), but then may have the filter name
added to the object title. With these symbols defined, the search for V-band 
images of some object is done with:

\verb+ SEL/INP=0 IMAGES & VBAND & OBJECT=..... & POS=(...... +

Another example of the usages of symbols:

\verb+ SYM1 = "posi=(12:10:32.29,39:24:29.60, 4.2 arcmin)"+\\
\verb+ SYM2 = "posi=(00:42:44.50,41:16:28.94,60.0 arcmin)"+\\
\verb+ SYM3 = "posi=(01:33:53.79,30:39:01.72,36.6 arcmin)"+\\
\verb+ SELECT/LIST (SYM1 | SYM2 | SYM3)+

\subsection{The Initialization File} \label{secinit}

The main menu of the Captive Account includes a function EDT{\us}INITFILE, which
allows you to define symbols beforehand, and have them stored in a kind of 
login file for ARCQUERY. Such an initialization file can be used to store
symbols that you may want to use repeatedly with ARCQUERY; in fact, you can 
setup your own version of the command language in this way.

The initialization file is executed on startup of ARCQUERY, and all
symbols defined on it are available throughout. In order to assemble or
modify your initialization file, terminate ARCQUERY with {\tt EXIT/SAVE}
(if you are in it, that is), and use the {\tt EDT} or {\tt TPU} function,
which will put you in one of the VAX editors, and, on first-time use, will 
create the file automatically (you have no control over its name).

Symbols defined in the initialization file have to be specified according to
the DCL protocol, \ie  each line has to start with a dollar, `{\verb+ $+}' 
sign.  Thus, in order to define the symbol SYM1 as given above, you enter:
 
\verb+ $SYM1 = "posi=(12:10:32.29,39:24:29.60, 4.2 arcmin)"+

After processing by ARCQUERY (on startup), the symbol will be known as `SYM1',
and ARCQUERY will tell you that it has created the symbol.

You exit the editor with {\tt EX} (or {\tt QUIT} if you want to abort).


\section{Listing}

The two primary listing functions are LIST and SHOW.
The LIST command serves to display specific parameters of observations in the
default query table, while SHOW will tell you about values used by ARCQUERY.

\subsection{LIST} \label{seclist}

With LIST in principle all catalogue keywords can be listed, but the default 
setting lists only: Position, Object name, Telescope, Instrument, Detector and
Date. You get that listing by simply typing:

\verb+ LIST +, 

without further qualifications. If you want other information displayed, either
change the default setting by executing {\tt DEFAULT LIST="..."}, or by 
specifying the items wanted in the list command itself:

\verb+ LIST  OBJECT, POSITION, TEL, INI, DET, DATE, EXPO+

Note that on a VDU the linewidth is truncated at 80 characters; a too long line
on the printer will be split over several pages, unless the \verb+TRUNCATE+
qualifier is given. In the previous example, for instance, you will find that
the telescope field is rather wide (12 positions), and that for ING data a
width of 4 would be sufficient. This can be established by qualifying the
field item with {\tt /WIDTH=n}. Further, if a listing is to be printed on the 
lineprinter, or output via E-mail, a list-file has to
be created first with the \verb+FILE+ qualifier, \eg :

\verb+ LIST/FILE/TRUNCATE OBJECT, POSITION, TEL/WID=4, INI, DET, DATE, EXPO+ ,

followed by \verb+PRINT+ to signal that the list-file is an output file. The
actual submission to the print or mail queues is done with the {\tt SPOOL}
command, or on EXIT. For more information about changing formats among other 
things, the reader is referred to section~\ref{LIS} and to the HELP facility,
which can be entered by typing: \verb+LIST ? +.

\subsection{SHOW} \label{secshow}

The SHOW command may be used to get information about values, units or
codes used by ARCQUERY. Information
can be shown about: Address{\us}info, Code{\us}groups, Defaults, Requests, 
Symbols, Tables, Units, and Users. Some examples:

\begin{itemize}
\item \verb+ SHOW UNITS + , or \verb+  SHOW UNITS=group+ 

       will show all units supported, or all units of a particular group 
       (\eg distance, angle, \etc ).

\item \verb+ SHOW CODE_GROUP = WAVEBAND +

       will produce a list of waveband filter names known to the archive.

\item \verb+ SHOW CODE = OBJ_TYPE +
   
       lists the object-type codes (section~\ref{seccode}) used by ARCQUERY.

\item \verb+ SHOW USER=EJZ +

       will produce details about archive user EJZ.
\end{itemize}

For further details, see section~\ref{SHO}.


\section{Using the Mailserver} \label{secserver}

\subsection{Introduction}

You can send an ARCQUERY session as an electronic mail message to the
archive mailserver at RGO, Cambridge (UK). The mailserver
runs as a detached process on the captive account and samples mail every
half hour. If a message of the proper type is found, the server reads it,
and assembles a command procedure to run ARCQUERY with the
instruction specified in your message. Results of the query session
are returned to your E-mail address.

Originally, the server was intended for remotely accessing the archive
from query software installed elsewhere. In that set-up the software
composes the proper server message in an interactive session with the user,
and forwards it to the mailserver at RGO. This construction is at
the moment only operational from the NFRA site (Dwingeloo, Netherlands).
However, an experienced archive user may benefit from using the mailserver
to query the archive, because there is no need to login at the archive site.
Moreover, writing the message, \eg with a text editor,
is dead simple, but a user should be aware
of some tricky aspects of server queries.

Queries via the server use a different part of the workspace allocated to
the archive. In particular, an initialization file on the captive account
is {\em not} accessible to the server (you have to define symbols with
your mail message).

\subsection{Access}

A server message should be sent to the mailserver E-mail address:

\begin{tabular}{ll}
on Internet & ARCQSERVER\,@\,MAIL.AST.CAM.AC.UK \\
on SPAN     & 63559::ARCQSERVER \\
(if no joy, try: & RLESIS::GXVG::ARCQSERVER) \\
on JANET    & ARCQSERVER\,@\,UK.AC.RGO.SRF \\
on STARLINK & GXVG::ARCQSERVER \\
\end{tabular}

The subject {\bf must} be specified as {\tt[subject=]"ARCQUERY{\us}MAILED"}; 
this subject name will prompt the decoding as an archive query. It is important
that the subject is specified correctly, because the server also handles
other kinds of messages.

\subsection{Format}

You may present any valid ARCQUERY instruction to the server, just as you would
do with an interactive session on the Captive Account. However, your mail
message must contain a few lines different from the sequence used to logon
to the captive account: The message must contain a `prompt' string, immediately
followed by a login statement. The prompt string has to be (for lack of a
better idea):

\verb+ ---!!!___ +

It enables the server to skip all kind of clutter put in by the E-mail
postmaster(s), in particular if the message is routed via several nodes.
The two lines immediately following on the prompt string must specify the 
login and startup of ARCQUERY, consisting of your user initials, and on the 
next line the catalogue name, including a restore/norestore instruction, as
follows:

\verb+ ABCD + \newline
\verb+ OBSCAT_LP/RESTORE + , or \verb+ OBSCAT_LP/NORESTORE+ 

The ensuing lines of the message consist of any valid ARCQUERY instruction;
the last one being the EXIT instruction. Thus, a search for data of M33 can
be done with the following message:

\verb+ ---!!!___ + \newline
\verb+ EJZ + \newline
\verb+ OBSCAT_LP/NORESTORE + \newline
\verb+ SELECT/INP=0/OUT=1 POSITION=(01:33:53.79,30:39:01.72,36.6 arcmin) + \\
\verb+ LIST/INP=1 + \newline
\verb+ EXIT/NOSAVE + \newline

Similarly, you may specify your address information with the ADDRESS function
in command mode.

\subsection{Pitfalls}

The one important aspect of server queries to keep in mind is that if
a command fails, either because it is invalid (spelling), or because a
search command fails to turn up any observations satisfying the search
specification(s), then the command is aborted and the next one is executed.
Thus, a server session does {\em not} break on a failed command. This may
lead to unwanted situations. For instance, if you did a search on the
master catalogue, and the search does not yield any observation, then the
default input table will still be `0' (and not `1'). If your message now
contains as next instruction the LIST command, you are specifying to list
the whole catalogue; not surprisingly, you will never get any reply from the
server if that happens.

Therefore, the golden rule with instructions for the server is: {\em always}
specify both the {\tt INPUT{\us}TABLE} and the {\tt OUTPUT{\us}TABLE}, and 
also other qualifiers, such as {\tt /NOCOM}, {\tt /NOREQ}, \etc . If the
input table for a command is specified, and the table does not exist, the
command is simply aborted with an error message. If a listing is specified
with:

\verb+ LIST/INP=.. +

and the table does not exist, no other (default) table will be listed either,
and you will get in the returned message a diagnosis of the problem back,
upon which you may improve your query, and resubmit it to the server.

A similar problem can occur when you follow this advise, but the actual list
is so long that you still run into (quota) problems: If you do not have a good
idea how long a listing will be, stagger your server query, and first submit
a query with only the {\tt SELECT/NOLIST/....} command, followed by exit.
You will get a message back, stating how large your output query table is.
If it is smaller then, say 1000 lines, then proceed and resubmit your query,
now with the list instruction added. 

\subsection{Comments}

You can enter comments, also with server commands. You must then qualify
with the {\tt /COMMENT} qualifier; all lines following the command will
be put in the comment message, {\em until} the string {\tt CTRL/Z} is
encountered, which acts as termination in line mode. For instance, a
comment with a request via the server can be:

\verb+ ..../OUT=3A + \newline
\verb+ REQUEST/INP=3A/COMMENT/OUTPUT_TYPE=FITS + \newline
\verb+ This is the first line of a comment + \newline
\verb+ This is the second line of a comment + \newline
\verb+ ...... + \newline
\verb+ CTRL/Z + \newline
\verb+ EXIT/MAIL/SAVE + \newline

\subsection{Returned Output}

Listings and other output generated by a server session will be returned
to you via E-mail. The address ARCQUERY uses is either your address from
the user data base, if it exists, or any E-mail address you may specify
during the current server session. If no address is known, the server
will use a return address for mail output, which it derives by retracing
your original server message. 

Note that you can get table listings in two different ways: the first one
is by doing a select (nolist!), followed by a list, as mentioned above.
The second way is to do a {\tt SELECT/FILE/NOLIST/......}, followed by
{\tt PRINT} and {\tt EXIT/MAIL/.....}. In the latter case you will
receive the listing as a separate message, else you will get the listing
as part of your server message.

\clearpage
\part{The ARCQUERY command language}

\section{ARCQUERY commands and qualifiers} \label{seccqs}

\subsection{Overview}

An archive user interacts with the ARCQUERY software via a simple command
language, which allows, among other things, catalogue searches to be formulated
as logical expressions, relating values of several catalogue items in one
command. The command syntax is the same for both on-line (the captive
account) and off-line (the mailserver) access, but some defaults are set
differently.

Once the program ARCQUERY has been started an extensive set of commands is
available, which can be classified under roughly six categories:

\begin{tabular}{ll}
- help and preparation &{\tt HELP, DEFAULT} \\
- selecting        &{\tt SELECT, EDIT, CALSELECT} \\
- table handling   &{\tt UNION, INTERSECTION, DIFFERENCE, RENAME, DELETE} \\
- listing          &{\tt LIST, TYPE/PRINT, SPOOL, SHOW} \\
- requesting       &{\tt REQUEST, ADDRESS{\us}INFO, MODIFY{\us}REQUEST} \\
- miscellaneous    &{\tt SORT, COUNT, MAIL{\us}COMMENT} \\
- termination      &{\tt EXIT} \\
\end{tabular}

In the following sections the individual commands are treated in the given
order; a brief description of all available commands and qualifiers on the
captive account is given in table~\ref{tblI} and table~\ref{tblII}, which may
serve as a quick reference guide for the more experienced user. A detailed 
description of individual command ensues in subsequent sections; however,
that description is in several cases not (cannot be) exhaustive, and even
more information can be found in the on-line help facility. Finally, in the
last sections of this part of the Archive User Manual, some general aspects
of the command language syntax and user-defined symbols are discussed.

\subsection{Command Qualifiers}

Many commands can be accompanied by qualifiers, some of which are general to
almost all commands and some of which are specific to a few commands. All
qualifiers have default values or default settings. In many cases the user can
adjust the defaults to his or her needs (see section~\ref{DEF}). A summary of
functions of qualifiers is given in table~\ref{tblII} along with their default
values, where applicable. 

Most qualifiers may be negated. If a qualifier (in either
positive or negative form) is used more than once with the same command, the
action is determined by the last occurrence. Table~\ref{tblI} 
(right-hand pages) and table~\ref{tbla6}
show with what commands each qualifier may be used.


\subsection{Keywords and key-qualifiers}

Some commands make use of expressions including keywords, the keywords being
items of the Observations Catalogue or parameters derived
from those items (table~\ref{tbla1}). 

With some keywords qualifiers may be used. Table~\ref{tblI} (last column) and 
table~\ref{tbla7} summarize the applicability of these key-qualifiers.


\newpage
\begin{table}[h,t]
\centering
\caption{ARQUERY commands} \label{tblI} \vspace{0.3cm}
\footnotesize
%\scriptsize

\begin{tabular}{|l|c|c|l|} \hline
   & & & \\ 
Command &  Short & Page &                 Function \\
   & & & \\ \hline
   & & & \\
HELPQUERY & H &\pageref{HEL}& Obtain help on the use of the program ARCQUERY.\\
   &  &  & \\
DEFAULT & DE &\pageref{DEF}& Set/modify defaults for formats, listings \\
   &  &  & search areas, {\it etc.} \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\  \hline
   &  &  & \\
SELECT &SE&\pageref{SEL}& Select observations from the Observations Catalogue\\
   &  &  & or packets from the Archive Index, or from an \\
   &  &  & earlier selection. Produce a new output table. \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
EDIT & ED &\pageref{EDI}& Edit a table of selected items produced in an \\
   &  &  & earlier search-step. Produce a new output table. \\
   &  &  & \\
CALSELECT & CA &\pageref{CAL}& Select calibration observations obtained within\\
   &  &  & a specified time bracket before and after regular \\
   &  &  & observations already selected. \\
   &  &  & \\ \hline
   &  &  & \\
UNION  & U &\pageref{UNI}& Make an output table which is the union of earlier \\
   &  &  & tables. \\
   &  &  & \\
INTERSECTION&I&\pageref{INT}& Make an output table containing the common items\\
   &  &  & of earlier tables.\\
   &  &  & \\
DIFFERENCE&DI&\pageref{DIF}& Make an output table containing items occurring \\
   &  &  & in one earlier table but not in another.\\
   &  &  & \\
RENAME  & REN &\pageref{REN}& Rename an already existing table.\\
   &  &  & \\
   &  &  & \\
DELETE &DEL&\pageref{DEL}& Delete an existing table and its associated tables.\\
%   &  &  & \\
%RETURN{\us}TABLE& RET &\ref{RET}& Retrieve a table obtained by running\\%remote
%   &  &  & ARCQUERY remotely (via the mailserver). \\
   &  &  & \\ \hline
   &  &  & \\
LIST  & L &\pageref{LIS}& List specified parameters of already selected \\
   &  &  & observations or packets. \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\ \hline
\end{tabular}
\end{table}
\vfill

\addtocounter{table}{-1}

\begin{table}[t]
\centering
\caption{ARCQUERY commands} \vspace{0.3cm}
\footnotesize
%\scriptsize

\begin{tabular}{|l|ll|ll|l|} \hline
  & & & & & \\ 
  & \multicolumn{2}{l|}{Qualifiers} & \multicolumn{2}{l|}{Keyword(s)} &
    Key-qualifiers \\
 & & & & & \\ \hline
 & & & & & \\
 H & & & & & \\
 & & & & & \\
 DE & & & MAIL{\us}OUT= &MAXRAD= & \\
    & & & QUEUE=     &MAXBOX= & \\
    & & & NLINES{\us}P= &RADIUS= & \\
    & & & PAGE{\us}WID= &BOXSIZ= & \\
    & & & INPUT=     &EQUIN = & \\
    & & & LIST=      &COORD = & \\
    & & & FORMAT=    &        & \\
 & & & & & \\ \hline
 & & & & & \\
 SE & /INPUT= &/FORMAT=     &\multicolumn{2}{l|}{see Table~\ref{tbla1}} & \\
%                                                and Table~\ref{tbla2}} & \\
    & /OUTPUT=&/[NO]LIST[=] & & & \\
    & /MAXRAD=&/[NO]FILE  & & & \\
    & /RADIUS=&/[NO]TERM  & & & \\
    & /MAXBOX=&/[NO]PRINT & & & \\
    & /BOXSIZ=&/[NO]SPLIT & & & \\
    & /COORD= &/[NO]TRUNC & & & \\
    & /EQUIN= &           & & & \\
 & & & & & \\
 ED & /INPUT= &/[NO]TPU   & & & \\
    & /OUTPUT=&           & & & \\
 & & & & & \\
 CA & /INPUT= &           & OBS{\us}TYPE=  & & \\
    & /OUTPUT=&           & DAY{\us}LIMITS=& & \\
    &         &           & WINDOW=     & & \\
 & & & & & \\ \hline
 & & & & & \\
 U & /INPUT= & & & & \\
   & /OUTPUT=& & & & \\
 & & & & & \\
 I & /INPUT= & & & & \\
   & /OUTPUT=& & & & \\
 & & & & & \\
 DI & /INPUT= & & & & \\
    & /OUTPUT=& & & & \\
 & & & & & \\
 REN& /INPUT= & & & & \\
    & /OUTPUT=& & & & \\
 & & & & & \\
 DEL & /INPUT=& & & & \\
% & & & & & \\
% RET & /INPUT=& & & & \\
% & & & & & \\
 & & & & & \\ \hline
 & & & & & \\
 L & /INPUT= & /[NO]FILE &  
       \multicolumn{2}{l|}{see Table~\ref{tbla1}} & /[NO]DECODE \\
% and Table~\ref{tbla2}} &
   & /COORD= & /[NO]TERM &         &    & /COORD= \\
   & /EQUIN= & /[NO]PRINT&         &    & /EQUIN= \\
   & /FORMAT=& /[NO]SPLIT&         &    & /FORMAT= \\
   & \multicolumn{2}{l|}{/[NO]TRUNC} &    &     & /DATE{\us}FIELD= \\
   & & & & & /NRVALUES= \\
   & & & & & /UNIT = \\
   & & & & & /WIDTH = \\
   & & & & & /NRDECIMALS= \\
 & & & & & \\ \hline
\end{tabular}
\end{table}
\vfill
\addtocounter{table}{-1}

\begin{table}[t]
\centering
\caption{ARCQUERY Commands (continued)} \vspace{0.3cm}
\footnotesize
%\scriptsize

\begin{tabular}{|l|c|c|l|} \hline
 & & & \\ 
Command &  Short & Page & Function \\
 & & & \\ \hline
 & & & \\
TYPE,  & T &\pageref{TYP}& Produce lists on the screen or on paper.\\
PRINT  & P &  &    \\
   &  &  & \\
   &  &  & \\
SPOOL  & SP &\pageref{TYP}& Spool output to the printer. \\
   &  &  & \\
   &  &  & \\
SHOW   & SH &\pageref{SHO}& Show various parameters of the Observations \\
   &  &  & Catalogue, your query context, {\it etc.} \\
   &  &  & \\
   &  &  & \\
   &  &  & \\ \hline
   &  &  & \\
REQUEST  & REQ &\pageref{REQ}& Make a request to the archive operator, \\
   &  &  & {\it e.g.} to send you the data selected, to enter an address\\
   &  &  & permanently, to restore files, etc.\\
   &  &  & \\
   &  &  & \\
   &  &  & \\
ADDRESS{\us}INFO& A &\pageref{ADD}& Enter information on your address, phone 
             number,\\
   &  &  & electronic mail address, etc.\\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
MODIFY{\us}REQ&MO&\pageref{MOD}& Request modification of entries in Catalogue.\\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\ \hline
   &  &  & \\
SORT   & SO &\pageref{SOR}& Sort tables in ascending or descending order of \\
   &  &  & specified parameters.\\
   &  &  & \\
COUNT  & CO &\pageref{COU}& Obtain statistics on the Observations Catalogue,\\
   &  &  & the Archive Index, or on a selection of items out of \\
   &  &  & either of them. \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
   &  &  & \\
MAIL{\us}COMMENT& MA &\pageref{MAI}& Send comments to the archive manager by
     E-mail.\\
   &  &  & \\
   &  &  & \\ \hline
   &  &  & \\
EXIT   & EX &\pageref{EXI}& Leave ARCQUERY with or without saving the results \\
   &  &  & of the current search session.\\
%   &  &  & \\
%   &  &  & \\
   &  &  & \\ \hline
\end{tabular}
\end{table}
\vfill

\addtocounter{table}{-1}

\begin{table}[t]
\centering
\caption{ARCQUERY Commands (continued)} \vspace{0.3cm}
\footnotesize
%\scriptsize

\begin{tabular}{|l|ll|ll|l|}  \hline  
 & & & & & \\ 
  & \multicolumn{2}{l|}{Qualifiers} & \multicolumn{2}{l|}{Keyword(s)} &
  Key-qualifiers \\
 & & & & & \\ \hline
 & & & & & \\
 T & /INPUT=  & /[NO]SPLIT & & & \\
 P & /[NO]TERM& /[NO]TRUNC & & & \\
   & /[NO]PRIN & & & & \\
 & & & & & \\
 SP & /[NO]COPIES= &/QUEUE= & & & \\
    & /[NO]KEEP& /[NO]MAIL= & & & \\
 & & & & & \\
 SH & \multicolumn{2}{l|}{/[NO]TERMINAL} & ADDRESS & SYMBOLS  & \\
    & \multicolumn{2}{l|}{/[NO]PRINTER } & CODE{\us}GR& TABLES   & \\
    & &              & DEFAULT & UNITS    & \\
    & &              & REQUESTS& USERS    & \\
 & & & & & \\ \hline
 & & & & & \\
 REQ & /INPUT=      & /RESTORE   & & & \\
     & /ADDRESS     & /[NO]EDIT  & & & \\
     & /OUTPUT{\us}TYPE  & /[NO]TPU   & & & \\
     & /NODENAME=   & /[UN]DELETE= & & & \\
     & \multicolumn{2}{l|}{/[NO]COMMENT} & & & \\
 & & & & & \\
 A &\multicolumn{2}{l|}{/[NO]REQUEST} & NAME      & SUBNAME     & \\
   &\multicolumn{2}{l|}{/[NO]COMMENT} & INSTITUTE & ADDRESS     & \\
   & /[NO]EDIT    & & USERNAME   & TOWN      & \\
   & /[NO]TPU     & & HOST       & COUNTRY   & \\
   &              & & PHONE{\us}EXT& TELEPHONE& \\
   &              & & INSTNAME   & TELEFAX   & \\
   &              & & MAIL{\us}ADDRESS & TELEX     & \\
   & & & & & \\
 MO& /INPUT=     & /LINE{\us}NO   &
     \multicolumn{2}{l|}{see section~ref{MOD}}&/COORD= \\
   & /[NO]EDIT   & /LINE{\us}WISE & & &/EQUINOX= \\
   & /[NO]TPU    & /COORD=        & & & \\
   & /LIST       & /EQUINOX=      & & & \\
   & /[NO]COMMENT& /FORMAT=       & & & \\
   & & & & & \\ \hline
   & & & & & \\
 SO & /INPUT= & /ASCENDING  & 
         \multicolumn{2}{l|}{see Table~\ref{tbla1}} & /ASCENDING \\
% and Table~\ref{tbla2}} & 
    & /OUTPUT=& /DESCENDING &           &           & /DESCENDING\\
 & & & & & \\
 CO & /INPUT= & /EQUIN\ =   & 
         \multicolumn{2}{l|}{see Table~\ref{tbla1}} & /INTERVAL= \\
% and Table~\ref{tbla2}} &
    & /COORD= & /FORMAT=    &           &           & /COORD= \\
    & \multicolumn{2}{l|}{/[NO]TERMINAL}&   &       & /EQUIN= \\
    & \multicolumn{2}{l|}{/[NO]PRINTER} &   &       & /FORMAT=\\
    & & & & & /NRDECIMALS=\\
    & & & & & /[NO]DECODE \\
    & & & & & /DATE{\us}FIELD= \\
    & & & & & /UNIT= \\
    & & & & & /WIDTH= \\
    & & & & & \\
 MA & /[NO]EDIT & /[NO]SELF & & & \\
    & /[NO]TPU  &           & & & \\
 & & & & & \\ \hline
 & & & & & \\
 EX & /[NO]SAVE & /QUEUE=   & & & \\
    & /[NO]MAIL=&           & & & \\
%    & /[NO]EDIT   & /[NO]TPU         & & & \\
%    & /[NO]RETURN & /[NO]MASTER      & & & \\ 
%    & /IDENT=   &  /[NO]OUTPUT=      & & & \\
%    & /[NO]ALL  &                    & & & \\
 & & & & & \\ \hline
\end{tabular}
\end{table}
\vfill


\begin{table}[t]
\centering
\caption{Qualifier descriptions in alphabetical order} \vspace{0.3cm}
\label{tblII}
\footnotesize

\begin{tabular}{l|c|l} \hline
 & & \\
Qualifier  & Default setting &   Description \\
 & & \\ \hline
 & & \\
/ADDRESS{\us}INFO &    & Indicates a request to permanently file \\
               &    & your address information \\
               &    & \\
%/[NO]ALL  & /NOALL  & Determines whether the accumulated log-file \\
%               &    & of several sessions is converted into \\
%               &    & ARCQUERY commands (see /MASTER) or just \\
%               &    & the one of the current session. \\
%               &    & \\
/ASCENDING &/ASCENDING & Determines sorting order \\
                  &    & \\
/BOXSIZE=  &  set by DEFAULT & Dimensions of search box ($<$ MAXBOXSIZE) \\
   &    & \\
/[NO]COMMENT &   /COMMENT  & Accompany a request issued by written \\
   &    & comments \\
   &    & \\
/COORDINATES= &  set by DEFAULT & Determines the coordinate system for \\
   &    & position selection \\
   &    & \\
/[NO]COPIES= &   /COPIES=1  & Determines number of copies printed \\
   &    & \\
%/DATABASE  &    & Indicates that retrieved data must be \\ % obsolete
%           &    & written into a local packet database \\  % obsolete
%           &    & \\
/DELETE=   &    & Allows the user to delete a request, \\
           &    & specified by its date and time, from the \\
           &    & request queue \\
           &    & \\
/DESCENDING&    & Determines sorting order (mutually \\
           &    & exclusive with ASCENDING) \\
           &    & \\
/[NO]EDIT  & /EDIT if /TPU & Determines whether an editor should be used \\
           &/NOEDIT if /NOTPU & \\
           &    & \\
/EQUINOX=  &  set by DEFAULT & Determines the equinox \\
           &    & \\
/[NO]FILE  &  /NOFILE  & (Do not) produce a list-file  \\
           &    & \\
%/FITS{\us}TAPE &    & Indicates that retrieved data must be \\ % replace by
%   &    & written onto FITS tape \\                            % /output_type
%   &    & \\
/FORMAT=  &  set by DEFAULT & Determines print-format for coordinates \\
   &    & (default is hms/`'" for equatorial, decimal \\
   &    & degrees for ecliptic and galactic) \\
%/IDENT=  & date and time & Specifies an identification for the \\
%   &    & subject-field of the mailed return table \\
%   &    & so that it will be recognized. \\
%   &    & \\
/INPUT{\us}TABLE= & 0 or last output & Table to be operated on by command \\
   &    & \\
/[NO]KEEP  & /NOKEEP   & Determines whether printfile is kept after \\
   & /KEEP if NOCOPIES & printing \\
 & & \\ 
/[NO]LIST[=] &/LIST with default & Determines list string \\
   &   list-string &   \\
   & /NOLIST if remote & \\
 & & \\ 
/[NO]MAIL{\us}OUTPUT[=]& set by DEFAULT & Determines whether listings spooled\\
   &    & will be sent as mail messages, rather than to \\
   &    & the local printer \\
   &    & \\
%/[NO]MASTER{\us}SEND&/MASTER in batch&Determines whether the log-file created\\
%   &  /NOMASTER if  & during the session will be converted into \\
%   &  direct access  & an ARCQUERY command file, which will \\
%   &    & subsequently be mailed to the master \\
%   &    & archive. \\
%   &    & \\
/MAXRADIUS= &  set by DEFAULT & Maximum value for search radius  \\
   &    & ({\it cf.\/} RADIUS) \\
   &    & \\
/MAXBOXSIZE= &  set by DEFAULT  & Maximum dimensions of search box \\
   &       & ({\it cf.\/}BOXSIZE) \\
   &    & \\
/NODENAME  &    & Specifies node name for retrieved data in \\
   &    & packet database. \\
%   &    & \\
%/[NO]OUTPUT{\us}FILE= &/NOOUTPUT  & Determines whether the ARCQUERY command \\
%   &    & file is kept after MASTER{\us}SEND. If \\
%   &    & specified with /NOMASTER{\us}SEND it results \\
%   &    & in the creation of the command file but not \\
%   &    & in the mailing thereof. \\
   &    & \\ \hline
\end{tabular}
\end{table}
\vfill

\addtocounter{table}{-1}

\begin{table}[t]
\centering
\caption{Qualifier descriptions in alphabetical order (continued)} 
\footnotesize
\vspace{0.3cm}

\begin{tabular}{l|c|l} \hline
 & & \\
Qualifier  & Default setting &   Description \\
 & & \\ \hline
 & & \\
/OUTPUT{\us}TABLE= &   input + 1  & New table produced by command \\
   &    & \\
/OUTPUT{\us}TYPE = &   & Specifies output for dearchived data (\eg FITS)\\
   &    & \\
/[NO]PRINTER &  /NOPRINTER  & Printer as output device for listings. Note \\
   &    & that printer and terminal can be used \\
   &    & simultaneously. \\
   &    & \\
/QUEUE  &  set by DEFAULT & Determines the print queue to which \\
   &    & listings will be spooled. \\
   &    & \\
/RADIUS=  &  set by DEFAULT & Search radius (< MAXRADIUS) \\
   &    & \\
/[NO]REQUEST & not set in inter- & Determines whether information provided \\
     &   active mode,  & automatically results in the issue of a \\
   & /REQUEST in batch & request to modify address-file permanently \\
   &    & \\
/RESTORE  &    & Indicates a request for restoration of data \\
   &    & currently not on line (e.g. SOD-files or \\
   &    & indexpackets) \\
   &    & \\
%/[NO]RETURN{\us}TABLE &/NORETURN  & Specifies the input-table for returned \\
%   &    & mail output from master archive. In server \\
%   &    & mode the table is mailed back; in captive \\
%   &    & mode with direct master-archive access the \\
%   &    & table and the context file are returned; in \\
%   &    & all other cases /RETURN is allowed only \\
%   &    & with /MASTER{\us}SEND. /RETURN forces /SAVE. \\
%   &    & \\
/[NO]SAVE  &/NOSAVE (batchmode)& Determines whether context will be saved \\
   &    & for use in a subsequent ARCQUERY session \\
   &    & before exiting the current session. \\
   &    & \\
/[NO]SELF  &  /SELF  & Determines whether the user's mail comments \\
   &    & are also mailed to himself (herself). \\
   &    & /NOSELF causes comments to be written in \\
   &    & the log-file. \\
   &    & \\
/[NO]SPLIT &   /SPLIT  & Determines whether print-lines exceeding \\
   &/NOSPLIT if /TRUNC & the page size will be split over several \\
   &    & pages. /SPLIT and /TRUNCATE are mutually \\
   &    & exclusive. \\
   &    & \\
/[NO]TERMINAL &  /TERMINAL  & Terminal as output device for listings \\
   &    & \\
/[NO]TPU  &   /NOTPU  & Determines whether the TPU/EVE editor will \\
   &    & be used instead of the VMS/EDT editor \\
   &    & \\
/[NO]TRUNCATE &  /NOTRUNCATE  & Determines whether print-lines exceeding \\
   &    & the page size will be truncated. /TRUNCATE \\
   &    & and /SPLIT are mutually exclusive. \\
   &    & /NOSPL/NOTRUNC causes line to be continued \\
   &    & on the next one. \\
   &    & \\
/UNDELETE= &    & Restore a deleted request onto the request \\
   &    & queue (cf. /DELETE) \\
   &    & \\ \hline
\end{tabular}
\end{table}
\vfill

\newpage
\begin{table}[t]
\centering
\caption{Applicability of command qualifiers} \label{tbla6}
\scriptsize
\vspace{0.3cm}

\begin{tabular}{|l|ccccccccccccccccccccc|} \hline
&&&&&&&&&&&&&&&&&&&&& \\
\shortstack{\ \ \ \ \ \ \ \ \ \ \ \ Command \\ \\ Qualifier}
&\shortstack{D\\E\\F}
&\shortstack{S\\E\\L}
&\shortstack{E\\D\\I}
&\shortstack{C\\A\\L}
&\shortstack{U\\N\\I}
&\shortstack{I\\N\\T}
&\shortstack{D\\I\\F}
&\shortstack{R\\E\\N}
&\shortstack{D\\E\\L}
%&\shortstack{R\\E\\T}
&\shortstack{L\\I\\S}
&\shortstack{T\\Y\\P}
&\shortstack{P\\R\\I}
&\shortstack{S\\P\\O}
&\shortstack{S\\H\\O}
&\shortstack{R\\E\\Q}
&\shortstack{A\\D\\D}
&\shortstack{M\\O\\D}
&\shortstack{S\\O\\R}
&\shortstack{C\\O\\U}
&\shortstack{M\\A\\I}
&\shortstack{E\\X\\I} \\
&&&&&&&&&&&&&&&&&&&&& \\ \hline
&&&&&&&&&&&&&&&&&&&&& \\
/INPUT{\us}TABLE=    &D&X&X&X&X&X&X&X&X&X&X&X& & &X& & &X&X& & \\ 
/OUTPUT{\us}TABLE=   & &X&X&X&X&X&X&X& & & &X& & & & & &X& & & \\
/[NO]LIST[=]         &D&X& & & & & & & & & & & & & & & & & & & \\
/[NO]FILE            & &X& & & & & & & &X& & & & & & & & & & & \\
/[NO]TERMINAL        & &X& & & & & & & &X&X&X& &X& & & & &X& & \\
/[NO]PRINTER         & &X& & & & & & & &X&X&X& &X& & & & &X& & \\
/[NO]SPLIT           & &X& & & & & & & &X&X&X& & & & & & & & & \\
/[NO]TRUNCATE        & &X& & & & & & & &X&X&X& & & & & & & & & \\
/[NO]EDIT            & & & & & & & & & & & & & & &X&X& & & &X& \\
/[NO]TPU             & &X& & & & & & & & & & & & &X&X& & & &X& \\
/RADIUS=             &D&X& & & & & & & & & & & & & & & & & & & \\
/BOXSIZE=            &D&X& & & & & & & & & & & & & & & & & & & \\
/MAXRADIUS=          &D&X& & & & & & & & & & & & & & & & & & & \\
/MAXBOXSIZE=         &D&X& & & & & & & & & & & & & & & & & & & \\
/COORDINATES=        &D&X& & & & & & & &X& & & & & & & & & &X& \\
/EQUINOX=            &D&X& & & & & & & &X& & & & & & & & & &X& \\
/FORMAT=             &D&X& & & & & & & &X& & & & & & & & & &X& \\
/[NO]COPIES=         & & & & & & & & & & & & &X& & & & & & & & \\
/[NO]KEEP            & & & & & & & & & & & & &X& & & & & & & & \\
/QUEUE               &D& & & & & & & & & & & &X& & & & & & & &X\\
/[NO]MAIL            &D& & & & & & & & & & & &X& & & & & & & &X\\
/OUTPUT{\us}TYPE     & & & & & & & & & & & & & & &X& & & & & & \\
/RESTORE             & & & & & & & & & & & & & & &X& & & & & & \\
/ADDRESS{\us}INFO    & & & & & & & & & & & & & & &X& & & & & & \\
/NODENAME=           & & & & & & & & & & & & & & &X& & & & & & \\
/[NO]COMMENT         & & & & & & & & & & & & & & &X&X& & & & & \\
/[UN]DELETE=         & & & & & & & & & & & & & & &X& & & & & & \\
/[NO]REQUEST         & & & & & & & & & & & & & & & &X& & & & & \\
/ASCENDING           & & & & & & & & & & & & & & & & & &X& & & \\
/DESCENDING          & & & & & & & & & & & & & & & & & &X& & & \\
/[NO]SELF            & & & & & & & & & & & & & & & & & & & &X& \\
/[NO]SAVE            & & & & & & & & & & & & & & & & & & & & &X\\
%/[NO]MASTER{\us}SEND & & & & & & & & & & & & & & & & & & & & &X\\
%/[NO]OUTPUT{\us}FILE & & & & & & & & & & & & & & & & & & & & &X\\
%/[NO]ALL             & & & & & & & & & & & & & & & & & & & & &X\\
%/[NO]RETURN{\us}TABLE& & & & & & & & & & & & & & & & & & & & &X\\
%/[NO]IDENT           & & & & & & & & & & & & & & & & & & & & &X\\
&&&&&&&&&&&&&&&&&&&&& \\ \hline
\end{tabular}
\vspace{0.2cm}
{\bf Note} to table~\ref{tbla6}: Qualifiers marked with `D' may be set 
           by the DEFAULT command.
\end{table}

\begin{table}
\centering
\caption{ Applicability of key-qualifiers} \label{tbla7}
\vspace{0.3cm}

\scriptsize
\begin{tabular}{|l|cccc|} \hline
              &    &    &    &    \\ 
\shortstack{\ \hspace{1.5cm}\ Command \\ \\ Qualifier}
&\shortstack{D\\E\\F}&\shortstack{L\\I\\S}
&\shortstack{S\\O\\R}&\shortstack{C\\O\\U} \\
              &    &    &    &    \\ \hline
/[NO]DECODE   &    & X  &    & X  \\  
/COORDINATES= & D  & X  &    & X  \\
/EQUINOX=     & D  & X  &    & X  \\
/FORMAT=      & D  & X  &    & X  \\
/DATE{\us}FIELD=  &    & X  &    & X  \\
/NRVALUES=    &    & X  &    & X  \\
/UNIT=        &    & X  &    & X  \\
/WIDTH=       &    & X  &    & X  \\
/NRDECIMALS=  &    & X  &    & X  \\
/INTERVAL=    &    & X  &    & X  \\
/ASCENDING    & D  &    & X  &    \\
/DESCENDING   & D  &    & X  &    \\ \hline
\end{tabular}
\vspace{0.2cm}

\begin{tabular}{l}
{\bf Note} to table~\ref{tbla7}: Qualifiers marked \\
 with `D' may be set by the DEFAULT \\
 command or by a command-qualifier  \\
\end{tabular}
\end{table}

\clearpage
\newpage
\section{Obtain help information: HELPQUERY (H)} \label{HEL}

This command allows the user to enter the hierarchically organized HELP
facility of ARCQUERY at the top level. The first topic it will show is
COMMANDS and the user can take it from there. Instead of typing {\tt HELP} a
question mark, {\tt ?}, may be used.

In order to bypass the HELP hierarchy one may specify a topic and/or qualifiers,
\eg :

 {\tt HELP~SELECT}\ ,  or\ \  {\tt HELP~SELECT/INPUT}.

A similar thing may be done using
the question mark; the difference in syntax is that the question mark must
always be the last character in the string (`context-driven help'), \eg :

 {\tt SEL ?}\ , or\ \  {\tt SEL~RA=?}

Note that the HELP facility is available at all times. If one runs into 
difficulties, one may always type {\tt ?} in order to obtain information
about the particular topic or subtopic appropriate at that point. 

The key `PF2' (the EDT help-key,`KP2') has been predefined as `?'.

Typing {\tt CTRL/Z} or as many carriage-returns {\tt <CR>} as needed terminates
a help session; one returns to level at which help was sollicited.


\section{Set defaults: DEFAULT (DEF)} \label{DEF}

The DEFAULT command allows the user to modify the initial defaults for 
commonly used parameters and keywords in preparation for an ARCQUERY session 
(see Table~\ref{tblIII}). All parameters which may be set by this command have 
been assigned `reasonable' initial values, so that many users will be able to 
get results without changing them. Defaults may be overridden temporarily by 
qualifiers, either at command level or at keyword level (see also 
Table~\ref{tbla6} and Table~\ref{tbla7}).

The command can be used in three different forms:

\begin{itemize}
\item In order to define new default values, type:

{\tt  DEFAULT [keyword[=value][,keyword=[value][,...]]]}
\item To restore all, or a specific initial default(s), type:

{\tt DEFAULT *}\hspace{1.0cm} or:\hspace{1.0cm}{\tt DEFAULT keyword}
\item To enter a menu mode, give:

{\tt DEFAULT}
\end{itemize}

Note that the syntax rules for values and value-sets apply; see 
section~\ref{synval} for details. In particular, value-sets
consisting of multiple values, must be enclosed in parentheses and the
individual values must be separated by commas. A
value containing special characters must be enclosed in quotation marks 
({\tt "}).

Not giving the {\tt =value} specification for a keyword, results in
the keyword specified to be set to its {\em initial} default value.
The form {\tt DEFAULT~*} restores the initial values for {\em all} keywords.

When using the menu mode, the current defaults will be successively shown,
and may be optionally modified to a new value. 
Alternatively, the command {\tt SHOW~DEFAULT} (see section~\ref{SHO}) 
can be used to show the current settings.


\begin{table}
\centering
\caption{Parameters with user defaults} \label{tblIII}\vspace{0.3cm}
\begin{tabular}{|l|l|l|} \hline
 & & \\
Parameter &     Initial value  &  \\
 & & \\ \hline
 & & \\
MAIL{\us}OUTPUT & NO for local use,       & list and log output sent    \\
                & LISTINGS for remote use & by E-mail                   \\
QUEUE           & SYS\$PRINT               & printqueue                  \\
NLINES{\us}PAGE & 66                      & Nr of lines per page        \\
PAGE{\us}WIDTH  & 132                     & Width of printed page       \\
INPUT{\us}TABLE & 0                       & Observations Catalogue      \\
LIST            & \multicolumn{2}{l|}
     {{\tt "}POSITION,OBJECT,TEL/WID=4,INST/WID=4,DET/WID=4,DATE{\tt "}}\\
FORMAT          & DEFAULT                 & coordinate print format     \\
MAXRADIUS       & 1:00:00                 & 1 deg limit on RADIUS       \\
MAXBOXSIZE      & (2:00:00, 2:00:00)      & 2 deg limit on BOX          \\
RADIUS          & 0:01:00                 & 1 arcmin search radius      \\
BOXSIZE         & (0:02:00, 0:02:00)      & 2 arcmin search box         \\
EQUINOX         & J2000                   & search equinox and          \\
COORDINATES     & EQUATORIAL              & coordinate system           \\
 & & \\ \hline
\end{tabular}
\end{table}



\subsection{Default output specification}

The {\tt MAIL{\us}OUTPUT=NO | LISTINGS | LOG{\us}FILE | ALL} qualifier 
specifies whether listings and/or log files produced by
ARCQUERY will be sent on termination by electronic mail.
{\tt LISTINGS} specifies only the listings that are produced explicitly by
the user, {\tt LOG{\us}FILE} specifies the logfile of the session, {\tt ALL} 
specifies both. {\tt NO} indicates that no output is mailed; any existing 
list files will be spooled to the local print queue. 

The qualifiers {\tt QUEUE=printqueue}, {\tt NLINES{\us}PAGE=n} and 
{\tt PAGE{\us}WIDTH=n} refer to the line printer at the archive site (\ie GXVG).
They are set by the login procedure of the captive account; only change
these parameters if you know exactly what you are doing. However, if the
listings are to be returned to the user e-mail address, then these qualifiers
can be used to change the listing format.
Note that NLINES{\us}PAGE refers to the full page length; the
number of lines actually printed on a page is 5 less.

\subsection{Default list formats}

The command: {\tt DEFAULT LIST="keyword[,keyword[,keyword....]]"}

(re)defines the items that will be listed by the LIST command when used
without specification (see section~\ref{LIS}). Qualifiers can be given
with the keywords in order to specify a certain width or a number of decimals
(see \eg Table~\ref{tblIII}).

If the string of
keywords starts with a comma it is appended to the current default list
string. The total string cannot exceed 256 characters. A summary of the many
possible keywords and qualifiers in the list string can be obtained with
the on-line HELP facility (use: {\tt HELP~DEFAULT~LIST}).


The command {\tt DEFAULT~FORMAT=DEGREES | DECIMAL | MS | DEFAULT}

specifies the list-format of coordinates.
DEGREES and DECIMAL are equivalent (decimal degrees), MS implies the
{\hms}/{\dms} format, while DEFAULT implies decimal degrees for galactic 
and ecliptic coordinates and the MS format for equatorial ones. Note that 
the FORMAT default setting has no baring on the way in which position 
information may be {\em entered} by the user, in, for instance, the SELECT
command.


\subsection{Default table names}

The command: {\tt DEFAULT~INPUT{\us}TABLE=input-table-name} 

(re)defines the default INPUT{\us}TABLE for the next command (using an input 
table). The default value on entry of ARCQUERY (without RESTORE) is 0, which 
specifies the Observations Catalogue. 

If an ARCQUERY command creates a new (output) table, the output table name can 
be specified with the command. If {\tt OUTPUT{\us}TABLE} is {\it not} specified 
explicitly, a default output table name will be generated from the 
input table name, either explicitly specified or the default name, according
to the rules set out in section~\ref{tables}.

The default value of INPUT{\us}TABLE is updated during an ARCQUERY session to 
be equal to the last created output table name. It is shown on the user's VDU
after the execution a command. Thus, the OUTPUT{\us}TABLE of a command becomes
the default INPUT{\us}TABLE for the next.


\subsection{Defaults for position search}

The parameters
{\tt RADIUS=radius} and {\tt BOXSIZE=(width,height)} specify the default 
circular and rectangular areas to be searched when a position is specified. 
When no units are explicitly given, degrees are assumed. General rules
concerning the format and units of the parameter values {\tt radius},
{\tt width}, {\tt height} are given in section~\ref{syntax}.

The parameters {\tt MAXRADIUS=r} and {\tt MAXBOXSIZE=(w,h)} provide safeguards 
against specifications of unrealistically large values of RADIUS and BOXSIZE, 
for instance by an incorrect use of units. If {\tt h} is not given it defaults 
to {\tt h=w}.

{\tt COORDINATES=EQUATORIAL | GALACTIC | ECLIPTIC}, and {\tt EQUINOX=equinox} 
specify the default coordinate system used for searching. Equinox may be any 
floating-point year number preceded optionally by B for Besselian or J for 
Julian. By default B is assumed for equinox $<$ 1984.0 and J for equinox $>$
1984.0. Besselian coordinates are in the FK4 system, Julian ones in the FK5 
system.

%here tablea3

\newpage
\section{Selection of catalogue records}%: SELECT, EDIT, CALSELECT}

\subsection{General procedure}

A number of ARQUERY commands enable an archive user to search and select from 
the Observations Catalogue, and to combine different selection tables.
The idea is that by intelligently using these
functions of the query software, a final selection is composed of
catalogue entries of interest, which then may be submitted to the archive 
manager as a request for the release of the data.

Although it is possible to select the observations by using
only one, possibly quite complicated, SELECT command (see section~\ref{SEL}) a
step-by-step procedure is probably more convenient for most users. For 
instance, as a first step a coarse search could be made of the catalogue, 
followed by subsequent narrowing down of the selection. Alternatively,
one might build-up a final selection by combining a number of small individual
selections at particular sky positions or dates, which can be done very 
efficiently because of the use of catalogue indexes (section~\ref{SEL}).

Each step of such a selection process will create a new output table from the
input table(s). If a search is made on the Observations Catalogue, input table
`0', and subsequent `query' tables will be named `1', `2', `3', \etc, 
unless the user
specifies a different name with the {\tt /OUTPUT{\us}TABLE} qualifier (see
section~\ref{tables} for table nomenclature and section~\ref{DEF} for the
default table name conventions). If the /INPUT{\us}TABLE qualifier is not used,
selections are made from the default input table (`0', or the latest output
table), which is mentioned with every ARCQUERY prompt. Non-default table names
must be used when, at any point in the procedure, repeatedly selections are 
made from the same (input) table by different criteria. Such selections
may be combined by using the UNION, INTERSECTION, and DIFFERENCE commands (see
section~\ref{TAB}).

The EDIT command (section~\ref{EDI}) can be used to select in edit mode from 
any of the tables created. The CALSELECT command (section~\ref{CAL}) serves to
find, for a given selection of observations, the accompanying calibration
exposures in the catalogue; this function makes use of the astronomical codes
defined at the Data Acquisition stage or by the archive manager; see 
section~\ref{seccode} for details.

Once the user is satisfied with the selection a
REQUEST (section~\ref{REQ}) can be made to retrieve the data from the
archive and to send them to the user on a FITS tape.


\subsection{Select observations: SELECT (SE)} \label{SEL}

The syntax of the SELECT command (see also section~\ref{syntax}) is similar to
a logical expression in Fortran:

{\tt SEL[/qualifiers]\ \ keyword.ro.value[.operator.keyword.ro.value[......]]}

where {\tt .ro.} stands for a relational operator, and {\tt .operator.} stands 
for a logical operator. Table~\ref{operators} shows the allowed operators and
their order of evaluation in an expression. The relational operators are used 
in the keyword construction; wildcards, value-sets and value-ranges can often
be used; see section~\ref{syntax} for details. Preceding the keyword
by {\tt NO} negates the relational operator.

Logical operators combine keyword constructions into logical expressions;
the order of precedence may be altered by appropriate use of parentheses.

The versatility of the ARCQUERY command interpreter often makes it possible to
formulate the same selection in different ways. For example, the selection:

{\tt SEL (OBJE <> (3C*,M*)  \&  DATE >= 3MAR86) |  OBJE = M81}

is equivalent to:

{\tt SEL (OBJE.NE.3C*.AND.OBJE.NE.M*.AND.DATE.GE.3MAR86).OR.OBJE.EQ.M81}

is equivalent to:
   
{\tt SEL NOOBJE= (3C*,M*),  NODATE < 3MAR86 .OR.OBJE=M81}

Blanks are allowed at any place, but are very seldom mandatory.
The user is referred to tables~\ref{tblI} and~\ref{tblII} for the qualifiers 
applicable to the SELECT command.

{\bf Keywords}

All entries of the Observations Catalogue can be used as keywords for selection.
Some `derived' keywords are allowed as well; these are quantities
calculated from the actual catalogue information, but which are themselves not
stored in the data base. The available catalogue keywords are listed in
Table~\ref{tbla1}. Values of a number of keywords have been coded in the 
Observations Catalogue (see footnote 4) for
the sake of compactness; these keys can be specified either with the code number
or with the decoded (more meaningful) value; however, wildcards are then not 
allowed. The object-type code (OBJ{\us}TYPE) and the seeing and sky-quality 
codes are exceptions to this rule, and can only be addressed with the code 
number.

Note that information about the original data tapes from which the observations
were loaded does not figure in the observations catalogue, but is stored 
separately. Apart from the Observations Catalogue keywords, 
two more keys: FITS{\us}TAPE and FITS{\us}FILE can be used to select data. A
search for a particular tape, however, is best done in combination with a
DATE window, because testing of all catalogue entries for the tapename is
extremely time consuming, while the usage of a date range ensures the
application of the date index, which works very much quicker.

{\bf Indexes}

The query software maintains indexes of two items: POSITION and DATE. Searches
on those keywords are indexed searched, and therefore very fast. The position
index is obtained by deviding the sky into a large number of individual cells
(6450) of approximately equal size (7 square degrees),
and indexing the cell numbers (table~\ref{tblcells}). 
Observations in cells found from the index are
tested against the original search specification(s). The CELL number is a 
catalogue keyword, on which data can be selected. The query
software decides when to use an index, based on the structure of the select
string. Sometimes, if a very complex date or position specification is made,
the index will not be used, and the whole catalogue is tested instead.

On entry ARCQUERY lists the items for which indexes are maintained; it is 
possible to have other catalogue items, apart from position and date, indexed
too at some time in the future.

\subsection{View and edit a selection: EDIT (ED)} \label{EDI}

In order to use this command a list-file must have been created earlier. This 
can be done by using the /FILE qualifier with the SELECT or LIST command; see 
for details under the LIST command.

The list file can be processed by either the (default) VAX/EDT editor 
or the TPU/EVE editor (use the {\tt /TPU} qualifier). The following operations
are recognized as legitimate usage of the editor:

\begin{itemize}
\item Scroll through the table only and exit editor with QUIT, 
      creating no new file.
\item Delete {\em lines} from the file and exit with {\tt EX} to create a
      new file; ARCQUERY will prompt whether the remaining lines should be
      included in or exluded from the output. The output file is subsequently
      compared with the original query table, and a new table is created.
\item add comment lines (preceded by an exclamation mark (!)) to the list file.
\end{itemize}

Do not use EDIT to make any other alterations, as ARCQUERY will detect errors
when comparing the old and the new list files. Thus, the edit mode can only
be used to make a selection of particular lines from a table, but not to
alter individual table items.


\subsection{Select calibration observations:  CALSELECT (CA)} \label{CAL}

Once the user has made a selection of astronomical observations of interest,
the appropriate calibration observations can be found by means of the
CALSELECT command. This command makes use of the Observation Type code, to
find observations of a specified type within a specified number of days before
and after the selected observations of the input table. The syntax is:

{\tt CALSELECT[/qualifiers] [keyword.ro.value[,keyword.ro.value[,...]]]}

Valid keywords are {\tt DAY{\us}LIMITS}, {\tt WINDOW} and {\tt OBS{\us}TYPE};
the keywords DAY{\us}LIMITS and WINDOW are specific to CALSELECT only.
DAY{\us}LIMITS, specifies the time window in days to be searched around the
date of each observation, while WINDOW specifies the maximum number of 
calibrations to be selected with each observation, according to:

{\tt DAY=(n,m)}, where {\tt n} and {\tt m} are the number of days before, and
after, or

{\tt DAY=n}    , where {\tt n} is a window in days, centred on the date of 
                 observation.

Similar use of WINDOW applies: {\tt WINDOW=(n,m)} or {\tt WINDOW=n}.

The default for DAY{\us}LIMITS=(7,7); the default for WINDOW=(10,10). The 
default selection of the observation type code OBS{\us}TYPE, is {\tt >} 10, 
which 
indicates calibration observations. In practise it is often better to search
more specifically for selected calibrations, and override the defaults by
explicitly specifying the keywords.

If the input table for the CALSELECT command contains more than 100 entries
ARCQUERY will prompt the user to confirm the action.
The execution of this command can involve a lot of table handling operations
and sorting, and therefore may take some time to complete.


\begin{table}[t]
\centering
\footnotesize
\caption{Observations Catalogue keywords for use in SELECT command}
\label{tbla1} \vspace{0.3cm}

\begin{tabular}{|l|l|c|} \hline
 & & \\
Keyword & Description & Note \\
 & & \\ \hline
 & & \\
RA  &   right acsension & \\
DEC &   declination & \\
CE[LL{\us}NO]   &  celestial (equatorial) cells in range 1-6450 & 1\\
GALO[NGITUDE]&  galactic longitude & \\
GALA[TITUDE] &  galactic latitude  & \\
ECLO[NGITUDE]&  ecliptic longitude & \\
ECLA[TITUDE] &  ecliptic latitude  & \\
PO[SITION]   &  celestial position for search in circular area & 2 \\
             &  (long,lat,radius) in default coordinate system & \\
BOX          &  celestial position for search in rectangular area & 2 \\
             &  (long,lat,width,height) in default coordinate system & \\
EQP[OSITION] & equivalent to POS/EQ & 2 \\
EQB[OX]      & equivalent to BOX/EQ & 2 \\
ECP[OSITION] & equivalent to POS/EC & 2 \\
ECB[OX]      & equivalent to BOX/EC & 2 \\
GAP[OSITION] & equivalent to POS/GA & 2 \\
GAB[OX]      & equivalent to BOX/GA & 2 \\
OBSE[RVATORY]   & observatory & 4 \\
TE[LESCOPE]     & telescope   & 4 \\
INS[TRUMENT]    & instrument  & 4 \\
DET[ECTOR]      & detector    & 4 \\
PH[OTO{\us}SYSTEM] & photometric system & 4 \\
WAVEB[AND]      & photometric wavelength band (filters) & 4 \\
PO[LARISATION]  & polarisation& 4 \\
OBJE[CT{\us}NAME]& object identifier; spaces specified in object{\us}name& 3 \\
                & are considered significant, spaces in the names of& \\
                & the Observations Catalogue are not!& \\
OBJ{\us}[TYPE]    & object type code in range 1-255 & 5 \\
OBS{\us}[TYPE]    & type of observation & 6 \\
INI[TIALS]     & observers & 3 \\
DA[TE]         & observing date & \\
TI[ME]         & observing time & \\
N[IGHT]        & observing night & 2 \\
EXPO[SURE]     & duration of observation & \\
Z[ENITH{\us}DIST] & zenith distance & \\
WAVEL[ENGTH]   & any wavelength in the band & \\
ST[-WAVELENG]  &  the lower boundary of the band & \\
EN[D-WAVELENG] &  upper boundary of the band & \\
SE[EING]       & seeing code       & 7 \\
SK[Y{\us}QUALITY] & sky quality code  & 7 \\
PA[TT{\us}NO]     & PATT-allocation number & 3 \\ 
PR[OPRIETARY]  & length of proprietary period; default 365 & \\
EXPI[RATION]   & the expiration date of the proprietary period & 2 \\
                    & (date of observation plus proprietary period)&  \\
RED[UCED]=YES\,/\,NO\,/\,[\wildcard]& reduction status; default: any & \\
LI[NE{\us}NO]     & line number of catalogue items in current table & 2 \\
& & \\ \hline
\end{tabular}
\vspace{0.2cm}
\scriptsize 

\begin{tabular}{llll}
Notes: & 1 & see Table~\ref{tblcells} & \ \hspace{5.0cm}\  \\
& 2 & quantity derived from other catalogue item(s) & \\
& 3 & wildcard(s) (\wildcard\  and \%) are allowed & \\
& 4 & wildcard(s) NOT allowed & \\
& 5 & see Table~\ref{tblobjtype}& \\
& 6 & see Table~\ref{tblobstype}& \\
& 7 & see Table~\ref{weather}& \\
\end{tabular}
\end{table}
\vfill

\begin{table}[t]
\centering
\caption{Sky-cell centres of the Position Index} \label{tblcells}
\vspace{0.5cm}

\begin{tabular}{|rcr|r||rrr|r|rrr|} \hline
 & & & & & & & & & & \\ 
% first line of header
\multicolumn{4}{|c||}{$\alpha =\alpha_0 +j\times\Delta\alpha,\ j=0,\ldots(n-1)$}&
\multicolumn{3}{|c|}{$\delta \ge 0\degree $} & 
\multicolumn{1}{c|}{$\mid\delta\mid$} &
\multicolumn{3}{|c|}{$\delta \le 0\degree $} \\
 & & & & & & & & & & \\
% second line of header
\multicolumn{1}{|c}{$\alpha_0$} & & \multicolumn{1}{c|}{$\Delta\alpha$}&
\multicolumn{1}{c||}{$n$} &
zone & \multicolumn{2}{c|}{Cells} & & \multicolumn{2}{c}{Cells} & zone \\
 & & & & & & & & & & \\ \hline
         &       &        &    &    &     &     &         &     &     &   \\
180.00000&+ j \ml&360.0000&   1&  00&    0&    0& +90.0000& 6449& 6449& 64\\
 22.50000&+ j \ml& 45.0000&   8&  01&    1&    8& +87.1875& 6441& 6448& 63\\
 11.25000&+ j \ml& 22.5000&  16&  02&    9&   24& +84.3750& 6425& 6440& 62\\
  5.62500&+ j \ml& 11.2500&  32&  03&   25&   56& +81.5625& 6393& 6424& 61\\
         &       &        &    &    &     &     &         &     &     &   \\
  5.62500&+ j \ml& 11.2500&  32&  04&   57&   88& +78.7500& 6361& 6392& 60\\
  2.81250&+ j \ml&  5.6250&  64&  05&   89&  152& +75.9375& 6297& 6360& 59\\
  2.81250&+ j \ml&  5.6250&  64&  06&  153&  216& +73.1250& 6233& 6296& 58\\
  2.81250&+ j \ml&  5.6250&  64&  07&  217&  280& +70.3125& 6169& 6232& 57\\
         &       &        &    &    &     &     &         &     &     &   \\
  2.81250&+ j \ml&  5.6250&  64&  08&  281&  344& +67.5000& 6105& 6168& 56\\
  2.81250&+ j \ml&  5.6250&  64&  09&  345&  408& +64.6875& 6041& 6104& 55\\
  2.81250&+ j \ml&  5.6250&  64&  10&  409&  472& +61.8750& 5977& 6040& 54\\
  1.40625&+ j \ml&  2.8125& 128&  11&  472&  600& +59.0625& 5841& 5976& 53\\
         &       &        &    &    &     &     &         &     &     &   \\
  1.40625&+ j \ml&  2.8125& 128&  12&  601&  728& +56.2500& 5721& 5840& 52\\
  1.40625&+ j \ml&  2.8125& 128&  13&  729&  856& +53.4375& 5593& 5720& 51\\
  1.40625&+ j \ml&  2.8125& 128&  14&  857&  984& +50.6250& 5465& 5592& 50\\
  1.40625&+ j \ml&  2.8125& 128&  15&  985& 1112& +47.8125& 5337& 5464& 49\\
         &       &        &    &    &     &     &         &     &     &   \\
  1.40625&+ j \ml&  2.8125& 128&  16& 1113& 1240& +45.0000& 5209& 5336& 48\\
  1.40625&+ j \ml&  2.8125& 128&  17& 1241& 1368& +42.1875& 5081& 5208& 47\\
  1.40625&+ j \ml&  2.8125& 128&  18& 1369& 1496& +39.3750& 4953& 5080& 46\\
  1.40625&+ j \ml&  2.8125& 128&  19& 1497& 1624& +36.5625& 4825& 4952& 45\\
         &       &        &    &    &     &     &         &     &     &   \\
  1.40625&+ j \ml&  2.8125& 128&  20& 1625& 1752& +33.7500& 4697& 4824& 44\\
  1.40625&+ j \ml&  2.8125& 128&  21& 1753& 1880& +30.9375& 4569& 4696& 43\\
  1.40625&+ j \ml&  2.8125& 128&  22& 1881& 2008& +28.1250& 4441& 4568& 42\\
  1.40625&+ j \ml&  2.8125& 128&  23& 2009& 2136& +25.3125& 4313& 4440& 41\\
         &       &        &    &    &     &     &         &     &     &   \\
  1.40625&+ j \ml&  2.8125& 128&  24& 2137& 2264& +22.5000& 4185& 4312& 40\\
  1.40625&+ j \ml&  2.8125& 128&  25& 2265& 2392& +19.6875& 4057& 4184& 39\\
  1.40625&+ j \ml&  2.8125& 128&  26& 2393& 2520& +16.8750& 3929& 4056& 38\\
  1.40625&+ j \ml&  2.8125& 128&  27& 2521& 2648& +14.0625& 3801& 3928& 37\\
         &       &        &    &    &     &     &         &     &     &   \\
  1.40625&+ j \ml&  2.8125& 128&  28& 2649& 2776& +11.2500& 3673& 3800& 36\\
  1.40625&+ j \ml&  2.8125& 128&  29& 2777& 2904& +08.4375& 3545& 3672& 35\\
  1.40625&+ j \ml&  2.8125& 128&  30& 2905& 3032& +05.6250& 3417& 3544& 34\\
  1.40625&+ j \ml&  2.8125& 128&  31& 3033& 3160& +02.8125& 3289& 3416& 33\\
         &       &        &    &    &     &     &         &     &     &   \\
  1.40625&+ j \ml&  2.8125& 128&  32& 3161& 3288&  00.0000& 3161& 3288& 32\\
         &       &        &    &    &     &     &         &     &     &   \\
\hline
\end{tabular}
\vspace{0.5cm}

The height $\Delta\delta$ of the declination zones is 2.$\!\!\degree$8125.
\end{table}

%\clearpage
\newpage
\section{Table handling} \label{TAB}

\subsection{Combining tables with UNION (U)} \label{UNI}

Up to eight input tables may be combined into one new output table: UNION will
select the observations which appear in either of the input tables. For example:

{\tt UNION/INP=(a1,b1,\ldots)[/OUT=tablename]}

The default output table name derives from the first input table
name provided; in the example it would be `A2' if the output table was
not specified.

The UNION function can also be performed by the SORT command (see 
section~\ref{SOR})>

\subsection{Combining tables with INTERSECTION (I)} \label{INT}

Up to eight input tables may be combined into one new output table:
INTERSECTION selects the observations common to all input tables. Format is
similar to the union function:

{\tt INTERSECTION/INP=(a1,b1,\ldots)[/OUT=tablename]}

\subsection{Combining tables with DIFFERENCE (DI)}  \label{DIF}

Two input tables are combined into a new output table:
DIFFERENCE select the items common contained in only one of the (two) input
tables, \eg :

{\tt DIFF/INP=(A1,B1)} 

which results in output table A2 = A1 - B1.


\subsection{Rename an existing table: RENAME (REN)} \label{REN}

This command is used when the user decides to deviate from the default naming
convention and did not specify the desired output table name by using the
/OUTPUT{\us}TABLE qualifier in one of the other commands.

{\tt RENAME/OUT=newname[/INP=oldname]}

If the {\tt INPUT{\us}TABLE} qualifier is not given, the default table will be 
renamed; however, the Observations Catalogue cannot be renamed.

\subsection{Delete an existing table: DELETE (DEL)} \label{DEL}

This command will remove an existing query table and all its associated
other tables, \eg LIST file(s), from the disk. It is recommended
to use the DELETE function to remove, in particular, large tables if they are
no longer needed, and thus free disk space of the captive account for
the user's own further usage, and also for other archive users.

{\tt DELETE/INP=tablename}

In interactive mode ARCQUERY will prompt for confirmation of the 
DELETE operation on a table.

%\subsection{Retrieve output from a server session: RETURN{\us}TABLE (RET)}
%
%This command retrieves a table, produced by an ARCQUERY session run in server
%mode at the location of the Master Archive, into the user's local ARCQUERY
%context. RETURN{\us}TABLE cannot be used on the captive account, and in server 
%mode is only useful if the user has a local (at the user's site) version of 
%the ARCQUERY software available, which in most cases will not be the case. 
%See ING User Manual {\rm XIX} for details.
%
%The only qualifier allowed is {\tt /INPUT{\us}TABLE} ; if it is not specified
%the default input table will be used.

\newpage
\section{Listing and showing information}%: LIST, TYPE, SPOOL, SHOW}

\subsection{Produce a formatted list of selections: LIST (L)} \label{LIS}

This command allows the user to list the catalogue items of a query table in a
specified combination, order and format.

{\tt LIST[/qualifiers] [list string]}

with the syntax of the list string:

{\tt [constant,]keyword[/key-qualifiers][,[constant,]keyword
[/key-qualifiers][,..]]}

A {\tt keyword} indicates a catalogue item to be listed; all items on which
the SELECT command (section~\ref{SEL}) can act can be listed 
(except {\tt LINE}). Generic position 
keywords, such as {\tt POS}, {\tt GAPOS}, \etc, are allowed in the list string.
Constants may be used to make a list more readable, for example:

{\tt LIST "RA=",RA,"DEC=",DEC, \etc}. 

If the specified list contains more than 1000 records, ARCQUERY will prompt
for confirmation. A (long) list can be interrupted with {\tt CTRL/C}; the
display on the VDU can be suppressed with {\tt CTRL/L}, but if, for instance,
the {\tt /FILE} qualifier is used, the list file will be completed.


Some specific qualifiers for the LIST command are:

\begin{itemize}
\item {\tt /FILE}, indicating whether a list file should be created;
      default: {\tt /NOFILE}.
\item {\tt /SPLIT}, indicating whether lines, longer than the page width in 
       a print file will be split over as many pages as needed;
       default: {\tt /SPLIT}, unless {\tt /TRUNCATE} is specified.
\item {\tt /TRUNCATE}, indicating that lines longer than the page width will 
       be truncated; default {\tt /NOTRUNCATE}.
\item  If both {\tt /NOSPLIT} and {\tt /NOTRUNCATE} are specified, lines are 
       continued on the same page (next line) and a blank line is inserted 
       before each item.
\end{itemize}


\begin{table}
\centering
\caption{Default representation of keyword values in (COUNT) lists}
\label{tbla3} \vspace{0.3cm} \small

\begin{tabular}{|l|c|c|c|c|r|r|} \hline
              &      &       &      &         &            &          \\
Keyword       &Decode&values & Width&decimals & unit/format& interval \\
              &      &       &      &         &            &          \\ \hline
OBSERVATORY   &  yes &       &    6 &         &            &          \\
TELESCOPE     &  yes &       &    6 &         &            &          \\
INSTRUMENT    &  yes &       &    6 &         &            &          \\
DETECTOR      &  yes &       &    6 &         &            &          \\
PHOTO{\us}SYSTEM  &  yes &       &    6 &         &            &          \\
WAVEBAND      &  yes &       &    6 &         &            &          \\
POLARISATION  &  yes &       &    6 &         &            &          \\
LONGITUDE     &      &       &   11 &       1 &         MS &   15~DEG \\
              &      &       &    9 &       5 &    DECIMAL &          \\
LATITUDE      &      &       &   11 &       1 &         MS &   15~DEG \\
              &      &       &    9 &       5 &    DECIMAL &          \\
RA            &      &       &   11 &       1 &         MS &     1~HR \\
              &      &       &    9 &       5 &    DECIMAL &          \\
DECLINATION   &      &       &   11 &       1 &         MS &   15~DEG \\
              &      &       &    9 &       5 &    DECIMAL &          \\
ECLONGITUDE   &      &       &    9 &       5 &    DECIMAL &   15~DEG \\
              &      &       &   11 &       1 &         MS &          \\
ECLATITUDE    &      &       &    9 &       5 &    DECIMAL &   15~DEG \\
              &      &       &   11 &       1 &         MS &          \\
GALONGITUDE   &      &       &    9 &       5 &    DECIMAL &   15~DEG \\ 
              &      &       &   11 &       1 &         MS &          \\
GALATITUDE    &      &       &    9 &       5 &    DECIMAL &   15~DEG \\
              &      &       &   11 &       1 &         MS &          \\
ZENITH{\us}DIST   &      &       &    6 &       0 &        DEG &    1~DEG \\
CELL{\us}NO       &      &       &    6 &         &            &        1 \\
OBJ{\us}TYPE      &   no &     4 &    6 &         &            &          \\
OBS{\us}TYPE      &   no &       &    6 &         &            &          \\
DATE          &      &       &    9 &         &      YYDDD &          \\
EXPIRATION    &      &       &    9 &         &      YYDDD &          \\
PROPRIETARY   &      &       &    6 &         &       DAYS & 365~DAYS \\
TIME          &      &       &   10 &       0 &        HMS &     1~HR \\
              &      &       &    7 &       4 &         HR &          \\
EXPOSURE      &      &       &    6 &       0 &        SEC &     1~HR \\
              &      &       &   10 &       0 &        HMS &          \\
SKY{\us}QUALITY   &   no &       &    6 &         &            &          \\
SEEING        &   no &       &    6 &         &            &          \\
REDUCED       &      &       &    6 &         &            &          \\ \hline
\end{tabular}
\vspace{0.2cm}

\footnotesize
The table is not complete with respect to the LIST command. Use Help for more
information.
\vspace{5.0cm}

\end{table}


Table~\ref{tbla3} specifies the default representation of the various items in
the Observations Catalogue. However, the user may control the list format of 
every individual item by using key-qualifiers with the keywords in the list 
string:

\begin{itemize}
\item {\tt /[NO]DECODE} to determine whether the item is listed in the coded 
      form, in which it occurs in the Observations Catalogue, or in a
      decoded form.
\item {\tt /NRVALUES=} to specify the number of values to be listed, when 
       applicable.
\item {\tt /UNIT=}  to determine the units to be used.
\item {\tt /WIDTH=}  to specify the total width of the list item field.
\item {\tt /NRDECIMALS=} to specify the number of decimals to be displayed.
\item {\tt /DATE{\us}FIELD=} to specify the list format of the date, if it 
      has to differ from the default {\tt DD-MMM-YY} format; options are:
      {\tt DAY} (of the month only), {\tt MONTH}, {\tt YEAR}, {\tt WEEKDAY},
      {\tt YYDDD}, {\tt YMD (YY/MM/DD)} and {\tt MDY (MM/DD/YY)}.
\end{itemize}

The key qualifiers {\tt /COORD=}, {\tt /EQUIN=}, and {\tt /FORMAT}
have the same effect as if used as command qualifiers (see table~\ref{tblI}).

\subsection{Display list files: TYPE, PRINT and SPOOL (T, P, SP)}\label{TYP}

List files, created using the {\tt /FILE} qualifier with 
the SELECT and LIST commands,
may be displayed on the terminal, on a hardcopy device or output via E-mail. 

Print files will automatically be spooled to the default output device when 
exiting ARCQUERY; for a remote login on the captive account, the file will be
mailed by default to the users E-mail address. A specific print-queue may be 
indicated by means of the /QUEUE qualifier. The E-mail option is explicitly 
selected by using the /MAIL qualifier.


\subsection{Show general information: SHOW (SH)} \label{SHO}

At any point in an ARCQUERY session the SHOW command may be used to obtain
either specific or general information. The syntax of the command is:

{\tt SHOW[/qualifiers] [keyword[.ro.value-set][,....],}

where the only relational operators allowed are `{\tt =}' and `{\tt <>}'. 

The following rules apply:
If {\tt keyword} is specified as {\tt *}, all values are shown;
if {\tt keyword} is specified without relation or value, a default will
be used; and if the command is used without keywords, just: {\tt SHOW}\ \ ,
the keywords DEFAULTS and TABLES will be shown.

Information is available about:
%(default shown in []; "." indicates current table
%or requests made in this session):

\begin{itemize}
\item ADDRESS{\us}INFO\ (default {\wildcard}), the user's address information.
\item CODE{\us}GROUPS\ \ (default {\wildcard}), codes and descriptions of
 coded catalogue items.
\item DEFAULTS         (default {\wildcard}), the current (\ie not initial) 
 default values.
\item REQUESTS         requests made in this or any previous session (the status
 of a request is visible until 30 days after its processing).
\item SYMBOLS          the values of any user-defined symbols.
\item TABLES           tables created so far and by what logic (default: the
 current table).
\item UNITS            (default {\wildcard}), units supported by ARCQUERY.
\item USERS,           Names, addresses, \etc of registered archive users (see
 section~\ref{ADD}).
\end{itemize}

\newpage
\section{Requesting data or action from archive operators}

\subsection{Make requests: REQUEST (REQ)} \label{REQ}

This command allows the user to make a request to the archive manager. The
request will be stored in a queue at the archive site. The archive
manager must grant every request before execution, in order to protect 
proprietary rights to the observations, to avoid confusion of address 
information of archive users, or sometimes to control the number of operator 
actions, for example in the case of an exceptionally large request for data. 
In all instances the user will be informed of the
completion of a request by electronic mail, if a mail address has been
provided. The result of the processing (\eg a FITS tape) will be sent to the
user; in the case of a small number of observations, not more than about 20,
it may be possible to store the data in an anonymous FTP account (depending
on available disk space), which could be accessed directly by the user.

The syntax of the command is:

{\tt REQUEST/qualifier[/qualifier]}

The first qualifier is compulsory, because it defines the type of request:

\begin{itemize}
\item
{\tt /OUTPUT{\us}TYPE=FITS} : dearchive observations listed in the (default or 
 specified) input table onto a FITS tape, which will be mailed to the requestor.

\item
{\tt /OUTPUT{\us}TYPE=DATABASE} : dearchive observations and write requested
 data into a packet database a the archive site. These data can be accessed by
 a special set of programmes; do {\tt HELPARC ARCDB} for details. This
 option may, at the moment, only be of use to local archive users.

\item
{\tt /ADDRESS{\us}INFO} :  enter or modify address information 
 (section~\ref{ADD}) in the file of archive users.

\item
{\tt /RESTORE} : restore data files of secondary Observations Catalogue
 information from tape or optical disk. This option will become 
 active only if some secundary information with the Observations Catalogue
 has been stored on tape or optical disk by the archive operators (to free
 disk space). The request will after some time (\eg a day) make that information
 accessible again. Note that
 the Observations Catalogue itself, and the indexes are always on-line.

\item
The {\tt /DELETE=(date-of-request,time-of-request)} can be used to delete
a request from the archive manager's request queue, as long as the request 
has not yet been executed. Similarly, {\tt /UNDELETE=(d-o-r,t-o-r)} restores
an delete request to the queue. {\tt /DELETE} and {\tt /UNDELETE} can not be 
used in combination with other qualifiers.

\end{itemize}


The {\tt /COMMENT} qualifier allows the user to supply information which may
be important for the archive manager or operator to know, \eg a preference
for a particular kind of tape (DAT or EXABYTE), or an explanation of a
request including protected data, \etc
Comments are entered very similarly to typing a VAX/VMS mail message
(either in line-mode or using an editor, /EDIT or /TPU). {\tt CTRL/Z} ends the
comments in line-mode. Default is {\tt /COMMENT/NOEDIT/NOTPU}. 
The prompt for comments is suppressed with {\tt /NOCOMMENT}.

The status of a request can be queried by means of the {\tt SHOW REQUESTS}
command (see section~\ref{SHO}) until 30 days after processing by the
archive manager (completion or rejection).


\subsection{Enter/modify address information: ADDRESS{\us}INFO (A)} \label{ADD}

An inventory of archive users with their full names, addresses, institutes,
and E-mail addresses is maintained by the archive data-base software. 
This information is used by the archive operator to send de-archived data 
to a requester, and to safeguard the 
rights to exclusive use of the data during the proprietary period (by the
original owner/observer).

The ADDRESS{\us}INFO function allows the user to define address items,
either by using the proper keywords in command mode, or in a menu mode. 
The completed
information is submitted to the manager with a REQUEST/ADDRESS command; it
is entered into the data base only after granting of the request.

The address information is uniquely connected with the ARCQUERY user's
initials provided on login. If no address is known for the user initials
provided on login, a message will appear to that effect; if the address is
known on login, the address information can be retrieved for inspection by
the user. In that case, modification of information is possible, and can again
be submitted to the archive manager for granting, if wanted. See 
section~\ref{re:address} for applications.

If a request for data will be made, a minimum of address information of 
the requestor is required, either from the users data base, or
provided with the REQUEST/ADDRESS{\us}INFO function in the same
ARCQUERY session.

In order to enter new, or modify existing, address values with command 
keywords, use:

{\tt ADDRESS{\us}INFO[/qualifiers] [keyword[=value][,keyword=[value][,...]]]}

If a value contains special characters (such as commas), the value must be 
enclosed in quotation marks ({\tt "}).

Alternatively, one can use the interactive mode by not giving any keyword:

{\tt ADDRESS{\us}INFO[/qualifiers]} 

A `menu' session is entered in which the current address-item values are shown
one by one. The values can be modified by entering a new value. Enclosing 
values in quotation marks is not necessary in this case. A null-answer 
({\tt <CR>}) will retain the old value. A blank answer ({\tt " "})  will set the
value to blank (undefined). {\tt CTRL/Z} terminates the menu mode.


Existing information in the user data base can be recalled with:
{\tt ADDRESS{\us}INFO keyword=*}.
This command will overwrite the existing, previously defined, information.

Unless the command is accompanied by the {\tt /NOREQUEST} qualifier, a request 
to the archive manager will be issued to enter the (modified) information into
the archive user data base (equivalent to {\tt REQUEST/ADDRESS}, see 
section~\ref{REQ}. The {\tt /NOREQUEST} option is useful to change part of 
the user's address temporarily for the current access of the archive only.
Actually, the {\tt /NOREQUEST} option is recommended throughout; submit
a request only if the address information is completely and accurately defined.

Information can be set for a number of keywords; the address information is
split in information about the user's (home) institute and the user's personal
information. Note that several 
address items are compulsory, no data will be released, and indeed no
request can be made, without that information being provided:

\begin{tabular}{ll}
%\multicolumn{2}{c}{User Information} \\
   NAME          & the full name of the user (compulsory)\\
   INSTITUTE     & the name of the user's institute (compulsory)\\
   USERNAME      & the user's computer account name (compulsory)\\
   HOST          & the system node name (may be blank)\\
   PHONE{\us}EXT & the user's telephone extension (if appropriate) \\
                 & \\
%\multicolumn{2}{c}{Institute Information} \\
   INSTNAME      & institute name (compulsory)\\
   SUBNAME       & any additional description \\
   ADDRESS       & (required by REQUEST command)\\
   TOWN{\us}POSTCODE{\us}DISTRICT &      (required by REQUEST command)\\
   COUNTRY       & (required by REQUEST command)\\
   TELEPHONE     & the institute's telephone number\\
   TELEFAX       & \etc  \\
   TELEX         & \etc  \\
   MAIL{\us}ADDRESS  & generic E-mail address of the institute (compulsory)\\
\end{tabular}

The archive data base includes a list of institutes. If the user is located 
at an institute already known to the archive, entered earlier by someone else,
\eg by the archive manager, then only the pure user information has to
be provided. Only if an unknown institute name is given, the user will be
prompted for further information about his institute. 

The keyword {\tt MAIL{\us}ADDRESS} defines the generic E-mail address of
the user's institute. It has the form of a normal E-mail address, but with
the username replaced by the string {\tt "<user>"} and a name {\tt "<host>"}
added to the principal
node specification. ARCQUERY substitutes the given username and
the host name into these fields in order to obtain the users E-mail address. 
Thus, users at the same institute need only to give their username and node 
name, where the node name may not even be necessary, and can be blank 
({\tt " "}). 

It should be mentioned that the archive manager will often
replace an E-mail address provided, because the archive, using 
the local mail facility, necessarily works with the local E-mail
protocol, which may be quite different from the one at the user's site. 

For convenience, two `virtual institute' names: INTERNET and BITNET
have been installed, which can be used for registration via the mailserver,
or in general, if a user cannot figure out how to go about it; see 
section~\ref{re:address}.

More information about the ADDRESS{\us}INFO keywords can be found in the
help facility; in particular, {\tt HELP ADDRESS MAIL} will provide additional
information about the institute mail address. 

\subsection{Modification of Catalogue entries: MODIFY{\us}REQUEST (MO)}
\label{MOD}

This command allows an archive user to prepare corrections to the Observations
Catalogue. The value of any catalogue item can be modified. A request will be 
sent to the archive manager for authorization, in the same way as the REQUEST 
command sends requests. The modify facility is used by the archive manager for
the ongoing exercise of catalogue maintenance (see section~\ref{secedit}).

{\tt modify[/qualifier[/qualifier]]  
[keyword=newvalue[,keyword=newvalue,\ldots]]]}

MODIFY{\us}REQUEST can be used in 2 modes:
\begin{itemize}
\item {\bf bulk mode.}   The modifications are specified directly with the 
command as new values for the given keyword. All observations in the input 
table (default, or explicitly specified) will be requested to be modified 
accordingly. If the {\tt /LINE{\us}NO} qualifier is used, only the corresponding
(one) observation will be modified.

\item{\bf menu mode.}  The keyword field is left empty. ARCQUERY will
sequentially display each observation of the input table, and prompt for
modifications. The information shown of each observation is determined by 
the (default) list string.
Each individual observation can have (a) different modification(s)
specified in this way. If {\tt <CR>} is pressed, the observation is not 
modified, and the next line is displayed.

The user can jump to another line in the table with
the {\tt /LINE{\us}NO=n} qualifier. If the {\tt /LINE{\us}NO} qualifier is given 
with the command itself, the prompting will start at that specified line
(by default it starts at the first observation).

Exit from menu mode is done by typing {\tt CTRL/Z}; 
{\tt CTRL/C} can be used to cancel the menu mode and the request.
\end{itemize}

The {\tt /[NO]COMMENT} qualifier can be used to specify if you want or do 
not want to give comments explaining your request. The comments can be given in 
line-mode or in editor-mode via the qualifier /EDIT or /TPU.
(Similar to the MAIL{\us}COMMENT command). Typing {\tt CTRL/C} cancels the request
in either mode. Note that on the mailserver you can only use line-mode; the
last line of the comment must then consist of the string: `{\tt CTRL/Z}'.
Default is {\tt /COMMENT/NOEDIT/NOTPU}.

{\bf Keywords}

Modifications can be specified for nearly all catalogue items of an observation
(see Table~\ref{tbla1}; except {\tt CELL, BOX, NIGHT, EXPIRATION, LINE}, and,
obviously, {\tt FITS{\us}TAPE} and {\tt FITS{\us}FILE}).
Most modifications are made straightforwardly by specifying a new value for
the keyword, \eg :

{\tt MODIFY/INP=3A/NOCOM DATE=3-JAN-1993, INI=EJZ, INST=PRIME}

For more details about the MODIFY function, the user is referred to the on-line
HELP facility (type: {\tt HELP MODIFY}).

%\newpage
\section{Miscellaneous commands}

\subsection{Sort selections: SORT (SO)}\label{SOR}

This command sorts 1 to 8 input tables in ascending or descending order of one
or more keywords. The first keyword determines the primary order.

{\tt SORT[/qualifiers] keyword[/ASC][/DESC][,...]}

In order to prevent unexpected long sorts, ARCQUERY will prompt for confirmation
if more than 1000 records are to be sorted. 

Sorting may be done on up to 26 different Observations Catalogue 
keywords (see table~\ref{tbla1}). The qualifiers {\tt /ASCENDING} (default)
and {\tt /DESCENDING} can be command qualifiers as well as keyqualifiers. In the
first case they apply to all keywords, in the latter case they apply to one
keyword only. The command qualifier determines the default sorting order for all
keywords which are not explicitly qualified differently.

Up to eight input tables may be specified with the {\tt /INPUT{\us}TABLE} 
qualifier. They will be sorted into one output table (specified by 
{\tt /OUTPUT{\us}TABLE}, or derived from the
name of the first-mentioned input table, see HELP information on ARCQUERY
TABLE{\us}NAMES or section~\ref{TAB}). If performed on more than one input 
table the
SORT command is almost equivalent to the UNION command (see section~\ref{UNI}).


\subsection{Produce simple statistics: COUNT (CO)} \label{COU}

This command allows the user to count records in a table (the Observations
Catalogue itself, or a table obtained by a selection process) in
intervals of up to two specified parameters. 

{\tt COUNT[/qualifiers] 
keyword[/key{\us}qualifiers][,keyword[/key{\us}qualifiers]}

The output consists of header information (giving names or intervals) and
details (containing the counts). Table~\ref{tbla3} shows how various
Observations Catalogue keywords will be represented by default.
The qualifiers allowed with the COUNT command may be found in 
tables~\ref{tbl1}, \ref{tbla6} and~\ref{tbla7}.
Many of the key-qualifiers have the same function as they have in
the LIST command (see section~\ref{LIS}). 

The key-qualifier 
{\tt /DATE{\us}FIELD} operates in a slightly different manner. 
It defines the way dates will be counted, as follows:

\begin{tabular}{llll}
  DAY     & count per day of month  & (1      & - 31) \\
  MONTH   & count per month         & (JANUARY& - DECEMBER)\\
  YEAR    & count per year          & (1950   & - 2049)\\
  WEEKDAY & count per weekday       & (MONDAY & - SUNDAY)\\
  YYDDD   & count per day of year   & (1 JAN  & - 31 DEC)   (Default)\\
\end{tabular}

{\tt /DECODE} determines whether coded information in the Observations Catalogue
(see section~\ref{SEL} and \eg table~\ref{tblobjtype}) will be listed in coded
or the decoded form. {\tt /INTERVAL} and {\tt /UNIT} define the count interval
and the units of the preceding keyword and override the default interval-size.


\subsection{Send mail to archive manager/operator: MAIL{\us}COMMENT (MA)}
\label{MAI}

The MAIL{\us}COMMENT command allows the user to send comments and remarks about
the archive data or the software to the archive manager. This function is
very similar to the VAX MAIL utility; however, the user's name and address 
will be inserted automatically as the first part of the message.

The user can enter the comments in two ways:
\begin{itemize}
\item By typing the message directly and ending it with {\tt CTRL/Z}.
\item By editing a file via an editor (EDT or TPU/EVE), which is subsequently
      mailed. This mode is selected with the qualifiers {\tt /EDIT} and
      {\tt /TPU} ({\tt /TPU} forces {\tt /EDIT}).  
\end{itemize}

Defaults are: /NOEDIT/NOTPU if /TPU is not given, or /EDIT if /TPU is given.

The qualifier {\tt /SELF} indicates that the mail message is also sent to the 
user's E-mail address. If {\tt /NOSELF} is set, the message is written into 
the log-file.


%\newpage
\section{Terminate an ARCQUERY session: EXIT (EX)}\label{EXI}

In order to terminate an ARCQUERY session, type:

{\tt EXIT[/qualifier[/qualifier[/\ldots]]]}

The two qualifiers of interest on the captive account and mailserver are
{\tt /[NO]SAVE} and {\tt /[NO]MAIL}. On EXIT the following actions are 
executed:

\begin{itemize}
\item All requests are sent to the archive manager.

\item If the {\tt /SAVE} qualifier is given, the session context 
  (\ie all tables and files) is saved (files are purged to
  their latest version); if {\tt /NOSAVE} is specified, all tables and files
  will be deleted; on the captive account, if neither qualifier is provided, 
  the user will be prompted for a decision. 
  The LOG-file of the session is always saved.
  In mailserver batchmode {\tt /NOSAVE} is the default.

\item All unspooled print files are spooled (see section~\ref{TYP}). Instead of 
  being routed to the local (RGO) printer the files may be mailed to the user
  (default in server mode). The usage of the {\tt /MAIL} qualifier forces E-mail
  output of existing print files.
  If a mailing fails, for instance because of network congestion, 
  it will be retried at hourly intervals for 24 hours; after that the archive
  manager will be alerted.

\item Statistics on archive usage are updated.

\item Depending on the access-mode of the ARCQUERY session a number of other 
  options may be carried out (see below).
\end{itemize}

If any of the above actions fails the {\tt /SAVE} qualifier is executed 
automatically,
so that the user can later reenter ARCQUERY, restore and try again. If ARCQUERY
is terminated in an abnormal fashion, \eg by time-out, {\tt CTRL/C} or
{\tt CTRL/Z}, the {\tt SAVE} qualifier is also forced.

Saving the context on exit allows the user to interrupt an ARCQUERY session 
and to continue it later, for instance after inspection of a (mailed) listing.
The existence of saved files and tables will be recognized when one starts a
subsequent query session. The user will then be asked to
restore or not the tables and files from the previous session (see 
section~\ref{secstart}).
\vspace{1.0cm}

{\bf NOTE:} remote access to the catalogue.

\label{remote}
The additional EXIT command qualifiers {\tt /[NO]MASTER{\us}SEND}, 
{\tt /[NO]OUTPUT{\us}PUT}, {\tt /[NO]ALL},\newline {\tt /[NO]RETURN{\us}TABLE}, 
{\tt /[NO]EDIT}, {\tt /[NO]TPU} and {\tt /IDENT=}, and also the separate
command RETURN{\us}TABLE, are not mentioned here, because they apply only to
remote access of the archive via the server from ARCQUERY software
installed at the user's site. This mode of access is outside the scope of
this User Manual; at the moment such access can only be made from the NFRA site
in Dwingeloo (the Netherlands). See the ING User~Guide~{\rm XIX} for details.


\clearpage

\newpage
\section{Syntax rules} \label{syntax}

\subsection{Unambiguous abbreviations, use of upper and lower case}

The execution of the ARCQUERY programme is controlled by user-provided 
commands (either from a VDU or with a mailserver file), consisting of a
command name, keyword names and qualifier names. Typing any unambiguous 
abbreviation of a name is allowed. Often the first two letters are
sufficient. An ambiguous or invalid choice results in a repeated prompt
when on the captive account; in server mode, the command will be ignored
and the next instruction will be processed.

User defined symbols (section~\ref{symbols}) may not be abbreviated unless 
they have been defined explicitely with an {\wildcard} at the position of 
abbreviation (DCL-fashion).

Both upper and lower case may be used when typing commands, qualifiers,
character strings, \etc Where necessary lower case is automatically converted
to upper case.


\subsection{Logical relations} \label{synrel}

Under several commands logical relations can or must be specified of the form:

{\tt keyword.ro.value[,keyword.ro.value[,.....]]} \hspace{2.0cm}, or

{\tt keyword.ro.value[.operator.keyword.ro.value[......]]}

Here {\tt .ro.} stands for a {\em relational operator}, and {\tt .operator.} 
stands for a {\em logical operator}. Arithmetic operators are not allowed. 

The six relational operators: {\tt =}, {\tt >}, {\tt >=}, {\tt <}, {\tt <=} or 
{\tt <>} (not equal), and their FORTRAN-like equivalents, can be used in the 
construction. In some cases only {\tt =} and {\tt <>} are allowed, 
\eg when there are only two or three values to choose from. Values specified 
with the operators {\tt =} and {\tt <>} can be single values, or may be a set 
of multiple values or a range of values (see section~\ref{synval}). A wildcard 
({\wildcard}), indicating `any' or `all', is allowed as a value with {\tt =}
and {\tt <>} (see section~\ref{synwild}).

Logical operators: {\tt .AND.}, {\tt .OR.}, {\tt .EQV.}, {\tt .NEQV. (.XOR)} 
and {\tt .NOT.}, where {\tt .AND.} may be replaced by `{\tt \&}' and {\tt .OR.}
by `{\tt |}', can be used to combine keyword constructions
into logical expressions. Table~\ref{operators} lists the allowed operators and
their order of evaluation in an expression. Parentheses can be used to alter 
the order of precedence. A comma in front of a keyword in the string
stands for a (logical) AND and may be replaced by {\tt .AND.}.  

\begin{table}[h]
\centering
\caption{Operators and their precedence} \label{operators}
\vspace{0.3cm}
\begin{tabular}{|ccc|c||ccccc|c|} \hline
 & & & & & & & & & \\
 \multicolumn{3}{|c|}{Relational}& Precedence &
 \multicolumn{3}{c}{Logical}& & & Precedence \\
 & & & & & & & & & \\ \hline
 & & & & & & & & & \\
 {\tt\ .EQ.} & or & {\tt =\ \ \ }   &  1 &
    {\tt .NOT.}&    &         &    &         & 2 \\
 {\tt .GT.} & or & {\tt >}   &  1 &
    {\tt .AND.}& or & {\tt \&}& or & {\tt ,\ \ } & 3 \\
 {\tt .GE.} & or & {\tt >=}  &  1 &
    {\tt .OR.} & or & {\tt |} &    &         & 4 \\
 {\tt .LT.} & or & {\tt <}   &  1 &
    {\tt .EQV.}&    &         &    &         & 5 \\
 {\tt .LE.} & or & {\tt <=}  &  1 &
   {\tt .NEQV.}& or &{\tt .XOR.}&  &         & 5 \\
 {\tt .NE.} & or & {\tt <>}  &  1  & & & & & & \\
 & & & & & & & & & \\  \hline
\end{tabular}
\end{table}



\subsection{Units, values, value-sets and value-ranges} \label{synval}

With many numeric values (\eg wavelengths) units may be specified. The
specified units will be converted into the ones used internally as long as
they belong to the same group of units. If no units are specified they are
assumed to be equal to the units in which the parameter is expressed inter-
nally. The units allowed may be shown interactively by means of the SHOW UNITS
command (see section~\ref{SHO}). In a value-range (see below) units can only be
given after the last value of the range (\eg {\tt 10 TO 100 ANG}).

In many places, usually with the operators {\tt =} and {\tt <>}, are allowed
not only single values but also value-sets and value-ranges.

{\em Value-sets} are strings of values, separated by commas and enclosed in 
parentheses. Blanks are allowed in value-sets, but not within numeric values;
blanks are not delimiters. Within value-sets a comma is equivalent to the
logical {\tt .OR.} when used with the {\tt =} operator, and equivalent to 
{\tt .AND.} when used with {\tt <>}.

{\em Value-ranges} can be specified in two ways:

\begin{tabular}{ll}
either with : & {\tt value1 TO value2 [BY value3]} \\
or with       & {\tt value4 UNC value5 [BY value3]} \\
\end{tabular}

where {\tt value1} and {\tt value2} are the limits of the range in the first 
expression and {\tt value4} is the centre and {\tt value5} the deviation from 
the centre in the second ({\tt value2} must be {\tt > value1}, {\tt value3} 
and {\tt value5} must be {\tt > 0}). In both cases {\tt value3} is an optional 
step value. The blanks before and after the words TO, BY and UNC are mandatory.
Meaningless ranges are not allowed, and the user will be told. One can often 
use the help facility to find what is allowed by entering a question mark.

Value ranges may be part of value sets. Frequently used, complicated, value
sets and -ranges may be predefined by a symbol; section~\ref{symbols}.


\subsection{Use of wildcards and blanks} \label{synwild}

A wildcard (`{\wildcard}') may be used in many places to indicate `any' or `all'
for numeric values. In alphanumeric values the wildcards (`{\wildcard}' or `\%')
may be used to replace part of the character string by any character. The 
difference between `{\wildcard}' and `{\%}' is that `{\wildcard}' can indicate
a character string of any length, including zero length, while `{\%}' stands for
one character only. For example, `{\%\%}A' indicates all three-character strings
with an A as last character, while `{\wildcard}A' may have any length, and 
includes `A' itself.

Wildcards may not be used in values of code items (table~\ref{tbla1}).

Blanks are not considered as delimiters. In many places they are ignored, in
numeric values they are not allowed. Blanks in alphanumeric values specified
by the user are considered significant, blanks in alphanumeric strings stored
in the Observations Catalogue are not. Thus, specifying a blank in an
alphanumeric string will find a match only if that blank is also present
in the catalogue item considered, whereas an alphanumeric string without blanks
will match a catalogue item even if the catalogue item does have a blank or 
blanks in it.


\subsection{Specification of dates} \label{syndate}

Dates or a range of dates may be specified in many different ways:

\begin{enumerate}
\item {\em relative} with respect to today's date: by a positive or a negative
       number of days with respect to today, or by using the words 
       {\tt Y[ESTERDAY]}, {\tt TOD[AY]} or {\tt TOM[ORROW]}.

\item {\em absolute} in the form {\tt DD-MM-YY} (day-month-year), where 
   `{\tt -}', `{\tt /}' and `{\tt :}' are acceptable delimiters (bearing in 
   mind that `{\tt -}' used as a minus sign takes precedence over its use as 
   a delimiter), while no delimiter is required
   when the month is specified by name (see below). If a part of the
   date is omitted, that part is assumed to be equal to the corresponding part
   in today's date: {\tt /3} is treated as MM=3 (DD and YY are the same as 
   today's), but {\tt -3} is treated as a relative date (3 days before today).
   In principle, wildcards ({\wildcard}) are allowed in any part of the 
   date specification string.

   {\tt MM} can be given numerically or by name. In the latter case an
   unambiguous set of first letters must be typed as a minimum (ja, f, mar, ap,
   may, jun, jul, au, s, o, n, d); no delimiters are required in this case.

   YY may be given with or without the century part; if 0$\le$YY$<$50, the
   year specification is read as YY=2000+YY; if 50$<=$YY$<$100, then YY=1900+YY.

\end{enumerate}


\subsection{Specification of time} \label{syntime}

Time is specified in the form {\tt HH:MM:SS}, where `{\tt -}', `{\tt /}' and
`{\tt :}' are acceptable delimiters. If any part of the time is omitted it is 
assumed to be equal to zero. HH is allowed to exceed 24, MM and SS may exceed
60, fraction are allowed in any part of the time specification. Time intervals
(ranges) bracketing midnight can be specified unambiguously. Units (HR, MIN,
SEC) may be specified if one does not like typing colons. The default unit is
HR when delimiters are used, otherwise it is SEC. Some examples:

{\tt ::3600} = {\tt :60} = {\tt 1:} = {\tt 1::} = {\tt 1\,HR} = 
{\tt 60\,MIN} = {\tt 3600\,SEC} = {\tt 3600}

{\tt 23:~TO~1:}\ \  is equivalent to :\ \ {\tt 23:~TO~23:59:59,~0:~TO~1:}

In order to facilitate the specification of observations of an entire night,
the special keyword NIGHT has been introduced, which allows specification of
(observing) nights, rather than a DATE range (see Table~\ref{tbla1}).

\begin{tabular}{ll}
For example:      & {\tt NIGHT=1MAR87} \\
is equivalent to: & {\tt DATE=1MAR87 \& TIME>12:00 .OR. DATE=2MAR87 \& 
                                                       TIME<=12:00} \\
                  &  \\
or: & {\tt NIGHT=1MAR87 TO 4MAR87} \\
is equivalent to: & {\tt DATE=1MAR87 \& TIME>12:00 | DATE=(2MAR87 TO 4MAR87)}\\
                  & {\tt | DATE=5MAR87 \& TIME<=12:00} \\
\end{tabular}

Thus, an observing night may be specified by its start date only.

\subsection{Specification of position} \label{synpos}

Right ascension (as well as ecliptic and galactic longitude) may be specified
as {\tt HH:MM:SS.sss} or as {\tt DD.dddd} (decimal degrees), declination (and 
ecliptical and galactic latitude) as {\tt DD:MM:SS.sss} or as {\tt DD.dddd}. 
If no unit is given, RA is assumed to be specified in hours, minutes, seconds 
and DEC in degrees, arcminutes, arcseconds. The hours, minutes and seconds 
(degrees, arcminutes, arcseconds) parts may contain a decimal point. 
Right ascension (longitude) intervals bracketing 24\,hrs (360\,degrees) may be
specified unambiguously. (Arc)minutes and (arc)seconds are allowed to 
exceed 60. Some examples:

for RA: {\tt 10:30:00} = {\tt 10.5:} = {\tt 157.5}\ ;\ \ for DEC:
{\tt 10:30:00} = {\tt 10.5:} = {\tt 10.5}

{\tt RA\,=\,345~TO~15\,DEG}\ \ is equivalent to\ \ {\tt RA\,=\,23:~TO~1:},\ \ and
also to\ \ \ {\tt RA\,=\,23~TO~24,~0~TO~1}.

Units (HR, MIN, SEC, DEG, ARCMIN, ARCSEC, RAD, etc.) may be used instead of
colons.

Note that the generic position keywords POS (EQPOS, GAPOS, ECPOS) and BOX
(EQBOX, GABOX, ECBOX) may be used to specify a position in any coordinate 
system with a search radius or a search rectangle (see also section~\ref{DEF} 
and section~\ref{SEL}). If a
BOX is specified in a SELECT command, the units of the given box width depend
on the coordinate system. However, the default unit for (maximum) radius and
for the (maximum) height of a box is always degrees.

The default list format of positions may be set by the command DEFAULT (see
section~\ref{DEF}) or by the qualifier /FORMAT (see Tables QU and KEY). The 
initial value of format is MS ({\hms}/{\dms}) for equatorial coordinates and 
DEG (decimal degrees) for ecliptic and galactic coordinates.


\section{User-defined symbols} \label{symbols}

Symbols can be used as alternative keyword names or as shorthand for frequently
used keyword constructions and logical expressions. A symbol can be defined at
any ARCQUERY prompt. For example, define at the ARCQUERY prompt the symbol ABC:

{\tt ABC = "SELECT/NOLIST/FILE"}

Then, the subsequent instruction: 

{\tt ABC OBJECT=N*4151*}\ \ is equivalent to:\ \ 
{\tt SELECT/NOLIST/FILE OBJECT=N*4151*}

At any ARQUERY prompt a symbol may be given as answer, if it makes sense,
that is. If a symbol is used as a value of a keyword it must be entered 
between apostrophes (DCL fashion).

The use of symbols can greatly simplify complex ARCQUERY command structures,
because many symbols can occur in the same line. In section~\ref{secsymbols}
some examples are presented in more detail. However, it should be kept in mind
that the ARCQUERY command parser simply substitutes the symbol value at the
position where it occurs in a string. Thus, the syntax of the command, after
substitution, must obey the syntax rules given in section~\ref{syntax}.
Further, the length of the command after substitution cannot exceed 512
characters.

Symbols may be preceded by {\tt NO} to negate their values. Symbol names
cannot be abbreviated, unless the symbol was defined with the VAX/VMS wildcard
({\wildcard}) in its name (DCL fashion), \eg after {\tt AB*C = \ldots }, 
{\tt AB} will have the same effect or value as {\tt ABC}. Note, however, that
a symbol name will always first be tried as an (abbreviated) keyword name;
thus, a symbol name identical to a keyword name is useless.

On the captive account, symbols may also be predefined in the User 
Initialization File (see section~\ref{secinit}).


\section{Table names} \label{tables}

The query software uses a table structure: a search of the Observations
Catalogue copies selected records, in similar format, into an output 
`query table', which itself becomes the input table for the next operation.

Most ARCQUERY commands operate on an input table and many produce an output 
table. In a simple (interactive) query session the user does not need to worry 
about table names because by default a simple numerical sequence will be used 
(see below). In more complicated sessions, however, the user can and indeed 
may have to specify input and/or output table names through the usage of the 
qualifiers /INPUT{\us}TABLE and /OUTPUT{\us}TABLE (see \eg section~\ref{SEL} and 
section~\ref{TAB}). An existing table can also be renamed (see 
section~\ref{REN}).

The following rules apply to the nomenclature of query tables:
\begin{itemize}
\item A table name is an alphanumeric string of up to 8 characters.
\item The default original input table is `0', \ie the Observations Catalogue.
\item The specification {\tt OUTPUT{\us}TABLE\,=\,0} is invalid.
\item The default input table is the output table of the previous operation
      (producing a new query table); the 
      default input table name is always shown before the ARCQUERY prompt.
\item The default output table derives from the input table name as follows:
      names ending with a number will have that number incremented by 1, while
      names ending with a character will have the next character substituted.
      Examples: \vspace{0.2cm}

\begin{center}
\begin{tabular}{cc}
 input table & default output table\\ \hline
  0 & 1 \\
  3 & 4 \\
 A1 & A2 \\
 1A & 1B \\
 2Z & 2AA \\ \hline
\end{tabular}
\end{center}
\end{itemize}

\clearpage
\end{document}
