Bug #5278
IMPORT UNFORMATTED raw with a process stream
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version:
History
#1 Updated by Constantin Asofiei about 3 years ago
In OE, you can call IMPORT UNFORMATTED
on a raw variable, with a file or process stream. In case of file, it behaves as expected - reads bytes and saves them into the raw instance. In the case of process stream, OE behaves kind of weird: the next available line gets 'discarded', and after that it 'discards' a number of bytes equal with the length of the raw variable; also, the raw instance size gets set to 0. This should be checked with memptr and blob, too.
For example:
def stream rpt. def var ch as char. def var r as raw. length(r) = 3. input stream rpt through value ("dir"). import stream rpt unformatted r. import stream rpt unformatted ch. message get-string(R, 1) ch length(r). import stream rpt unformatted ch. message get-string(R, 1) ch length(r). input stream rpt close.