On 2021-02-10 15:21:18 CVBruce wrote:
> Eric,
>
> To your point #2.  In looking at other implementations of Rexx, I found
> that some implementations note that if you move the write pointer to
> someplace in the existing file, and then write, the file will be truncated
> to that written data.  This led me to the realization that the write
> pointer is also the “working” end of file pointer. If you move the write
> pointer to the middle of the file what will the result be, especially if
> the data written is greater than the original data in the position, wiping
> out the record separator (CRLF) in the process.
>
> I would lean toward not being able to move the write pointer, and use
> sequential file update processes that are old and well defined.  

        Ah.  That's right, I forgot about that truncation issue.
>
> I know that update in place is a common technique on the mainframe, but
> mainframes also support record structures, and record i/o, Rexx for the
> most part doesn’t.  There is not a data structure that is tied to the file
> in away that prohibits writing records that don’t agree with the structure
> of the file.
        On the mainframe (where Rexx was first implemented), update-in-place 
only worked for 
fixed-length record files; until the Byte File System in VM and Unix System 
Services in 
MVS were implemented, variable-length record files had a record-length prefix 
on each 
record; there was no concept of "stream-of-bytes with imbedded linend 
characters".
>
> To your point #1, I think replace is more common than default of append.
>  In most programming environments I’ve used you must explicitly specify
> append.
>
> There have been times in Rexx, where to bullet proof a program, I’ve had to
> issue a close then open against a file because the program in development
> never reached the file close logic from the last execution, the result
> being an append rather than the desired replace.
>
> Bruce

Leslie

-- 


_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to