Just a snippet of code where I use the & variable to rename an import file
--create file name
SET DATE ddmm
SET VAR vdate = (CTXT(#DATE))
SET DATE DD/MM/YYYY
-- Create the Run type
SET VAR vrunname = runname IN wqrun WHERE runtype = .vrun
SET VAR vrunstamp = (.vdate+.vrun)
-- Create the file name
SET VAR vrenfile = (.vdate+.vrunname)
RENAME kordss*.csv &vrenfile
The result is a file named '12/12/2020AMrun.csv'
Hope that's the sort of thing your looking for..
On Mon, Dec 21, 2020 at 10:11 AM Tony Luck <[email protected]> wrote:
> Tom,
>
> Set var vfile = 'myfile.txt'
> to use the file name
>
> place and '&' in front of your variable &vfile
>
> i.e type &vfile ( would type the contents to screen at the r>)
>
> On Mon, Dec 21, 2020 at 9:54 AM Tom Hart <[email protected]> wrote:
>
>> how do you set a var to a text file
>> I have tried set var var1 text = .myfile.txt
>>
>> Tom Hart
>>
>> --
>> For group guidelines, visit
>> http://www.rbase.com/support/usersgroup_guidelines.php
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "RBASE-L" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/rbase-l/CABX9BNdakzdHBziOP6ocSWSUbnZpWoTj%3D0u4ZQQvYLcOKW1XBw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/rbase-l/CABX9BNdakzdHBziOP6ocSWSUbnZpWoTj%3D0u4ZQQvYLcOKW1XBw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Regards
> Tony
>
--
Regards
Tony
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/CABnhDASsXuz0mtTYdixU%3DYkaPasKCRi1dM9pLgmE9vgH0VvQrA%40mail.gmail.com.