Progress
Language Reference


RAW Function
(ORACLE only)

Interfaces
OS
SpeedScript
All
All
Yes

Extracts bytes from a field.

SYNTAX

RAW ( field [ , position [ , length ] ] ) 

field

Any field from which you want to extract bytes.

position

An integer expression that indicates the position of the first byte you want to extract from field. The default value of position is 1.

length

An integer expression that indicates the number of bytes you want to extract from field. If you do not use the length argument, RAW uses field from position to end.

EXAMPLE

This procedure extracts bytes from the name field of the first customer, starting at byte 8, and writes 4 bytes to the variable r1.

r-rawfct.p
/*You must connect to a non-PROGRESS demo database to run this procedure*/

DEFINE VARIABLE r1 AS RAW.

FIND FIRST customer.
r1 = RAW(name,8,4). 

NOTES

SEE ALSO

GET-BYTE Function, LENGTH Statement (ORACLE only), PUT-BYTE Statement, RAW Statement (ORACLE only)


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095