![]() ![]() |
|
COPYThe jBASE COPY command allows the user to copy specific or selected records from a specified file to the terminal, printer or another file. The DICT keyword can be used to specify that the record or records should be copy from or to a dictionary file.
COMMAND SYNTAXCOPY {DICT} filename{,section} {recordlist | *} {Options} ALTERNATE COMMAND SYNTAXCOPY FROM {DICT} SourceFilename TO {DICT} TargetFilename {OrigID,{NewID}} {...} {Options} SYNTAX ELEMENTSfilename is the name of a valid file. The file type must be one of the supported jBASE file types. section is the name of a data section recordlist is the list of record identifiers to be copied. If the recordlist is omitted then the active SELECT list if present is used. An asterisk (*) denotes all records in the file. The Options are as follows:
ALTERNATE SYNTAX ELEMENTSSourceFilename is the file from which the records are copied from TargetFilename is the file where the records are copied to OrigID is the record ID to be copied NewID is the optional destination record ID ... denotes multiple OrigID,NewID sets where each set is separated by a space The Alternate Syntax Options are as follows:
NOTESOn Windows, confusion can occur when running in the sh or msh emulation mode of the jSHELL. Rather than the expected record copy, COPY will invoke the Windows file copy command when used in either of these modes. The JCOPY command can be used to ensure that the record copy is invoked regardless of jSHELL emulation mode. The Alternate Syntax is useful when a single command line is required to do the copy.
EXAMPLES
Copies Record1 from File1 to the terminal.
Copies RecordId1 from File1 to dictionary file File2]D overwriting RecordId2. Once copied the original Record1 is deleted from File1.
COPY FROM File1 TO DICT File2 RecordId1,RecordId2 OVERWRITING DELETING Same as previous example, but uses the alternate syntax.
Copies record 4090 from the EMPLOYEE file to record 4090 in the file WORK.
COPY FROM ORDERS TO ORDER.HISTORY ALL Copies all records from the ORDERS file to the ORDER.HISTORY file |