The Grammar of the Archaeological Record
2. The Manual

22. Intra-Unit Programs

Giorgio Buccellati – June 2010

Back to top: 22. Intra-Unit Programs

22.1: Introduction

Intra-unit programs process data within the book of any given excavation unit.

The JD suite is the main set of programs, and processes data from the J to the D format, producing the browser edition of that particular book.

The other programs serve particular needs, and are run as needed by the unit staff.

Back to top: 22. Intra-Unit Programs

22.2: JD suite

[TEXT TO BE WRITTEN; ZGz05 mDP]

Back to top: 22. Intra-Unit Programs

22.2.1: Directory organization

For the proper functioning of the JD suite you need the following folders (A01, V19 and W19 are used as sample books, to be replaced as appropriate). V19d… and W19d… stands for the folders that contain graphic files pertinent to the book in question (A01 in this case).

\MZ\A\A01\I\J
\MZ\A\A01\TEXTS
\MZ\A\A01\UGR
\MZ\A\V19\G\LoRes\V19d…
\MZ\A\W19\G\LoRes\W119d…
\MZ\A\Y01\O\M

Also note that additional files are required for the functioning of individual programs within the suite. They are found below, under the description of the pertinent program within the suite.

Back to top: 22. Intra-Unit Programs

22.2.2:JD1-J: processes .J files (white on red)

Input

The JD program processes .J files in the I\J folder. It presupposes a –BOOK.DEF file in the root directory.<

For the format of the .J files see 4.6.6.


Operations

The program processes either one or more single files, or a batch of files. Its normal operation is triggered by the batch file JD FILELIST. If no .J files are present in the I\J folder, the program so states and terminates. If one or more J files are present, the batch file creates the pertinent FILELIST.TXT file, and displays the files that are to be processed. If the files are accepted and the return key is pressed, the program starts.

If there are no errors, the program invokes the next program in the suite.

If errors are detected, the program stops and refers the operator to a “.!” file that lists the errors.

It checks the data entries for accuracy, and passes them to an interim .E file (placed in the I\E folder), where some preliminary editing is done (e.g., leading zeroes are added to elements). If errors are detected, the program lists them in a file that has the same label as the input file, but with extension “.!”.

If no errors are detected, the program chains next to the E program.


Output

A new .E file is produced in the I\E folder each time the program is run. The filename consists of the contracted date and time.

The program also opens files in \J-TEMP and in SUMMARY that are invoked by the subsequent programs in the suite.

The chained programs produce several temporary .TXT files that are placed in the root directory to be used by the subsequent programs and then deleted when each program is completed. They are: J-TEMP.TXT, JRECORDS.TXT. Only the files placed in the .E folder are not deleted, although they are not meant for independent subsequent use.

Back to top: 22. Intra-Unit Programs

22.2.3: JD2-E: processes the .E file (blue on black)

Input

[TEXT TO BE WRITTEN; ZGz05 mDP]


Operations

This checks for further errors, and resolves the mnemonic roster codes into alphanumeric codes, and produces .O files for each pertinent constituent in the O folder and its subfolders. If errors are detected, the program lists them in a file with the same label as the .E file, but with extension “.!!”. If the data contain elevations, then the program produces with the same label as the .E file, but with extension “.ELV”, the purpose of which is to allow a quick check for the correctness of the elevations.

If not errors are detected, the program chains next to the O program.


Output

[TEXT TO BE WRITTEN; ZGz05 mDP]

Back to top: 22. Intra-Unit Programs

22.2.4: JD3-O: processes the .O files (yellow on black)

Input

[TEXT TO BE WRITTEN; ZGz05 mDP]


Operations

This produces .HTM files in the D folder ad its subfolders. It also produces index files for each of the constituents. These index files are placed in the O\X folder, and they are used by the browser to access individual constituents.


Output

[TEXT TO BE WRITTEN; ZGz05 mDP]

Back to top: 22. Intra-Unit Programs

22.2.5: JD4-X: produces the indices (blue on grey)

Input

[TEXT TO BE WRITTEN; ZGz05 mDP]


Operations

It creates O\X-ALL file.


Output

[TEXT TO BE WRITTEN; ZGz05 mDP]

Back to top: 22. Intra-Unit Programs

22.2.6: JD5-V: produces frequencies for ceramic vessels

[TEXT TO BE WRITTEN; ZGz05 mDP]

Back to top: 22. Intra-Unit Programs

22.2.7: JD8-Y: starts indices, frequencies, spreadsheets, data bases

[TEXT TO BE WRITTEN; ZGz05 mDP]

Back to top: 22. Intra-Unit Programs

22.2.8: JD9-Z: displays the final summary (yellow on turquoise)

Input

[TEXT TO BE WRITTEN; ZGz05 mDP]


Operations

[TEXT TO BE WRITTEN; ZGz05 mDP]


Output

[TEXT TO BE WRITTEN; ZGz05 mDP]

Back to top: 22. Intra-Unit Programs

22.3: R: produces .J and .X files from .R (black on green)

     The program processes the data entry of the relay log. It computes coordinates and elevations, and produces a J file ready for processing by the JD suite.


Input

     The R program processes .R files in the I\R folder.

     The file label cannot exceed 8 characters, and it consists of the contracted date, plus the initials, plus an optional digit in case more than one .R file is produced on the same day by the same person. For example: Q410aBC1.R.

     For the format of the .R files see 4.6.7.


Operations

     The program processes only one file at the time.

     It must be on the same disk as the data files.

     It uses an optional –BOOK.DEF file file.

     It computes the coordinates for each relay. If the computation of a given relay does not admit a solution, it is given in a separate list that appears in the J\R folder with the extension “.!NS” (for “attention! No Solution”).


Output

     The program produces two files.

     The first is the in I\J folder. The new has the same label as the input file, but with the addition of R in final position, and with the extension .J. If the file label is 8 characters long, then the contracted date is further contracted to three characters, e.g., Q4AaBC1R.J. This is done automatically by the program.

     The second file has the same label as the .J files, but with extension “.X”. it is placed in the I\R subfolder, and it gives a list of all relays processed, with the resolution of coordinates if a solution has been obtained. This index file is not utitlized by other programs, and is produced only to allow a quick check-up of the results.

     The .J files must then be processed by the JD suite.

Back to top: 22. Intra-Unit Programs

22.4: G: processes .G files to produce script files for AutoCAD

[TEXT TO BE WRITTEN; ZGz05 mDP]

Back to top: 22. Intra-Unit Programs

22.5: PT: produces .J files from G\P and G\T

[TEXT TO BE WRITTEN; ZGz05 mDP]

Back to top: 22. Intra-Unit Programs

22.5.1: Input

The PT program processes a directory containing either .WMF files within the G\P\LoRes folder or .JPG files within the G\T\LoRes folder.

If multiple labels for the same templates are present, only the first one is processed, and the others are bypassed.

Back to top: 22. Intra-Unit Programs

22.5.2: Operations

The program processes either one or more single files. Its normal operation is triggered by either of two batch files: P PT or T PT. The program chooses between plots or templates on the basis of the extension, .WMF for plots, and .JPG for templates. If no J files are present in the I\J folder, the program so states and terminates.

Back to top: 22. Intra-Unit Programs

22.5.3: Output

The program produces a .J file to be processed with the JD program.

Back to top: 22. Intra-Unit Programs

22.6: B: produces the data base output (yellow on blue)

Input

     The program uses the definition files V-FILES.TXT and W-FILES.TXT in the folder TEXTS\DF-FILES, see above 3.3.

     It must be started by the B.BATCH file, which creates filelists for the P and T folders.

     It requires filelists in each pertinent V and W folder. These are created by the VWlist program (see below, VWX, section 23.4).


Operations

[TEXT TO BE WRITTEN; ZGz05 mDP]

Output

[TEXT TO BE WRITTEN; ZGz05 mDP]

Back to top: 22. Intra-Unit Programs

22.7: S: produces a .J file to attribute strata to elements other than features (yellow on red)

Input

     The program operates on the O directory.

     It requires FILELIST.TXT in each of the pertinent subfolders. These files are created through the S A1.BAT file (see above, 15.3 [mistaken link, ZGz20 mDP]).


Operations

     If started with the S.BAT file, the program only asks for verification, and then runs automatically. The filename may be changed as needed, e.g. S A1.BAT where A1 represents the pertinent book (see above, 15.3 [mistaken link, ZGz20 mDP]).


Output

     The file S-CUMUL.J is generated in the book’s I\J subfolder. This file must then be processed through the JD suite.

     A previous version of this file is deleted each time a new one is created. The reason is that the program processes all elements each time it is run.


Comments

     Purpose of the program is to transfer strata and aggregate assignments from features to all other pertinent elements. This saves entering such assignments for any element other than a feature. Obviously, the program should be run after a stratum assignment J file has been processed (see above, 4.6.6).

     Features are assigned to strata (roster slot I1), and are generally entered through the strata assignment log (see above, 4.6.6). Aggregates, items or q-lots are not so assigned: they are assigned secondarily, through their association with a feature, by means of the SA program (cf. below, 22.8).

     Similarly, elements are assigned to aggregates (slot G9), and generally entered through the aggregate log (see above, 4.6.1). While items and q-lots may be assigned individually to an aggregate (when the aggregate is part of a feature), they are not so assigned when the feature is itself part of the aggregate. Thus the SA program handles aggregates as well as strata.

     The program presupposes that strata and aggregates have been entered (through a regular J file) for features. The program extrapolates strata and aggregates for each item, q-lot and q-item associated with any given feature for which a stratum or an aggregate is available.

Back to top: 22. Intra-Unit Programs

22.8: A: produces a .J file to attribute strata/phases to aggregates and aggregates to elements (red on grey)

Input

     The program operates on the O folder.

     It requires FILELIST.TXT in the A subfolder. This file is created by the A.BAT file The filename may be changed as needed, e.g., A A1.BAT where A1 represents the pertinent book, see above, 15.3 [mistaken link, ZGz20 mDP].

Operations

     If started with the A A1.BAT file, the program only asks for verification, and then runs automatically.


Output

     The file A-CUMUL.J is generated in the book’s I\J subfolder. This file must then be processed through the JD suite.

     A previous version of this file is deleted each time a new one is created. The reason is that the program processes all aggregates each time it is run.


Comments

     The program must run after running the S program, because it assumes strata assignments to elements other than features.

     It uses the G9 entry in the aggregates to look for the first element in the aggregate. It then extracts the stratum and assigns it to the aggregate. This element is in most cases a feature, though it could also be another element.

     It then reads the same G9 entry to attribute the aggregate to any other element subsumed under the named element. For example, let us assume that G9 lists f175. The program looks at the elements that “sit in” f175 (e.g., i5, q233,etc.), and adds and entry in the output J file for each such element (i5, q233, etc.). It also adds i5 under the roster slot G12 for i5, under G13 for q233, etc., for the pertinent aggregate. See above 5.4 [mistaken link, ZGz20 mDP] for examples.

     The program does not include q-items, pottery lots or bone lots (see Volume 1 - “The System”, section 3.2). To see if any of these are included in a given aggregate, you must look up the pertinent q-lot (which is included in the aggregate).

     Note that the stratum assigned to an aggregate is that of the first element listed under the aggregate. It is assumed that any given aggregate belongs to only one stratum.

Back to top: 22. Intra-Unit Programs

22.9: OSPR: treats special rosters starting from .O

[TEXT TO BE WRITTEN; ZGz05 mDP]

Back to top: 22. Intra-Unit Programs

22.10: OSPRZ: treats special rosters for Z99

[TEXT TO BE WRITTEN; ZGz05 mDP]

Back to top: 22. Intra-Unit Programs

22.11: D: depositional synopsis

Input

     Files in O\F. A filelist must first be created in this directory (which is done automatically by a batch file of the type D A16.BAT).


Operations

     If a batch file is used to start the program, it operates automatically.


Output

     A depositional index and a depositional synopsis are created in the D\X\DEP-PROC folder.

Back to top: 22. Intra-Unit Programs

22.12: X: indices within element folders

     This is a very old program, features of which will be incorporated in the JD suite. Some of the features of the program may not apply with the current Roster.


Input

     Files in any subfolder within O. A filelist (called $.TXT) must first be created in this directory. This is done through the batch file X.BAT, which has to be placed within the pertinent subfolder. The batch file invokes the program (currently version X18h).


Operations

     Programs must be started from within QB45, which happens automatically from the catch file.

     Seven standard choices are preset. If one of these is desired, enter the number as it appears on the screen.

     Otherwise, you have to follow the directions as given. Note in particular:


      Title: the full title you wish to appear in the output (e.g., “Criteria for strata assignments”).


      Conditions to be met: < A21 fg > means that only elements for which a definition (A21) as figurine (fg) is applicable will be considered.


       Sort order: defines the order in which the attributes will be listed, < e > referring to the current element. For instance, you could have a sort by definition, width, height, element.


Output

     The output is given within the pertinent subfolder within the folder O.

Back to top: 22. Intra-Unit Programs