Thu Apr 8 1999

ARMR MODULE

Subject: ARMRPORT

Call: armrport -csv -fixed -ht -fulldate -nolabels -orgdef -vector specName


Purpose

Armrport is used to export ARMR data to other software applications. It allows one to create output files in either fixed format, or in "comma seperated values" (CSV) format. Most software can import at least one of these formats.

Armrport generates a summarized view of the input data base. The first line of Armrport's output file consists of the field names. The remaining records contain the data base's converted data values.

The default output method is CSV. For this output format, Armrport converts the ARMR data to a variable length file where every field of the view is seperated by commas. Output text fields are enclosed with double quote marks (").

A sample of Armrport's CSV output follows:

      "FName","FType","Mode","CPL","NLINE","DATE","TIME","LABEL"
      "ALIEN","DIRECT","E2",20,6,02/17/82,"14:47:00","ARMR"
      "APRUNE","EXEC","E2",86,50,06/10/92,"13:26:52","ARMR"
      "ARALI","MODULE","E2",29976,3,06/22/92," 9:48:12","ARMR"
      "ARAUDATE","MODULE","E2",33608,3,06/22/92," 9:48:22","ARMR"
      "ARCONCAT","MODULE","E2",14712,3,06/22/92," 9:48:39","ARMR"
      "ARCOPY","MODULE","E2",16696,3,06/22/92," 9:48:40","ARMR"
      "ARCSORT","MODULE","E2",54936,3,06/22/92," 9:48:50","ARMR"

Fixed format output may also be created. For this format, Armrport converts the ARMR data to a fixed width file. For easier reading, a space character seperates each output field. Each output field also has a fixed width.

Here's a sample of Armrport's fixed width output.

      FName    FType    Mode CPL   NLINE  DATE     TIME     LABEL
      ALIEN    DIRECT   E2      20      6 02/17/82 14:47:00 ARMR
      APRUNE   EXEC     E2      86     50 06/10/92 13:26:52 ARMR
      ARALI    MODULE   E2   29976      3 06/22/92  9:48:12 ARMR
      ARAUDATE MODULE   E2   33608      3 06/22/92  9:48:22 ARMR
      ARCONCAT MODULE   E2   14712      3 06/22/92  9:48:39 ARMR
      ARCOPY   MODULE   E2   16696      3 06/22/92  9:48:40 ARMR
      ARCSORT  MODULE   E2   54936      3 06/22/92  9:48:50 ARMR

Usage

armrport -csv -fixed -ht -fulldate -nolabels -vector specName
-csv copy data to the specified file; the fields will be separated by a comma. (default)
-fixed copy data to the specified file; the fields are not seperated by any special character, but rather have fixed widths. Each row has the same width, and each field begins and ends at the same position within its row.
-ht an optional argument denoting "halt type."
-fulldate is an optional argument. Use it when you a full 4-digit year for output date fields. The default date format is mm/dd/yy. When -fulldate is specified, dates are output using the format mm/dd/yyyy.
-nolabels use -nolabels when you wish to omit the field names record from the output file.
-orgdef Builds a field origins output file. Used with the -fixed output option.

The org file will have the same filename as the target file, except with a file extension of "org." For example, if the target file is named output.txt, the org file will be named output.org.

The org file and target output file may be used as input for Armrload.

-vector is an optional argument. Use it when you want to vectorize the final view field. By default, we assume that all view fields are to be converted one record at the time as follows:
         input view              corresponding output
      -----------------        -------------------------
      v1 v2 v3 ..... vn        "v1","v2","v3", ... ,"vn"

When you specify the -vector option, we treat the final two view fields special. The field to the left of the final view field is assumed to be a sequence field. The final field is assumed to be n-tuplet data. The sequence field is used only to obtain the proper sort. The data will be grouped by the view fields which appear to the left of the sequence field. Each group yields one output record. The values of the final field (n-tuplet) is appended at the end of the record in a final field as follows:

      grouped input view           output record
      ------------------   ----------------------------------
      v1 v2 v3 ... s1 i1   "v1","v2","v3", ... ,"i1 i2 .. in"
                   s1 i2
                   .
                   .
                   .
                   sn in

Note: In -csv mode, Armrport removes extraneous trailing blanks from all output fields. This includes the optional n-tuplet field under the VECTOR option. Typically, the n-tuplet field is a textual item. The -vector option converts the ARMR seq/text structure to a variable length text block form. The latter is frequently used by off-the-shelf PC software.

Note further, that the n-tuplet field can be of any data type. It need not be textual. You might for instance vectorize a column of dates.

specName is the name of a file in which you have written processing specs for the current Armrport run.

Specification File

Here's a sample specification file that could be used to transfer project data to Microsoft Excel.

      source= project
      target= project.csv
      view= project status month date remarks hours+
      date= date
      end=

Armrport recognizes the following statements:
Statement
Description
source= sfn sfn specifies the name of the data base to be converted.
target= tfn tfn specifies the name of the output file
alt= f1 n1 ... this statement is used for renaming output fields. F1 specifies the old field name, and n1 specifies the new field name. Any number of renaming pairs may be entered.
view= f1 f2 ... specifies the output fields.

Append a plus character (+) to the end of a field name to signify summation.

If the view= statement is ommitted, then by default, all fields are output. One may also code view= * to specify all fields.

date= f1 f2 ... specifies the fields to receive date conversion
end= This statement marks the end of the current Armrport cycle. You may append any number of additional Armrport cycles. Each cycle must be marked with an end= statement.

Notes

Armrport will ignore the directory display width for all date fields. For normal date output a display width of 8 is used. When the -fulldate option is specified, an output display width of 10 is used.

For -csv output, two double quote characters are output for each double quote contained in an input textual string.

i.e. the string

      A "new" copy                                                      
is output as
      "A ""new"" copy"