Progress
Language Reference
RAW Statement
(ORACLE only)
Writes bytes to a field.
SYNTAX
field
The field in which you want to store expression.
position
An integer expression that indicates the position in field where you want to store expression. The default for position is 1.
length
An integer expression that indicates the number of positions you want to replace in field. If you do not use the length argument, RAW puts expression into field from position to end. Progress treats variable-length fields and fixed-length fields differently. See the “NOTES” section for more information.
expression
A function or variable name that returns data and results in the bytes that you want to store in field.
EXAMPLEThis procedure writes the name of the first customer in the database, Second Skin Scuba, to the variable r1. It puts two additional bytes, an ASCII s and a null terminator, on the end of the name, and writes the name back to the database with the RAW statement. The procedure then displays the new name, Lift Line Skiing.
NOTES
- In a variable length field, if (position +length -1) is greater than the length of field, Progress pads the field with nulls before it performs the replacement.
- In a fixed length field, if (position +length -1) is greater than the length of field, Progress returns a run-time error. If (position + length -1) is less then the length of field, Progress pads the field with nulls so that it remains the same size.
- If position, length, or expression is equal to the unknown value (?), then field becomes unknown.
- If position is less than 1, or length is less than 0, Progress generates a run-time error.
SEE ALSO
GET-BYTE Function, LENGTH Function, LENGTH Statement (ORACLE only), PUT-BYTE Statement, RAW Function (ORACLE only)
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |