Example 1: CPS script file
With CPS files, an unlimited number of import/export commands can be specified in the same file.
The benefit is that the connection caches of certain sources are used: in this case, because both import/export operations concern the same SQL database, the actual database connection is only made when the first RUN command is executed.
Use of the file: COPYB @Sample.cps
<File Sample.cps> # # CopyS generated script file # # Created on Thu Dec 30 11:39:47 1999 #
# Notes: this script makes a backup of the HSLREFER and # HSLRENTL tables into the PERSO database
DATA_SRC=( (SRC="SQL") (DBM="DB2") (DB="PERSO") (REQUEST="SELECT * FROM SYSADEL.HSLREFER") )
DATA_DEST=( (SRC="SQL") (DBM="DB2") (DB="PERSO") (TABLE="BACKUP.HSLREFER") (MODE=CREATE) )
RUN
DATA_SRC=( (SRC="SQL") (DBM="DB2") (DB="PERSO") (REQUEST="SELECT * FROM SYSADEL.HSLRENTL") )
DATA_DEST=( (SRC="SQL") (DBM="DB2") (DB="PERSO") (TABLE="BACKUP.HSLRENTL") (MODE=CREATE) )
RUN
RELEASE |
Example 2: script file (identical to the one above) in the form of a DOS command file
Use of the file: SAMPLE
REM REM CopyS generated script file REM REM Created at Thu Dec 30 11:39:41 1999 REM
COPYB DATA_SRC=((SRC="SQL")(DBM="DB2")(DB="PERSO")(REQUEST="SELECT * FROM SYSADEL.HSLREFER")) |
COPYB DATA_SRC=((SRC="SQL")(DBM="DB2")(DB="PERSO")(REQUEST="SELECT * FROM SYSADEL.HSLRENTL")) |