I've written a REXX program which reads one file, changes a few
lines as it reads and writes to a second file, doing the above
one line at a time. When it reaches the end of the first file, I
want to copy the second file (the one REXX created) to another
location. I've tried just doing: copy file2 file3 but I get an
OS/2 error when running the program that file2 is in use. Is
there any way in REXX to close the file so that the OS can copy
it?
I've written a REXX program which reads one file, changes a few>lines as it reads and writes to a second file, doing the above one
(Excerpts from a message dated 08-02-00, Bryan Rubingh to All)
I've written a REXX program which reads one file, changes a few>lines as it reads and writes to a second file, doing the above one
You have some other error, if file2 is the newly-created file.>There is no OS/2 restriction against copying an open file to another
I've written a REXX program which reads one file, changes a few lines as
it reads and writes to a second file, doing the above one line at a
time. When it reaches the end of the first file, I want to copy the
second file (the one REXX created) to another location. I've tried just doing:
copy file2 file3
but I get an OS/2 error when running the program that file2 is in use.
Is there any way in REXX to close the file so that the OS can copy it?
I've written a REXX program which reads one file, changes a few lines
as it reads and writes to a second file, doing the above one line at a time. When it reaches the end of the first file, I want to copy the
second file (the one REXX created) to another location. I've tried
just doing: copy file2 file3 but I get an OS/2 error when running the program that file2 is in use. Is there any way in REXX to close the
file so that the OS can copy it?
Quoting Eddy Thilleman to Bryan Rubingh <=-
The stream function is one way:
Another way is LINEOUT('anyfile') to close 'anyfile'.
Quoting Baden Kudrenecky to Bryan Rubingh <=-
There is an OS/2 Rexx forum, but all that you have to do is
Quoting Eddy Thilleman to Bryan Rubingh <=-
The stream function is one way:
Another way is LINEOUT('anyfile') to close 'anyfile'.
Thanks much. I didn't use stream to open it, I just used lineout, so
I think the lineout should be what I want to close it.
Just use stream() to close the file. Using it to open the file is
also a good idea, so you can test whether or not the open was
successful. If you rely on linein() to implicitly open the file, you
won't know it failed, except by the fact that no data was read.
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,055 |
Nodes: | 17 (1 / 16) |
Uptime: | 17:55:54 |
Calls: | 501,024 |
Calls today: | 11 |
Files: | 109,384 |
D/L today: |
2,216 files (186M bytes) |
Messages: | 304,876 |
Posted today: | 1 |