Hi,
If I run the following program in one go, it works properly:
*--------------------------------------------------------------------;
libname demo xlsx "&xxdemo./reporting/test.xlsx";
data demo.'All Students'n;
set sashelp.class;
run;
data demo.'Female'n;
set sashelp.class (where=(sex='F'));
run;
libname demo;
options validmemname=extend;
libname demo xlsx "&xxtraining./reporting/test.xlsx";
title 'DEMO';
proc print data=demo.'ALL STUDENTS'n noobs;
run;
libname demo;
libname demo xlsx "&xxtraining./reporting/test.xlsx";
proc datasets nolist nodetails;
copy in=demo out=work;
select 'ALL STUDENTS'n ;
run;
quit;
libname demo;
title 'WORK';
proc print data=work.'ALL STUDENTS'n noobs;
run;
However, it I want to run proc datasets in a second run, I get an error:
libname demo xlsx "&xxtraining./reporting/test.xlsx";
proc datasets nolist nodetails;
copy in=demo out=work;
select 'ALL STUDENTS'n ;
run;
quit;
libname demo;
title 'WORK';
proc print data=work.'ALL STUDENTS'n noobs;
run;
Are you familiar with this issue and do you how to fix it?
Best Regards,
Véronique
ok. I see. The option does not remain active after the first run in SAS Studio. Strange.
To make a name with a blank in it (a practice highly recommended against!) valid, you need to set the option
options validmemname=extend;
You either ran your proc datasets in a different session, or you have code that resets the option to its default.
The option is already active in the example I gave. I'm working on interactive mode.
ok. I see. The option does not remain active after the first run in SAS Studio. Strange.
You can find a setting in SAS Studio. Settings - Tables (or Data, I only see a German version where it is "Tabellen").
There you set the options vor VALIDVARNAME and VALIDMEMNAME, and code for this is sent before every execution. If you turn on "Show Generated Code in Log" in Settings - Code and Log, you can see the relevant code that is automatically sent in your log.
Could you share a screenshot; it's not an issue if it is in German.
Danke schön Herr Bremser.
In meiner Version gibt es diese Möglichkeit leider nicht.
Im General, kann ich nur validvarname ändern aber nicht validmemname.
Das müsste unter Taches sein. Welche Version des SAS Studio haben Sie? Meine ist ziemlich aktuell (University Edition).
SAS Studio 3.7
Da wäre ein Upgrade sinnvoll. Die Option wurde mit Version 3.8 eingeführt, siehe https://support.sas.com/en/software/studio-support.html#41193f64-7919-4800-844a-370aadebfef4
Sehr geehrter Herr Bremser,
jetzt ist bei mir SAS Studio 3.8 installiert.
Vielen Dank
Véronique
Na das ging ja schnell! Hauptsache, es geht jetzt.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.