Setting the smpl in pagesave command
Posted: Thu Aug 21, 2014 3:55 pm
Hello
I am trying to use the command pagesave to save output for a selected range of a workfile. I also need to assign the name of the output file dynamically. The below seems to work in terms of naming the output file, but it does not seem to work if I use %end in the smpl statement (it does work if I hardcode the dates). The error message I get is
Illegal date "8/21/2014 18:48:46" in "PAGESAVE..." (screenshot is attached)
Somehow it seems that @now includes the day and time in this line, but not within the main part of the workfile. The workfile is a dated structured file, monthly frequency, and I used the %end = @datestr(@now) line to set the end of the workfile range and sample.
%end = @datestr(@now)
%a = "output"+@datestr(@now, "yyyymmdd")+".csv"
pagesave %a @keep *real_avg @smpl %end(-24) %end '2012m9 2014m8
Any help would be much appreciated.
Thank you
I am trying to use the command pagesave to save output for a selected range of a workfile. I also need to assign the name of the output file dynamically. The below seems to work in terms of naming the output file, but it does not seem to work if I use %end in the smpl statement (it does work if I hardcode the dates). The error message I get is
Illegal date "8/21/2014 18:48:46" in "PAGESAVE..." (screenshot is attached)
Somehow it seems that @now includes the day and time in this line, but not within the main part of the workfile. The workfile is a dated structured file, monthly frequency, and I used the %end = @datestr(@now) line to set the end of the workfile range and sample.
%end = @datestr(@now)
%a = "output"+@datestr(@now, "yyyymmdd")+".csv"
pagesave %a @keep *real_avg @smpl %end(-24) %end '2012m9 2014m8
Any help would be much appreciated.
Thank you