Previous Topic: RENCOLS Function—Rename Column NamesNext Topic: UCCCOPY Function—Add Upper Case to Copied Rows


TRANSFER Function—Copy Matching Column Names

The TRANSFER function copies data from matching column names in a table to the corresponding columns in another table. The columns in the tables are considered to be corresponding if the name and data type match and the columns have the same NOT NULL attribute. Any differences in the length of the columns are padded or truncated, as appropriate.

When the new data rows from the source table are added to the target table, columns in the target table that are not matched in the source table are assigned their default values. Unmatched columns in the source table are discarded. If the key field column names do not match or the key values are replicated, there may be duplicate rows. In an ISPF environment, a panel is displayed to allow manual resolution of the duplicate rows. The TRANSFER function fails in a non-ISPF environment.

TRANSFER has the following syntax:

OI ASOTEAPI TRANSFER TABLE(from_table_name) TARGET(to_table_name) SSMPROT(YES|NO)

The SSMPROT keyword determines whether the potentially destructive operation is performed on an active System State Manager resource table or the SSM directory table. A value of NO unconditionally allows the operation. A value of YES prohibits the requested operation against any active SSM table. The default is NO except for the DELETE, DROPCOLS, and RENAME operations.