DB_MERGE

COMMAND TYPE : JUNCTION

PURPOSE:

Merges the fields of two catalogues.

DESCRIPTION:

When the user has two catalogues with the same number of records or if one of these contains a pointer to the records of the other, he can select some fields from a catalogue and others from the second, blend them and create a new catalogue.

When the two catalogues have the same number of records (and a pointer is not defined) the fields can be merged on the records one to one. Otherwise a pointer must exists in the first catalogue that guides the merging of the data. Many DIRA commands can return pointers to the records of a catalogue (look at the %REC option ) and can be used for a successive merging.

INPUT FIELDS of the command:

Original: PDB Catalogue

The name of the first input catalogue. When the two catalogues have a different number of records this original catalogue must contain the pointer to the record number of the second catalogue. The original catalogue must be in the Personal Data Base.

Example : MYFIRST

Pointer code

The user must enter the name of the field of the first catalogue that is the pointer to record numbers of the second catalogue. When the user executes a one to one merge this key is not required.

Example : SECPOI

Select:

The user must enter the name of the fields of the first catalogue that will be extracted and written in the output file. The field names must be divided by space or by comma. The following special keywords can be used:

%ALL Return all the fields of the catalogue

%REC Return the record number of the catalogue

Example : RA DEC MAG %REC

The CTRL-L key provides more rows to write field names.

Target: PDB ?

The user must enter Y when the second catalogue to merge is in the Personal Data Base.

Catalogue

The name of the second catalogue to merge

Example : SECOND

Select:

The user must enter the name of the fields of the second catalogue that will be extracted and merged in the records of the output file. The field names must be divided by space or by comma. The following special keywords can be used:

%ALL Returns all the fields of the input cat.

%REC Returns the record number of the input cat.

Example : RA DEC MAG %REC

The CTRL-L key provides more rows to write field names.

Output: File Name

The name of the output file that contains the fields selected from the two input catalogues.

Example : NEWCAT.DAT

PDB Catalogue Name

The name of the new catalogue in the Personal Data Base. When this field is filled an entry in the PDB for this new catalogue will be created and the user can continue to work on these new data with DIRA. Otherwise only the output file will be written. Valid catalogue names are strings of 12 or less characters that do not contains special symbols.

Example : NEWCAT

NOTE:

When the user merge the fields of two catalogues he can have more fields with the same name. In this case the job will ask to change the names of some fields.

In the output records will be written all the field selected fields from the first catalogue and then the fields selected from the second catalogues.



Previous: DB_MENU
Up: Commands
Next: DB_OVER
Previous Page: DB_MENU
Next Page: DB_OVER