RAW ( field , position , length )An integer expression that indicates the position of the first byte you want to extract from field. The default value of position is 1.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.This procedure extracts bytes from the Name field of the first Customer, starting at byte 8, and writes 4 bytes to the variable r1:
/*You must connect to a non-OpenEdge demo database to run this procedure*/DEFINE VARIABLE r1 AS RAW NO-UNDO.FIND FIRST Customer NO-LOCK.r1 = RAW(Customer.Name,8,4).
If (position +length -1) is greater than the length of the field from which you are extracting the bytes, the AVM returns a run-time error.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |