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

    COPY duplicates all or part of an active database file to a new file.

Syntax

    COPY TO <file>/(<expC1>) [<scope>] [FIELDS <fields list>]
    [FOR <condition>] [WHILE <condition>] [SDF/DELIMITED/DELIMITED WITH
    <delimiter>/(<expC2>)]

Arguments

    <file> is the name of the new file.  If no type clause is specified,
    (.dbf) is the default file type and no extension is necessary.  If
    there is a type clause specified, the file extension is assumed to be
    (.txt) unless specified.

Options

    Fields: The FIELDS clause specifies the list of fields to copy to
    the target database file.  The default is all fields.

    Scope: The <scope> is the portion of the current database file to
    COPY.  The default is ALL.

    Condition: The FOR clause specifies the conditional set of records
    to COPY within the given scope.  The WHILE clause specifies the set of
    records meeting the condition from the current record until the
    condition fails.

    SDF: The SDF clause specifies the output file type as a System Data
    Format ASCII file.  Records are fixed length, each separated by a
    carriage return/line feed pair.  Fields are fixed length and there is
    no field separator.  Character fields are padded with trailing blanks,
    numeric fields are padded with leading blanks, date fields are written
    in the form "yyyymmdd," and logical fields are written in the form T/F.
    The end-of-file mark is Ctrl-Z (1A hex).

    Delimited: The DELIMITED clause specifies the output file type as a
    DELIMITED ASCII file.  Records are variable length, each separated by a
    carriage return/line feed pair.  Fields are variable length and
    separated by commas.  Character fields are bounded by delimiters (the
    double quote mark is the default unless you specify a different
    character using the WITH clause).  Leading and trailing spaces for
    numeric and character fields are truncated, date fields are written in
    the form "yyyymmdd," and logical fields are written in the form T/F.
    Ctrl-Z (1A hex) is the end-of-file mark.

    Note: DELIMITED WITH BLANK, DIF, SYLK, and WKS file type options
    are not supported in addition to the TYPE keyword.

Usage

    All records contained in the active database file are copies unless
    limited by a scope or FOR/WHILE clause.  Records marked for deletion
    will be copied unless DELETED is ON or a FILTER has been SET.

Network

     When you COPY in a network environment, Clipper opens the target
     database file EXCLUSIVE.

See Also: APPEND FROM COPY FILE COPY STRUCTURE SET DELETED
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson