Option 3: copy a library

This option (see Table 94) of the COPY command copies one tableBASE library to another.


FROM=(library #1)
TO=(library #2);

Required keyword
Required keyword
Default is YES
Default is NO

Default is blank

  1. NEWID applies only to data tables; it does not apply to alternates.
  2. (tablename) can be the data table name or view name. When specifying a view name, use a lowercase first letter, enclosed in single quotes, for example, EXCLUDE=’vIEWNAME’. If the view name is not supplied in quotes, then the error message ‘Keyword is Invalid’ will be returned.
  3. (filename) is a sequential file with 8-byte records containing table or view names; if the record contains more than 8 bytes, only the 1st 8 bytes are used.
  4. If EXCLUDE=<tablename> is used with <tablename> supplied in single quotes with the view name, then the view will be excluded from the source library. If EXCLUDE=<tablename> is used with TTYPE=V where <tablename> is the data tablename, <tablename> will be converted to the equivalent view name and excluded from the source library.
  5. For excluding views using EXCLFILE=<filename>, view names must have a lower case as the first letter of the tablename.
  6. If both EXCLUDE and EXCLFILE are used, then all table or view names supplied will be excluded.
  7. If TTYPE is used in conjunction with EXCLFILE, then it is ignored.

Library is the DDNAME of a DD statement that points to the relevant tableBASE library. The contents of tableBASE library #1 will be copied to tableBASE library #2 except for those tables or views specified in the EXCLUDE or EXCLFILE parameters. Library #2 must exist or have been initialized by the DEFINE Command. Tables which already exist on library #2 will not be copied, unless REPLACE=Y is specified.

When the NEWID parameter is YES (default), all table characteristics will be copied to the new tables along with the contents, except for the date, time, and user ID of the last change. The new table definitions will be updated with the date, time, and user ID of the copy operation. When the NEWID parameter is NO, all table characteristics including the original date, time and user ID of last change will be copied along with the contents. This permits a table to be restored with original update history information preserved.