I'm developing a subroutine that will copy a record from one file to another.
Depending on the value of one of the input arguments, the target record will be overwritten if it already exists in the target file.
Upon confirmation of a successful copy, and depending on the value of another input argument, the source record could potentially be deleted.
I'm looking for methods of confirming the copy was successful; i.e., the target record is identical to the source record.
Any suggestions?
------------------------------
Shawn Waldie
Manager, Enterprise Application Development
Rocket Forum Shared Account
Los Angeles CA US
------------------------------
Page 1 / 1
I'm developing a subroutine that will copy a record from one file to another.
Depending on the value of one of the input arguments, the target record will be overwritten if it already exists in the target file.
Upon confirmation of a successful copy, and depending on the value of another input argument, the source record could potentially be deleted.
I'm looking for methods of confirming the copy was successful; i.e., the target record is identical to the source record.
Any suggestions?
------------------------------
Shawn Waldie
Manager, Enterprise Application Development
Rocket Forum Shared Account
Los Angeles CA US
------------------------------
Depending on the value of one of the input arguments, the target record will be overwritten if it already exists in the target file.
Upon confirmation of a successful copy, and depending on the value of another input argument, the source record could potentially be deleted.
I'm looking for methods of confirming the copy was successful; i.e., the target record is identical to the source record.
Any suggestions?
------------------------------
Shawn Waldie
Manager, Enterprise Application Development
Rocket Forum Shared Account
Los Angeles CA US
------------------------------
Why reinvent the wheel ? use tcl COPY !
COPYI if you run pick flavor.
COPYI FROM file {TO file} (recordid{,newrecordid}} {} | ALL | activeselectlist ) {OVERWRITING} {DELETING} About 'confirmation', with WRITE use ON ERROR then you trap any error.
regards
manu
------------------------------
Manu Fernandes
------------------------------
I'm developing a subroutine that will copy a record from one file to another.
Depending on the value of one of the input arguments, the target record will be overwritten if it already exists in the target file.
Upon confirmation of a successful copy, and depending on the value of another input argument, the source record could potentially be deleted.
I'm looking for methods of confirming the copy was successful; i.e., the target record is identical to the source record.
Any suggestions?
------------------------------
Shawn Waldie
Manager, Enterprise Application Development
Rocket Forum Shared Account
Los Angeles CA US
------------------------------
Depending on the value of one of the input arguments, the target record will be overwritten if it already exists in the target file.
Upon confirmation of a successful copy, and depending on the value of another input argument, the source record could potentially be deleted.
I'm looking for methods of confirming the copy was successful; i.e., the target record is identical to the source record.
Any suggestions?
------------------------------
Shawn Waldie
Manager, Enterprise Application Development
Rocket Forum Shared Account
Los Angeles CA US
------------------------------
Please use ON ERROR and STATUS() appropriately, noting that with ADE you can also get an encryption error on a WRITE for the same reason.
Regards
JJ
------------------------------
John Jenkins
Principal Technical Support Engineer
Rocket Software Limited
U.K.
------------------------------
hi Shawn,
Why reinvent the wheel ? use tcl COPY !
COPYI if you run pick flavor.
About 'confirmation', with WRITE use ON ERROR then you trap any error.
regards
manu
------------------------------
Manu Fernandes
------------------------------
Why reinvent the wheel ? use tcl COPY !
COPYI if you run pick flavor.
COPYI FROM file {TO file} (recordid{,newrecordid}} {} | ALL | activeselectlist ) {OVERWRITING} {DELETING} About 'confirmation', with WRITE use ON ERROR then you trap any error.
regards
manu
------------------------------
Manu Fernandes
------------------------------
I'm actually using the COPY command in the subroutine.
I have several conditional COPY actions to make, and I wanted to save some lines of code.
------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------
While (surprisingly) not widely used, if using Automatic Data Encryption (ADE) please remember that a READ failure does not always mean a record is not on file, it can also mean a decryption failure if the appropriate encryption keys are not activated for the user session concerned.
Please use ON ERROR and STATUS() appropriately, noting that with ADE you can also get an encryption error on a WRITE for the same reason.
Regards
JJ
------------------------------
John Jenkins
Principal Technical Support Engineer
Rocket Software Limited
U.K.
------------------------------
Please use ON ERROR and STATUS() appropriately, noting that with ADE you can also get an encryption error on a WRITE for the same reason.
Regards
JJ
------------------------------
John Jenkins
Principal Technical Support Engineer
Rocket Software Limited
U.K.
------------------------------
------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.