Using Regina Rexx in WIN XP and file names with spaces - REXX
This is a discussion on Using Regina Rexx in WIN XP and file names with spaces - REXX ; Hello,
I am using Regina Rexx on Windows XP and I am trying to use rexx to copy files
from one location to another. Some files have long file names with blanks or
spaces in the file name. I am ...
-
Using Regina Rexx in WIN XP and file names with spaces
Hello,
I am using Regina Rexx on Windows XP and I am trying to use rexx to copy files
from one location to another. Some files have long file names with blanks or
spaces in the file name. I am currently using 'address system 'copy ' in out
Is there some way I can have the output location have blanks in the file name.
Thank you
Neil
-
Re: Using Regina Rexx in WIN XP and file names with spaces
In Message-ID:<14816$4908edca$63e0a6fd$30674@PRIMUS.CA>,
none (Neil) wrote:
>I am currently using 'address system 'copy ' in out
>
>Is there some way I can have the output location have blanks in the file name.
address system 'copy "' || in || '" "' || out || '"'
Or, as some people prefer:
address system 'copy "'in'" "'out'"'
--
Arthur T. - ar23hur "at" intergate "dot" com
Looking for a z/OS (IBM mainframe) systems programmer position
-
Re: Using Regina Rexx in WIN XP and file names with spaces
Thank you Artur that did it.
Much appreciated.
Neil
In article <30vhg4la15u4jnf2h4mo9sms1ck908ogfi@4ax.com>, arthur@munged.invalid
says...
>
>In Message-ID:<14816$4908edca$63e0a6fd$30674@PRIMUS.CA>,
>none (Neil) wrote:
>
>>I am currently using 'address system 'copy ' in out
>>
>>Is there some way I can have the output location have blanks in the file
name.
>
>address system 'copy "' || in || '" "' || out || '"'
>Or, as some people prefer:
>address system 'copy "'in'" "'out'"'
>
>--
>Arthur T. - ar23hur "at" intergate "dot" com
>Looking for a z/OS (IBM mainframe) systems programmer position
-
Re: Using Regina Rexx in WIN XP and file names with spaces
Neil wrote:
> Thank you Artur that did it.
If you are likely to copy files in other routines, then it might be
worth creating a subroutine to handle the copying:
::Routine copy public
Which you could use as:
Call Copy in,out /* Makes your code "prettier" */
I don't know if Regina supports ::requires and ::routine though.
Once you start handling blanks, by enclosing your filenames in double
quotes, you have to take care over leading and trailing blanks in the
filename variables. If you *know* that you'll never have
leading/trailing blanks (and they are dangerous) then you could change
the "copy" routine to:
Address system 'copy "'strip(arg(1))'" "'strip(arg(2))'"'
--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
-
Re: Using Regina Rexx in WIN XP and file names with spaces
In Message-ID:<VNudneNDK6vXxpTUnZ2dnUVZ8qbinZ2d@brightview.com>,
Swifty <steve.j.swift@gmail.com> wrote:
>If you are likely to copy files in other routines, then it might be
>worth creating a subroutine to handle the copying:
>
>::Routine copy public
>
>Which you could use as:
>
>Call Copy in,out /* Makes your code "prettier" */
>
>I don't know if Regina supports ::requires and ::routine though.
It doesn't support them, at least not in that form. However,
it does allow for internal and external called routines, so the idea
remains possible. Just to avoid confusion, I might call the routine
something other than Copy, just so the reader knows I'm not trying
to use the system COPY command in that statement.
<snip>
>you have to take care over leading and trailing blanks in the
>filename variables.
<snip>
>Address system 'copy "'strip(arg(1))'" "'strip(arg(2))'"'
Good point, there.
Also, I've been bit with COPY stopping at the first EOF mark,
even in a binary file. I might code a /b option on the system's
COPY command. The OP can decide whether it makes sense in his
application.
--
Arthur T. - ar23hur "at" intergate "dot" com
Looking for a z/OS (IBM mainframe) systems programmer position