Subj : close file in REXX To : Bryan Rubingh From : Murray Lesser Date : Fri Aug 04 2000 12:04 am (Excerpts from a message dated 08-03-00, Murray Lesser to Bryan Rubingh) Hi Brian-- ML>(Excerpts from a message dated 08-02-00, Bryan Rubingh to All) BR>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? ML> 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 >file. There _is_ a restriction against copying a file _to_ an open >file. Sorry, Brian. You were right and I was wrong. You cannot use an open file in a copy command, in either direction. I guess I am just getting forgetful in my old age :-(. But (as you have also been told by others), you do use the 'command' option of the REXX STREAM function to close a file. Regards, --Murray ___ * MR/2 2.30 #120 * Never say "always" or "never" --- Maximus/2 3.01 * Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000) .