KEYWORD_RULES


This application offers a command-line interface to keyword rules. It takes as input one or more files containing keyword/value pairs (in the same format as the ipppssoot.d?x files), a keyword names format file, a set of comma-delimited instrument codes that should match the codes at the start of each desired rule, one or more keywords whose rules are to be applied, and an optional output file. It produces the keyword value based on the inputs and the rules in OPUS_DEFINITIONS_DIR:keyword_rules.lis. If no output file is specified, the results are sent to standard output.

Usage

Context

Inputs

The names of files containing keyword/value pairs in the format of the ipppssoot.d?x files (DGX, DVX, DCX), a keyword names file (one is provided for reading SOGS_DISK:/dbms/load/cgg1_keyword.dat named OPUS_DEFINITIONS_DIR:cgg1_names.dat), a comma-delimited list of instrument codes to select rules (e.g. STI,STS for the STIS), and one or more keywords for which rules exist in OPUS_DEFINITIONS_DIR:keyword_rules.lis.

Outputs

If a file name is specified with the -o option, the output are placed in that file. For each keyword supplied with the -k option, a line containing the keyword name and value after the rule(s) are applied are output in the form:

KEYWORD = VALUE

Constraints

The OPUS environment must be initialized (via opus_login.com or opus_login.csh) prior to executing this command. The keywords supplied to the -k option must be the subject of a rule in OPUS_DEFINITIONS_DIR:keyword_rules.lis. The keywords and instrument codes must be uppercase which implies they must be quoted on the command line in VMS. In general, all input required to compute each rule in keyword_rules.lis must be supplied via the -db option(s) regardless of the specific values required by the rules for the keywords indicated with the -k option.

Example

$ keyword_rules -db o52z28naq.dvx -db o52z28naq.dgx -db o52z28naq.dcx -k 
"OBSMODE" -i "STI,STS" -n OPUS_DEFINITIONS_DIR:cgg1_names.dat

OBSMODE = ACCUM