Progress
Language Reference
RAW-TRANSFER Statement
Copies a record wholesale from a source to a target.
SYNTAX
BUFFER
Specifies a parameter is a buffer.
buffer
A source or target database record.
NOTE: If the source buffer contains only a partial field list, RAW-TRANSFER fails.FIELD
Specifies a parameter is a raw-field.
raw-field
A source or target data field of type RAW.
NO-ERROR
Suppresses Progress’s run-time error behavior and stores information on run-time errors, if any, in the ERROR-STATUS system handle.
EXAMPLEThe following Progress 4GL example performs a RAW-TRANSFER of a newly created Customer record to the Record field of Replication-Log table.
For more information on database replication, see the Progress Database Administration Guide and Reference.
NOTES
- The RAW-TRANSFER statement has several variations:
- The “buffer to raw-field” variation copies the entire record from the buffer to the raw field, prepending information on the source schema to the raw field.
- The “raw-field to buffer” variation first checks that the source schema information prepended to the raw field matches the schema of the buffer. Then it creates a target record, if necessary. Finally it updates each key field in the new record using values from the raw field, which forces indexing to occur.
- The “buffer to buffer” variation is the same as the “raw-field to buffer” variation, except that the source is a record in another buffer.
- The RAW-TRANSFER statement respects database triggers.
- You can marshal a Progress database record so that it can be sent across sockets by using the RAW-TRANSFER statement to put the record into a RAW variable and then copying the RAW variable to a MEMPTR that is being written to a socket. Use the PUT-BYTES function to do this. You can unmarshal database records by using the GET-BYTES function and then RAW-TRANSFER.
- At run time, the RAW-TRANSFER statement:
- Checks that the signatures of the source data and the target data match.
- Compares source and target codepage ids, and (if they are present and different) translates the source’s character data, writing any warnings to the database log file and raising any error conditions.
- Creates the target record, if none exists, and runs all appropriate CREATE triggers (unless the DISABLE TRIGGERS FOR LOAD option is active for the target).
- Registers changes in key fields with the index manager by updating each key field in the target when it differs from the source.
- Copies all data from the source record to the target record.
- Executes ASSIGN triggers for any modified fields (unless the DISABLE TRIGGERS FOR LOAD option is active for the target).
SEE ALSO
DISABLE TRIGGERS Statement, LDBNAME Function, RECORD-LENGTH Function
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |