TFQA: Tools for Quantitative Archaeology |
TFQA Home |
CntEdit: Edit Files Formatted for CntCnvCNTCNV 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} ? 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} ? 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 ? Enter New Substitution String {Y} ?
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 Page Last Updated: 21 June 2022 |
Home | Top | Overview | Ordering | Documentation |