[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]] ==== Nagging Question (OpenInsight Specific) ==== === At 01 OCT 1999 10:27:37AM Don Miller - C3 Inc. wrote: === {{tag>"OpenInsight Specific"}} In AREV (and GREV, for that matter), we've always had to use a code snippet like the following to solve an RTP57 run-time error problem on OSBREAD / OSBWRITE: The problem manifests itself with the modulo of the byte offset for read/write operations (65536) is 21930. FOOBAR=MOD(BYTE.POS,65536) IF FOOBAR=21930 THEN BYTE.POS-=1 ;* decrement by one OSBREAD BYTE FROM FVAR AT BYTE.POS LENGTH 1 ;* read a byte OUTPUT.REC=BYTE:OUTPUT.REC ;* tack it to the head END OSBWRITE OUTPUT.REC ON FVAR AT BYTE.POS BYTE.POS+=LEN(OUTPUT.REC) Is this still required in OI?? Don Miller ---- === At 02 OCT 1999 01:06AM Steve Smith wrote: === Don, Wouldn't be surprised if the 21930 bug is still there. Can you write program to check? Steve ---- === At 04 OCT 1999 10:54AM Don Miller - C3 Inc. wrote: === Steve .. will do and report back. Don M. ---- === At 05 OCT 1999 04:12PM Don Miller - C3 Inc. wrote: === The bug is dead!! Long live OI. This used to be a genuine headache when writing import/export programs. The offset I used was 87466 which MOD(65536) is 21930. No longer is the following needed: FOOBAR=MOD(BYTE.POS1,65536) IF FOOBAR=21930 THEN BYTE.POS1-=1 OSBREAD BYTE FROM FVAR AT BYTE.POS1 LENGTH 1 OUTPUT.REC1=BYTE:OUTPUT.REC1 END Don M. [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=E605266B7CB16C61852567FD004F6EE4|View this thread on the forum...]]