TFQA Logo

Tools for Quantitative Archaeology
   Email:
             Kintigh email

TFQA Home
TFQA Documentation
TFQA Orders
Kintigh's ASU Home


CntEdit: Edit Files Formatted for CntCnv

 

      CNTCNV manipulates count data with an abbreviated input format. CntEdit is a companion program to CNTCNV and can be used to do global or selective substititions of row or column field values in a data file formatted for CNTCNV. In particular is two different sets of type (row) codes were used in two different projects, this program could be used to map one system into the other. The program can either read the file aprameters and the substitution rules from a file or from the keyboard. The output is formatted with leading #'s (Antanta Data File comments) so that it can be submitted in an antana forat file as documentation of the changes.

 

      The program prompts should be self explanatory.

 

Output Listing File {.TXT} ?


Input File {.DAT} ?


Output File {...(EDIT).DAT} ?


[K]ey in Substitutions or Read from [F]ile {K} ? Position of First Row Field ?


Note: if row column or count is preceded by a blank space in each set
add the number of blanks to the appropriate length and for the
substitution string lead with the appropriate number of blanks


Length of Row Field {2} ?


If No Column Code was Used Answer 0 to the Next Question
Length of Column Field {1} ?


Note: if row-col-count sets are followed by blank space,
add the number of blank spaces to the count length
Length of Count Field {3} ?


Substitute in [A]ll or [S]elected Records {A} ?

Key String to Look for ?
Position of Key String ?


Enter New Substitution String {Y} ?
[R] of [C]olumn Substitution {R} ? Old String ?
New String ?

 

SAMPLE INPUT PARAMETER FILE

4 #row col start position# 2 #row length# 1 #col length# 3 #count length#
R/22/99/
C/B/Z/
R/55/66/

 

SAMPLE INPUT DATA FILE (column index not in file)

 * 11Axxx22Bxxx33Cxxx44Dxxx55Exxx
 - 11Axxx22Bxxx33Cxxx44Dxxx55Exxx
 * 11Axxx22Bxxx33Cxxx44Dxxx55Exxx
 * 11Axxx22Bxxx33Cxxx44Dxxx55Exxx
 - 11Axxx22Bxxx33Cxxx44Dxxx55Exxx
|   ^    ^    ^    ^    ^    ^    ^    ^ 
Col:5   10   15   20   25   30   35   40

 

SAMPLE OUTPUT DATA FILE (column index not in file)

 * 11Axxx11Zxxx33Cxxx44Dxxx66Exxx
 - 11Axxx22Bxxx33Cxxx44Dxxx55Exxx
 * 11Axxx11Zxxx33Cxxx44Dxxx66Exxx
 * 11Axxx11Zxxx33Cxxx44Dxxx66Exxx
 - 11Axxx22Bxxx33Cxxx44Dxxx55Exxx
|   ^    ^    ^    ^    ^    ^    ^    ^ 
Col:5   10   15   20   25   30   35   40

 

SAMPLE PROGRAM LISTING

# CntCnvEd Edit Row-Column-Count Records - Keith Kintigh - 07/21/07

# Input Data File: CNTCNVED.DAT  Output Data File: CNTCNVED(EDIT).DAT
# Parameters Read From: CNTCNVED.SCR
# RowColPos:# 4  # RowLen:# 2  # ColLen:# 1  # Cntlen:# 3

# Only records with "*" at position 2 affected

# Substititions: R/oldrowr/newrow/ or C/oldcol/newcol/
R/22/99/
C/B/Z/
R/55/66/
# 5 Records Written

Home Top Overview Ordering Documentation

Page Last Updated - 22-Jul-2007