
Preserving EAs when deleting lines from a file.
I use REXX to search text files for specific lines, and remove
those lines. Naturally, when I use SysFileDelete() and rewrite
the file, the EAs are gone. Specifying line 1 for lineout() does
not delete lines after line 1, it just basically does a line by
line overstrike, so the file does not shrink in size.
I thought I'd found the silver bullet I was looking for with the
'REPLACE' command of OREXXs STREAM function. While it streamlines
the code a bit, it behaves like SysFileDelete() was called, and
all the EAs are toast. I seem to recall that FILEREXX did not
give the expected result either.
Is there an approach to this that I haven't thought of, or am I
going to have to 'Get' and 'Put' the EAs before and after the
rewrite?
--------
Regards,
Tim
--------