[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
APPEND FROM

    APPEND FROM copies records from an existing file to the end of the
    active database file.  The FROM file does not have to be a database
    file.

Syntax

    APPEND [<scope>] [FIELDS <field list>] FROM <file>/(<expC>)
    [FOR <condition>] [WHILE <condition>] [SDF]/[DELIMITED
    [WITH BLANK/<delimiter>/(<expC>)]]

Argument

    <file> is the name of the source file.  If no file type is specified, a
    .dbf extension is assumed.  If there is a type option specified,
    the file extension is assumed to be .txt unless specified.

Options

    Fields: If the FIELDS clause is specified, data is APPENDed only
    into the fields specified.

    Scope: The <scope> is the portion of the source database file to
    APPEND FROM.  In Clipper, NEXT<n> APPENDS the first <n> records and
    supersedes any FOR or WHILE condition.  RECORD <n> APPENDs only source
    database file record number <n> to the target database file.  The
    default scope is ALL records.

    Condition: The FOR clause specifies the conditional set of records
    to APPEND FROM within the given scope.  The WHILE clause specifies the
    set of records meeting the condition from the first record in the
    source file until the condition fails.

    Type: There are three types of files Clipper can import: SDF,
    DELIMITED, and (.dbf) files.

    SDF identifies a System Data Format ASCII file.  Each record is the
    same length and ends with a carriage return and line feed.

    DELIMITED identifies an ASCII text file, where fields are separated by
    commas and character fields are bounded by double quotation marks (the
    default delimiter).  Note that the delimiters are not required and
    Clipper correctly APPENDs character fields not bounded by them.  Fields
    and records are variable length and end with a carriage return and line
    feed.  The end-of-file mark is Ctrl-Z (1A hex).

    DELIMITED WITH BLANK identifies an ASCII text file, where fields are
    separated by one space and character fields are not bounded by
    delimiters.

    DELIMITED WITH <delimiter> identifies a delimited ASCII text file,
    where character fields are delimited with the specified delimiter.

Usage

    Deleted Records in the source database file are APPENDed but not
    marked as deleted in the target database file.  If DELETED is ON,
    however, none of the deleted source records are APPENDed.

    Fields with the same name and types are APPENDed.  Unlike dBASE
    III, however, the source and target fields must be the same data type.
    If they are not you will get the error message "Type conflict in
    REPLACE" when you APPEND FROM.

    Matching widths: If a target field is larger, Clipper pads the
    source data to fill it.  If the target field is smaller, Clipper
    truncates the source data.

Network

    Note that APPEND FROM does not require the target file locked with
    FLOCK() or USEd EXCLUSIVEly in order to function properly.  Clipper
    automatically arbitrates contention for the target database file during
    APPENDs.

See Also: COPY
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson